Saturday, November 16, 2019

Sitecore XC 9.2 - Postman setup and API walk through.


Sitecore commerce SDK has provided an API collection which we can easily import in the postman and see all request and response details, Here are the few steps to configure and a high-level view.

References -


  1.  https://doc.sitecore.com/developers/90/sitecore-experience-commerce/en/execute-sample-api-calls-in-postman.html
  2. https://doc.sitecore.com/developers/90/sitecore-experience-commerce/en/list-of-sitecore-xc-postman-collections.html


Step 1-  Check the Sitecore installation folder


Step 2 - Setup postman - You can download it from here

Turn off the SSL setting for the local environment.





this is just for the test/local environment.



There are two folders for the import.


Step 3 -  Import environment settings.





Step 4 -  AntiForgeryEnabled settings - by default it's true


This setting is just for the local environment to check the API call, We need to keep this on in the live environment.

Step 5 - API walkthrough and flow.

Please make sure to update the environment variable based on your local environment settings, Like username and password and local authoring URL etc.


Generate token -



Step 6 - Place an order through the API -





Conclusion - Sitecore has provided out of the box well-structured API setup, We can use this API to call directly to perform the operation, debugging purpose and can wrap these APIs and expose them to the front end for the development.

No comments:

Post a Comment