Skip to main content

[Order Intake - GCW] How to Use the Customer-Agnostic Order API Endpoints

Written by Kyle Sawyer

Customer-agnostic connectors provide API endpoints where one endpoint can be used for multiple customers. This means you can submit orders, retrieve orders, and search orders across all your customers using a single set of endpoints. Here's how:

1. Create a Connector

  1. Go to Order Intake → Connectors.

  2. Create a New Connector.

  3. Choose API Connector.

  4. Select All Customers.

  5. Give it a name, e.g., Customer-Agnostic Connector.

  6. Copy your X-API-KEY.

  7. Click Create Connector.

Now you have your endpoints ready.

2. Submitting Orders for Multiple Customers

You can submit orders on behalf of different customers using a single endpoint.

Setup Process:

  1. Set up separate customers: Create a separate customer in GelatoConnect for each of your clients.

  2. Use your customer-agnostic connector: Use the connector created in step 1 above.

  3. Note the Customer Reference ID: When creating each customer, note the Customer Reference ID - this will be needed for the header.

Submitting Orders:

  • Method: POST

  • Endpoint: Use the Submit Order endpoint from your connector.

  • Headers:

    • X-API-KEY: [your copied key]

    • Customer-Reference-ID: [the customer reference ID for the specific customer this order is for]

  • Body: Use the same request structure for all orders, regardless of which customer they're for.

Steps:

  1. Use the Submit Order endpoint from your connector.

  2. Set method to POST.

  3. Add both required headers (X-API-KEY and Customer-Reference-ID).

  4. Include your order data in the JSON body.

  5. Click Send.

3. Retrieving Orders from All Customers

A. Get a Single Order

  • Method: GET

  • Endpoint: Use the Get Order endpoint from your connector.

  • Headers:

    • X-API-KEY: [your copied key]

    • Customer-Reference-ID: [the customer reference ID to specify which customer's order you're retrieving]

  • Body: None required.

Steps:

  1. Replace the {orderId} in the URL with an actual order ID.

  2. Add both required headers.

  3. Click Send.

  4. You'll receive the order details.

B. Search for Multiple Orders

  • Method: POST

  • Endpoint: Use the Search Orders endpoint from your connector.

  • Headers:

    • X-API-Key: [your copied key]

    • Customer-Reference-ID: [the customer reference ID to specify which customer's orders you're searching]

  • Body: Include your search filters in JSON.

Steps:

  1. Use the Search Orders endpoint from your connector.

  2. Set method to POST.

  3. Add both required headers.

  4. Add the JSON body with your search criteria.

  5. Click Send.

  6. You'll get a list of matching orders.

Important Security Note

We strongly advise using this connector via a intermediary service that you control. Do not expose these endpoints directly to your customers, as they would allow access to data related to all of your customers. The customer-agnostic connector should only be used by systems under your direct control.

Did this answer your question?