Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 3.89 KB

GettingStarted.md

File metadata and controls

65 lines (41 loc) · 3.89 KB

Getting started

This document provides instructions for installing Postman, for importing Composable Commerce Postman Collections, and for setting up an environment to get you started.

⚠️ Note:

  • Be aware that Postman automatically synchronizes environment variables (including your API Client credentials) to your workspace if logged in.
  • Use these collections only for development purposes and non-production projects.

Disclaimer

This is not the official commercetools documentation. To learn more about Composable Commerce APIs and to find the complete and approved documentation, visit docs.commercetools.com.

Install Postman

Instructions for installing the Postman app or using the web version can be found at Installing and Updating in the Postman Learning Center.

Set up an environment via the Composable Commerce API Client

An environment is a set of variables that you can use in your Postman queries. It can be generated and downloaded from the Merchant Center using the API Client to match your project:

  1. Create an API Client following the instructions provided in Create an API Client in the Merchant Center documentation.

  2. After clicking Create API Client, scroll down to the bottom.

  3. Choose Postman from the dropdown menu.

  4. Click the Download icon.

    image This downloads a Postman environment file containing all relevant data for your project.

  5. In Postman, click File > Import and upload the environment obtained from the Merchant Center.

    The environment can now be chosen from the environment selector at the top-right of Postman.

Set up an environment manually

Every root folder in Platform API, Import and Machine Learning contains a template.json file. To set up an environment using these templates, perform the following steps:

  1. Import the template.json file, see Importing data into Postman in the Postman Learning Center for further details.

    This will create an empty variable set environment. image

  2. Set the initial values for primary variables:

    • host: The host information can be found here.
    • auth_url: The Authorization URL can be found here.
    • client_id: From your API Client. More information can be found here.
    • client_secret: From your API Client.
    • project_key: Your project key.

    The environment is now ready to be used and can be chosen from the environment selector at the top-right of Postman.

Import Composable Commerce Postman Collections

Each of the following folders contain a collection.json file: Platform API and Import. You can import these files into Postman, for details see Importing data into Postman in the Postman Learning Center.

After the import, you should be able to see the collection. Expanding the collection reveals two primary folders:

  • Authorization - Use "Obtain access token" to get an authentication token. This is required for using the endpoints provided in the Project folder.
  • Project - Ready to use, explore the endpoints.

You can now use the Composable Commerce Postman Collections.