Gearment API

Order Completed

EVENT_ORDER_COMPLETED is sent when an order is completed.

When it fires

Fires on an order CDC update when the status changes to shipped, the previous row was not marked fulfilled, and the new row either becomes internally marked fulfilled or represents a real shipment with is_mark_fulfilled=false and is_mark_fulfilled_internal=false. Shipment lookup failure does not suppress the event; tracking company and URL are then empty.

Example payload

V3

{
  "type": "order_completed",
  "order": {
    "gearment_id": "260909P-DEMO01-7K3M2Q9Z",
    "gearment_name": "260909P-DEMO01-7K3M2Q9Z",
    "vendor_id": "SHOP-10482",
    "reference": "SHOP-10482",
    "status": "completed"
  },
  "tracking": {
    "number": "9400111899560000000000",
    "company": "USPS",
    "url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111899560000000000"
  }
}

V1

{
  "api_key": "ck_demo_8f2c",
  "type": "order_completed",
  "data": {
    "gearment_ord_id": "109876543",
    "gearment_ord_name": "260909P-DEMO01-7K3M2Q9Z",
    "ord_status": "completed",
    "order_id": "SHOP-10482",
    "tracking_number": "9400111899560000000000",
    "tracking_company": "USPS",
    "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111899560000000000"
  }
}

Fields

VersionFieldTypePresenceDescription
V1api_keystringADefault credential client key
V1typestringALiteral "order_completed"
V1dataobjectALegacy payload container
V1data.gearment_ord_idstringALegacy numeric order ID as a string when mapped; otherwise internal ID
V1data.gearment_ord_namestringAInternal Gearment order ID copied into the legacy name field
V1data.ord_statusstringALiteral "completed"
V1data.order_idstringA/emptyMarketplace/platform order reference
V1data.tracking_numberstringA/emptyTracking number stored on the order
V1data.tracking_companystringA/emptyCompany from the first retrieved shipment
V1data.tracking_urlstringA/emptyURL from the first retrieved shipment
V3typestringALiteral "order_completed"
V3orderobjectAOrder identity and state
V3order.gearment_idstringAInternal Gearment order ID
V3order.gearment_namestringASame internal order ID copied into the name field
V3order.vendor_idstringA/emptyMarketplace/platform order reference
V3order.referencestringA/emptySame marketplace/platform reference
V3order.statusstringALiteral "completed"
V3trackingobjectACurrent tracking information
V3tracking.numberstringA/emptyTracking number stored on the order
V3tracking.companystringA/emptyCompany from the first retrieved shipment
V3tracking.urlstringA/emptyURL from the first retrieved shipment

Presence: A is always emitted; A/empty is always emitted but the value can be ""; Per item is emitted for every array element.

Verify the signature before parsing the body. See Verifying a payload.

Payload handling

Confirm the exact topic and payload version with the Webhook simulator. Preserve unknown fields, process the event idempotently, and do not depend on JSON property ordering.