Method POST/partner/dispatch/shipments/{shipment_id}/close

Close a B2B order: it left the warehouse, its units stay allocated. Requires the dispatch:write scope.

On this page

You declare that the order left the warehouse. Its units stay tied to the order and to the distributor: that is exactly what the alert reads later. No unit can be added or removed any more. The whole flow is in the guide Tie each unit to its order.

#Authorization

API key in the Authorization header, Bearer format, with the dispatch:write scope. A key without it gets a 403 whose message names the missing scope. The plan of the key's brand must include API access, and the shipment's brand must be on the Compliance + Identity offer.

HTTP
Authorization: Bearer votre_clef

#Rate limit

The same as the other partner routes: one counter per key and one for the sum of your brand's keys, 120 calls per 60-second window by default. Every call that writes takes 1 unit of the key's daily quota, whatever the number of units it carries.

#Example request

curl
curl -i -X POST "https://api.sealtrust.io/v1/partner/dispatch/shipments/318/close" \
  -H "Authorization: Bearer st_live_0000000000000000000000000000000000000000000000"

#Example response

HTTP 200, the shipment with status set to closed and closed_at filled.

#Errors

CodeConditionWhat to do
401Key missing, malformed or unknown.Send Authorization: Bearer <your key> with the whole key.
403The key lacks the dispatch:write scope. Message Missing required scopes: dispatch:write.Create a key that carries this scope.
403The brand is on the Compliance offer. detail.code is OFFER_EXCLUDES_IDENTITY and detail.feature is dispatch. Nothing is recorded.Move to the Compliance + Identity offer. Retrying changes nothing.
429Rate limit or daily quota reached.Wait the number of seconds in Retry-After, or midnight UTC for the quota.
404No shipment of your brand has this id. A shipment of another brand gets exactly the same answer.Check the id returned at creation.
409The shipment is already closed or cancelled. detail.code is shipment_not_open.Nothing to do.

Your answer opens a pre-filled email in your mail app, addressed to contact@sealtrust.io. You read it over before sending it.

Suggest a correctionReport a problem