APIs and Developer Docs

Comestri has three sets of APIs covering the core Product Manager (PIM), Channel Manager and Order Manager functions. This documentation contains information about the API Calls and Endpoint, as well as providing API samples as Postman Collections.

Documentation and Endpoints

The URLs below link to the current production versions of the documentation:

API
Documentation
Connection End-Point Production
Connection End-Point Test/Staging
PIM https://product.comestri.com/apidoc https://product.comestri.com/api/v2 https://staging-product.comestri.com/api/v2
Channels https://channel.comestri.com/apidoc https://channel.comestri.com/api https://staging-channel.comestri.com/api
Distributed Order Management https://comestrioms.redoc.ly/    

Connection

Protocol HTTPS
URL Base %DOMAIN%/api/v2

API Credentials

API Account Based Authentication

When you create an API Account from Manage API Accounts, you will be shown a Client ID and Client Secret. These will be your API credentials.


Please save the API credentials securely as this will be the only time you will be able to obtain them. You will not be able to retrieve them again.

The credentials will be in the following format:

  • Client Name – <YOUR CLIENT NAME>

  • Client Id – <YOUR CLIENT ID>

  • Client Secret – <YOUR CLIENT SECRET>

These credentials will be used to receive an access token and make API calls to Comestri as detailed below.

The access token received is valid for 60 minutes after which you will need to acquire a new access token.


Please read the instructions below on how to make an API call:

  1. Run the following cURL command in your favorite terminal to obtain access token from the authentication server at <IDP HOST> using client_id and client_secret keys.
    client_id="<YOUR CLIENT ID>"
    client_secret="<YOUR CLIENT SECRET>"
    curl --request POST "https://<YOUR CLIENT ID>:<YOUR CLIENT SECRET>@<IDP HOST>/oauth2/token"
    --header 'Content-Type: application/x-www-form-urlencoded' --data 'grant_type=client_credentials'
  2. The response will appear, containing a JWT access_token that is valid for 60 minutes. The response will look something like below.
    { "access_token": "eyJraWQiOiIweGxwd1....", "expires_in": 3600, "token_type": "Bearer" }
  3. Copy the access_token.
  4. In the terminal, run the following cURL command with the access_token to make your API request.
    access_token="eyJraWQiOiIweGxwd1...."
    curl --request POST 'https://channel.comestri.com/api/channels/:channel_id/orders/'
    --header "Authorization: Bearer $access_token"
    --header 'Content-Type: application/json'

Static Token Based AuthenticationDEPRECATED

Use “Token token=%Your_API_Token%,email=%name@domain.com%” in the Http Header Authorization.

Email: your login (make sure this is an Admin user which manages master data set privilege)

Token: get it via Comestri UI – top right corner “Authentication Token” button.

Bulk Job

The Jobs endpoint supports entity creation and updates in bulk background jobs. It is strongly recommended to use the Jobs endpoint to do frequent and sizeable updates.


Staging and Pre-Release APIs

If you need to review pre-release versions of the API, you can access the API documentation here:

API
URL
PIM https://staging-product.comestri.com/apidoc
Channels https://staging-channel.comestri.com/apidoc
Distributed Order Management https://comestrioms-client-facing-draft.redoc.ly

Postman Collections

For testing/prototyping we have built Postman Collections and a Postman Environment that together allow you to exercise the Comestri APIs.

Get Postman

If you don’t already have Postman you can download it here https://www.getpostman.com/