Skip to content

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:

X-Company-Id: tin-can

Shipment schema quirks

  • incoterms on SupplyShipment is an enum (e.g. "EXW"), unlike on POs where it's an object with description/transportMode.
  • Items are accessed via items (not shipmentItems).
  • Aggregate stats (totalItems, totalUnits, totalCartons, totalWeight, totalVolume) live under stats (a SupplyShipmentStats object).
  • quantity and receivedQuantity on items are decimal strings, not integers.
  • shipmentType is 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 ID
  • supplyPurchaseOrders(first, filters, sort) — paginated PO list
  • supplyPOStats — aggregated PO statistics (milestones, risk, lead times, values)
  • supplyPOMilestones(po_id) — milestones for a specific PO
  • supplyPOEvents(po_id) — event history for a PO
  • supplyPONotes(po_id) — notes on a PO
  • supplyOrders / supplyOrder(id) — supply orders (manufacturing, assembly, procurement)
  • supplyShipments / supplyShipmentsGrouped — shipment tracking
  • supplySuppliers / supplySupplier(id) — supplier directory
  • supplyContacts — supplier contacts
  • supplyAvailablePOMilestones — reference list of all milestone definitions