Endless commerce api notes
Below are the details to connect to the endless commerce API. If you have any questions, please feel free to reach out. We want to make your integration as smooth as possible.
Important: the following credentials provide direct access to your production account.
Server URL https://api.endlesscommerce.com
GraphQL endpoint https://api.endlesscommerce.com/graphql
Access Token $EC_API_ACCESS_TOKEN
Each request must include the following HTTP header:
X-EC-Access-Token: $EC_API_ACCESS_TOKEN
Example request Example of a GraphQL request using curl for a query named orders:
curl -X POST https://api.endlesscommerce.com/graphql \ -H "Content-Type: application/json" \ -H "X-EC-Access-Token: $EC_API_ACCESS_TOKEN" \ -d '{ "query": "query { orders { edges { node { id createdAt } } } }" }'
Documentation The API is GraphQL-based and accepts POST requests. Queries and mutations must be sent in the request body as JSON. Responses may return HTTP 200 even when application-level errors occur. In such cases, errors will be included in the errors field of the response.
All available queries, mutations, and schema definitions are documented at: https://docs.endlesscommerce.com/api
General documentation is available at: https://docs.endlesscommerce.com/
Additionally, the documentation site provides a search feature that allows you to quickly locate specific queries, mutations, types, or other components of the API.
Recommended approach to navigate the documentation Since this is a GraphQL API, we recommend starting from the available queries and mutations as the primary entry point. From there, you can explore the related types, inputs, and nested fields required to fulfill each operation.
Understanding the intent of a query or mutation first usually makes it easier to reason about the underlying schema and data relationships.
Additional GraphQL resources If your team is not deeply familiar with GraphQL, the following resources may be helpful:
Official GraphQL documentation: https://graphql.org/learn/
GraphQL best practices and patterns: https://graphql.org/learn/best-practices/
Integration notes (discovered during implementation)
Schema quirks: nested object types
Several fields that look like they should be scalars are actually object types requiring sub-selections:
| Field | Type | Required sub-fields |
|---|---|---|
currency (on MonetaryValue, etc.) |
Currency |
isoCode, name, symbol (no code field) |
totalProductCost, totalPayments |
MonetaryValue |
amount, currency { isoCode } |
unitCost, extendedCost (on poItems) |
MonetaryValue |
amount, currency { isoCode } |
incoterms |
SupplyIncoterms |
description, transportMode (no code or name field) |
Supply chain query permissions
Some supply queries require an X-Company-Id header (e.g. supplyShipments, listInventory), though supplyPurchaseOrders uses brand filtering from the session context by default.
For supplyShipments, add this header:
Shipment schema quirks
incotermsonSupplyShipmentis an enum (e.g."EXW"), unlike on POs where it's an object withdescription/transportMode.- Items are accessed via
items(notshipmentItems). - Aggregate stats (totalItems, totalUnits, totalCartons, totalWeight, totalVolume) live under
stats(aSupplyShipmentStatsobject). quantityandreceivedQuantityon items are decimal strings, not integers.shipmentTypeis an enum (e.g.STANDARD).
Other useful supply chain queries
Discovered via schema introspection (119 total query fields). Supply-related queries include:
supplyPurchaseOrder(id)— single PO by IDsupplyPurchaseOrders(first, filters, sort)— paginated PO listsupplyPOStats— aggregated PO statistics (milestones, risk, lead times, values)supplyPOMilestones(po_id)— milestones for a specific POsupplyPOEvents(po_id)— event history for a POsupplyPONotes(po_id)— notes on a POsupplyOrders/supplyOrder(id)— supply orders (manufacturing, assembly, procurement)supplyShipments/supplyShipmentsGrouped— shipment trackingsupplySuppliers/supplySupplier(id)— supplier directorysupplyContacts— supplier contactssupplyAvailablePOMilestones— reference list of all milestone definitions