MobiariDocs
Admin APIShipments

Sync a shipment with the carrier

POST
/stores/{store_id}/orders/{order_id}/shipments/{shipment_id}/sync

Pulls the carrier's order detail now (a background job also polls): status, tracking events, carrier, cost and, when still empty, the order's NFe data.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid
order_id*string

Order id

Formatuuid
shipment_id*string

Shipment id

Formatuuid

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/shipments/497f6eca-6276-4993-bfeb-53cbbbba6f08/sync"
{
  "carrier_name": "string",
  "cdf_price_id": 0,
  "cdf_quotation_code": "string",
  "cost_cents": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "delivered_at": "2019-08-24T14:15:22Z",
  "freight_external_order_code": "string",
  "freight_payer": "string",
  "freight_provider_code": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "items": [
    {
      "order_item_id": "c3e40b5c-b9ae-413a-b96e-5aa0514f5ae6",
      "ordered_quantity": 0,
      "quantity": 0,
      "sku": "string",
      "title": "string"
    }
  ],
  "notes": "string",
  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  "shipped_at": "2019-08-24T14:15:22Z",
  "status": "draft",
  "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  "tracking_code": "string",
  "tracking_events": [
    {
      "comment": "string",
      "datetime": "string",
      "event": "string",
      "occurred_at": "2019-08-24T14:15:22Z"
    }
  ],
  "tracking_json": {},
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}