Getting Started with ommni APIs

This guide outlines how to begin leveraging Ommni’s APIs to create customized shopping experiences using Postman as the API client.

API URL

Ommni provides multiple base URLs, specific to each service, as the standard endpoints for API requests:

  • PIM: https://api.ommni.io/api-pim/v1
  • DAM: https://api.ommni.io/api-dam/v1
  • Identity: https://api.ommni.io/api-identity/v1
  • Channel: https://api.ommni.io/api-channel/v1

Prerequisites

Before using Ommni's APIs, ensure the following steps are completed:

  1. Trial Account: Contact us to set up a trial account, allowing you to get your environment and credentials ready.
  2. API Collection Access: Ensure you have access to the API collection for the services you wish to use. For more information, see the API References section.
  3. System App Creation: A system app must be created for your account, which requires admin rights. This app is crucial for API authentication.

Authenticating with Ommni APIs

  1. Download Postman: Ensure you have the Postman client installed.

  2. System App Authentication: Authentication for each service is handled through a system app. Note the following for your system app:

    • Authorization URL: POST https://auth.ommni.io/oauth/token
    • Client ID and Secret: Unique to your app and used for authentication.
  3. Generate Access Token: Use the following cURL command in Postman to obtain an access token. Replace {yourClientId}and the {YOUR_CLIENT_SECRET} with your specific details.

    curl --location --request POST 'https://auth.ommni.io/oauth/token' \
    --header 'content-type: application/json' \
    --data-raw '{
        "client_id": "{yourClientId}",
        "client_secret": "{YOUR_CLIENT_SECRET}",
        "audience": "https://api.ommni.io",
        "grant_type": "client_credentials"
    }'
    

    This command returns a JSON object with your access_token, which is used to authenticate API requests. Note that the token expires after a set period, necessitating regeneration for ongoing API use.

Making Your First API Request

  1. Configure Authorization in Postman: With the access token, set the Authorization header in Postman to "Bearer {your_access_token}" for your API requests.

  2. Select an API Service: Choose the Ommni API service you wish to use and prepare your API request URL based on the service-specific base URL provided above.

  3. Send a Request: Use Postman to send a request to your chosen API endpoint. This could be a test to retrieve product information from the PIM service, for example.

Follow these steps to start exploring the capabilities of Ommni’s API suite to enhance your ecommerce platform.