What we do
Tools
Industries
Department
How we workLet's talk →
Home/Cin7/Cin7 API Calls for Orders That Post Once
Cin7

Your First Cin7 API Order, Without the Duplicates

A retailer's purchase order arrives over EDI, or a wholesale buyer submits one on your own portal, and somebody types it into Cin7 again. The Cin7 Core API can create that sale directly, with the same order, pick, pack and ship stages your team uses on screen. Cin7 Omni has its own, separate API, so check which edition you're on before you write a line.

Cin7 Core API in four lines

Base URL: https://inventory.dearsystems.com/ExternalApi/v2/ plus the endpoint, for example .../v2/SaleList. JSON only, dates in UTC ISO 8601.

Two headers on every call: api-auth-accountid and api-auth-applicationkey. Create both on the API setup page inside Cin7 Core, at inventory.dearsystems.com/ExternalAPI. Treat them like a password.

Limit: 60 calls a minute, counted per API application. Go over and you get 429 Too Many Requests. List endpoints page up to 1,000 records at a time.

Webhooks need the Automation module on your subscription. API access itself is an add-on, so confirm it's on your plan first.

A buyer PO becomes a Cin7 sale, call by call

Endpoint names below are from the Cin7 Core Developer Portal.

  1. 1

    Create an API application for this one integration

    On the API setup page, add an application and copy the Account ID and Application Key. Give each integration its own application, because the 60-a-minute limit applies to each separately.

  2. 2

    Prove the keys with GET /me

    It returns your company details. A 403 here means the headers are wrong or the key belongs to a different company: each company you can open in Cin7 Core has its own Account ID.

  3. 3

    Look for the PO before creating anything

    Call GET /saleList?ExternalID=<buyer PO number>. ExternalID is an API-only field you set yourself, so if a sale already carries this PO, stop. This one check is what makes retries safe.

  4. 4

    Check stock for the lines

    GET /ref/productavailability returns on-hand, allocated and available quantities by product and location, so you can confirm or back-order lines before you answer the buyer.

  5. 5

    POST /sale, then POST /sale/order

    The first call creates the sale header: customer, location, SkipQuote: true when there's no quote stage, and the PO number in ExternalID. The second adds the order lines, with Status set to DRAFT for review or AUTHORISED to allocate stock.

    Watch for: Status values. On POST the order accepts only DRAFT and AUTHORISED, and authorizing is what allocates stock or creates a backorder.

  6. 6

    Subscribe to the shipping events

    With the Automation module on, POST /webhooks with type Sale/ShipmentAuthorised or Sale/ShipmentTrackingNumberChanged and your callback URL. That's the trigger for sending the buyer an advance ship notice or tracking number.

Cin7 integrations that double-post or go quiet

Retries create a second copy of the order

How you'll know: A timeout on POST /sale gets retried, and the buyer's PO shows up twice in Cin7, both authorized.

Fix: Set ExternalID on every sale and search for it before each create. If the first attempt did land, pick it up and carry on from the order lines.

One application key shared by every add-on

How you'll know: 429 errors at busy times, from a reporting tool, a portal and an EDI job all spending the same 60 calls.

Fix: Create a separate API application per integration and queue calls inside each so bursts wait instead of failing.

A webhook that turned itself off

How you'll know: Tracking stopped reaching the buyer days ago, and nothing errored on your side.

Fix: Cin7 tries a delivery six times, then deactivates the webhook. Answer each delivery quickly with a 2xx, do the work afterward, and re-read GET /webhooks on a schedule to catch any with IsActive set to false.

Full pulls every hour

How you'll know: A sync pages through every product and sale each run and starts hitting the limit as the catalog grows.

Fix: Use UpdatedSince on SaleList and PurchaseList, and limit=1000 where a full pull is unavoidable.

Cin7 API questions before the first request

Where do I find the Cin7 API documentation?

For Cin7 Core, it's the Cin7 Core Developer Portal, hosted on Apiary, with every endpoint, field table and status code. Cin7 Omni has separate API documentation and its own credentials. Log in first and check which edition you're on, because the two aren't interchangeable.

What does Cin7 integrate with out of the box, before any API work?

Its integration list covers the main storefronts, marketplaces, accounting packages and shipping tools, and our Cin7 overview names the big ones. EDI providers, 3PLs, B2B portals and CRMs are uneven: some have a listed app, plenty don't, and those are the jobs the API exists for.

Can Cin7 connect to an EDI feed or a 3PL warehouse?

Yes. On Core, EDI comes through the EDI partners in Cin7's integration list, and a 3PL either has a listed connection or needs one built. Underneath, it's the same calls: /sale and /sale/order bring the order in, and the shipping webhooks send confirmation and tracking back out.

Does Cin7 support B2B or wholesale portals?

Cin7 sells its own B2B portal as an add-on. If your buyers use a different portal, it can read live availability from /ref/productavailability and create orders through /sale, so they land in Cin7 like any other sale.

Can I connect Cin7 to a CRM?

If the CRM has a listed Cin7 connector, start with that. If not, n-frames syncs customers through the /customer endpoint and reacts to Customer/Updated webhooks. Cin7 Core also exposes its own CRM records, leads and opportunities, under /crm.

Let's talk

Tell us the one thing your team does manually that eats up time. We read every message and reply within a day.