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
Go to Order Intake → Connectors.
Create a New Connector.
Choose API Connector.
Select All Customers.
Give it a name, e.g., Customer-Agnostic Connector.
Copy your X-API-KEY.
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:
Set up separate customers: Create a separate customer in GelatoConnect for each of your clients.
Use your customer-agnostic connector: Use the connector created in step 1 above.
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:
Use the Submit Order endpoint from your connector.
Set method to POST.
Add both required headers (X-API-KEY and Customer-Reference-ID).
Include your order data in the JSON body.
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:
Replace the {orderId} in the URL with an actual order ID.
Add both required headers.
Click Send.
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:
Use the Search Orders endpoint from your connector.
Set method to POST.
Add both required headers.
Add the JSON body with your search criteria.
Click Send.
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.
