data-slots=text
data-backgroundColor=green
SaaS only

Test Data Ingestion API operations

The Data Ingestion API Reference includes an interactive Try it feature that allows you to test API operations directly from the documentation. This feature sends real requests to your Commerce Optimizer sandbox instance, making it easy to explore the API and validate your integration without writing code.

What you can do

Using the Try it feature, you can:

data-variant=warning
data-slots=text
Requests sent using Try it modify the actual data in your sandbox instance. While you can delete or restore data later, be mindful of the changes you make during testing.

Prerequisites

Before testing the API, ensure you have:

Step 1: Get credentials

  1. Open the Data Ingestion API Reference.

  2. Locate the Get Credentials section at the top of the page.

  3. Sign in to the Adobe Developer Console when prompted.

  4. Follow the instructions to create credentials and generate an access token for API access.

    For detailed authentication steps, see REST authentication.

data-variant=info
data-slots=text
You only need to set up credentials once. However, access tokens expire after 24 hours and must be regenerated.

Step 2: Test an API operation

Follow these steps to test any API operation using the interactive documentation:

  1. Choose an operation to test:

  2. Configure the endpoint: In the request template, replace the tenantId placeholder with your instance ID.

  3. Add authentication: Select the Parameters tab, and replace the Authorization value with the access token you generated in Step 1.

  4. Modify the request body (if applicable) using the provided example as a starting point.

    • Select the Body tab
    • Edit the JSON request body with your own values
  5. Send the request: Click the Send button to run the API call.

  6. Review the response:

    • Check the HTTP status code (200, 201, 400, etc.)
    • Examine the response body and headers
    • Note any error messages for troubleshooting

Example: Testing the Create Metadata operation

Here's a practical example of testing the Create Metadata endpoint:

  1. Navigate to POST /v1/catalog/attributes/metadata in the API Reference.

  2. Click Try it.

  3. Enter your tenantId in the path parameter.

  4. Add your access token to the Authorization header.

  5. Use this sample request body:

    [
      {
        "code": "brand",
        "source": {
          "locale": "en"
        },
        "label": "Brand",
        "dataType": "TEXT",
        "visibleIn": [
          "PRODUCT_DETAIL",
          "PRODUCT_LISTING",
          "SEARCH_RESULTS"
        ],
        "filterable": true,
        "sortable": true,
        "searchable": true,
        "searchWeight": 1,
        "searchTypes": [
          "AUTOCOMPLETE"
       ]
     }
    ]
    
  6. Click Send and review the response.

Common response codes

Status Code
Description
Next Steps
200 OK
Request successful
Review the response data
201 Created
Resource created successfully
Verify the created resource
400 Bad Request
Invalid request data
Check your request body format and required fields
401 Unauthorized
Authentication failed
Verify your access token is valid and properly formatted
403 Forbidden
Access denied
Ensure your credentials have the required permissions
404 Not Found
Resource or endpoint not found
Check the endpoint URL and tenant ID
429 Too Many Requests
Rate limit exceeded
Wait before making additional requests

Troubleshooting

Authentication errors

Problem: 401 Unauthorized response

Solution:

Invalid tenant ID

Problem: 404 Not Found or tenant-related errors

Solution:

Request format errors

Problem: 400 Bad Request response

Solution:

Next steps

After successfully testing API operations:

  1. Integrate with your application - Use the Get Started guide to implement API calls in your code.
  2. Explore SDKs - Consider using the TypeScript or Java SDKs for easier integration.
  3. Review limitations - Understand rate limits and boundaries for production use.