Fulfillment records

Fulfillment tracks how an order is delivered after payment. A fulfillment covers a set of the order's line items and has a type: shipment, pickup, local_delivery, digital, or service. Create one with POST /v1/orders/{order_id}/fulfillments.

Create a fulfillment with one package#

Send shipment.packaging: single_package to put the full quantities of the submitted line_items into one outbound shipment and one package. This choice does not select other items on the order. Omit shipment when you want to add shipments and packages separately. Shipment input is accepted only with type: shipment.

The paid order must have unallocated fulfillment quantities, and each item's fulfillment snapshot must allow the requested type. Shipping items use quoted delivery requirements. Checkout may already have created their fulfillment; read the order first and add shipments and packages to that existing fulfillment when present. If you create a physical fulfillment before checkout materializes one, your integration owns fulfillment execution for the order, including any quantities left after a partial create.

HTTP
POST /v1/orders/ord_01J00000000000000000000000/fulfillments
Authorization: Bearer flint_test_...
Idempotency-Key: warehouse-order-1042-box-1
Content-Type: application/json

{
  "type": "shipment",
  "line_items": [{"order_line_item_id": "li_01J00000000000000000000000", "quantity": 2}],
  "shipment": {
    "packaging": "single_package",
    "package": {
      "carrier": "ups",
      "service_code": "ground",
      "tracking_number": "1Z999AA10123456784",
      "buyer_notification_behavior": "suppress"
    }
  }
}

The nested package accepts the same fields as package creation: carrier, service_code, tracking_number, tracking_url, label_url, external_system, external_reference_id, weight, dimensions, buyer_notification_behavior, status_reason, and metadata. A non-Flint label_url requires package external_system. Shipment provenance belongs on shipment.external_system and shipment.external_reference_id; it does not supply package provenance.

Tracking notifications are requested by default. Set package buyer_notification_behavior: suppress before submitting when this creation should not email the buyer. The package starts at created, even with tracking. Use mark_shipped or a carrier event after handoff.

The response returns the created fulfillment inside data. When you include shipment input, its shipments and packages fields contain the created shipment and package. Read the package items with GET /v1/packages/{package_id}/items. Without shipment input, shipments and packages are absent. Subsequent changes use the existing shipment, package, and package-item routes. Package items remain independent children, and concurrent allocations cannot exceed the fulfillment's quantities.

The fulfillment, shipment, package, item allocations, events, and notification intents commit together. A failure commits none of them. Buyer messages and webhooks are delivered asynchronously. Shipment progress, fulfillment completion, and payment status remain separate.

Idempotency-Key is optional. Supply a key you retain before sending when you need to recover a lost response: replay the same key and body to retrieve the original IDs without another package or notification intent. Do not start a new create with a new key while the original outcome is unknown. If you supplied fulfillment external_reference_id, list fulfillments using order_id and that reference to reconcile accepted work, then read its shipments, packages, events, and notifications. A generated key returned only in a lost response cannot be reconstructed.

Track fulfillment progress#

status tracks public work progress. request_status separately records whether the provider accepted the request. An accepted request has request_status: accepted and status: pending until work starts. While active_hold is present, status remains at the public work status from before the hold. mark_no_show returns status: failed and records the reason in outcome. The status filter on GET /v1/fulfillments uses these same projected values.

Read supported_actions before changing a fulfillment. Send one of those values as action to POST /v1/fulfillments/{fulfillment_id}/transitions. The action values are accept, schedule, hold, start, mark_preparing, mark_picked, mark_packed, mark_ready, dispatch, fail, mark_no_show, complete, and cancel. The available subset depends on the fulfillment type and current status.

cURL
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_01J.../transitions \
  -H "Authorization: Bearer $FLINT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: fulfillment-ful_01J...-ready" \
  -d '{
    "action": "mark_ready",
    "expected_version": 4
  }'

Each action accepts only its documented fields. schedule requires scheduled_start_at and scheduled_end_at. hold and mark_no_show require a reason from their action-specific enum. fail requires release_quantity: use true to release the fulfillment's quantity or false to preserve it. Every action accepts expected_version; when supplied, it must match the fulfillment's version. A stale version or an action outside supported_actions returns 409 with the current fulfillment, including its current version, status, and supported_actions.

Transition responses include the updated fulfillment, the status-change event, and any buyer notification audit records. Buyer notifications are sent by default. Set buyer_notification_behavior to suppress when the transition should not notify the buyer.

PATCH /v1/fulfillments/{fulfillment_id} also accepts optional expected_version. Use it when changing mutable fields such as the recipient, location, metadata, or external reference.

For a pickup that checkout creates, pickup_details names the store the buyer collects from: location_name, address, and instructions, which are the pickup instructions of the delivery method the buyer chose. A note the buyer left for the store is in recipient.instructions.

For a shipment or local delivery, recipient.address is the address where that fulfillment will run. When a create request omits recipient, Flint copies the order's delivery_destination and uses the order buyer email. Supplying recipient overrides that default for the new fulfillment. Later recipient changes apply only to that fulfillment.

Physical shipping has three levels below the order. A fulfillment holds one or more shipments, each shipment holds packages, and each package holds items that allocate order line-item quantities to that box. Create and manage item allocations under /v1/packages/{package_id}/items. A shipment can split one fulfillment across multiple parcels without treating package items as unrelated top-level resources.

Carrier tracking belongs to packages. Create a shipment to group one carrier leg, then create one package per physical parcel. Put carrier, service_code, tracking_number, tracking_url, dimensions, weight, and label information on each package, including single-parcel shipments. A shipment can remain empty only as a created draft. Its read-only status and movement timestamps are derived from its package states. Package exceptions dominate the aggregate; otherwise the least advanced active package determines shipment progress. PATCH /v1/shipments/{shipment_id} and POST /v1/shipments/{shipment_id}/void accept optional expected_version; a stale value returns 409 with the current shipment and version.

Fulfillment transitions accept a free-text reason_message for your note. The hold and mark_no_show actions instead require an enum reason. Shipment and package void requests also accept reason_message.

Packages publish their own supported_actions. Send one of those values to POST /v1/packages/{package_id}/transitions. Package actions are mark_packed, mark_shipped, mark_in_transit, mark_out_for_delivery, mark_delivered, mark_delivery_attempted, mark_exception, and mark_returned. Each package transition accepts optional reason_message, occurred_at, buyer_notification_behavior, and expected_version. PATCH /v1/packages/{package_id} and POST /v1/packages/{package_id}/void also accept optional expected_version. Voiding a package remains a separate operation.

A shipment also has a direction. Outbound is the default and carries goods to the buyer. A return shipment carries them back: set direction to return, then provide return_id and return_line_items, each allocating a whole-number quantity against a return_line_item_id on that Return. The two shapes do not mix. Direction is fixed at creation. List shipments by return_id to find the inbound leg for a return.

Send carrier and 3PL facts to POST /v1/fulfillments/{fulfillment_id}/events. Set shipment_id or package_id when the fact applies to a nested resource. Events accept observational types such as shipped, in_transit, out_for_delivery, delivered, delivery_attempted, tracking_updated, exception, returned, and custom. Use external_event_id for idempotent carrier ingestion, with external_system, external_status, occurred_at, and location details for provenance.

GET /v1/fulfillment-events is the pollable record of the same fulfillment event stream delivered by webhooks. Filter it by order_id, fulfillment_id, shipment_id, package_id, or event_type. Status-change events include previous_status, current_status, quantity_effect, and created_at. Caller notes appear in reason_message; hold and mark_no_show codes appear in the enum reason.

GET /v1/fulfillment-notifications is the buyer-email audit. It records whether each fulfillment email is pending, sent, failed, or suppressed. It is not another status timeline.

Note:

A package transition such as mark_delivered records carrier progress. It does not complete the fulfillment. Use the fulfillment's complete action when the merchant accepts that the obligation is discharged.

Order-level fulfillment_status distinguishes not_applicable for orders with nothing to fulfill and closed for obligations resolved through a mix of completed and canceled quantities.

Fulfillment also consumes inventory. Stock committed when an order is paid stays physically on hand until the handoff event for that fulfillment type. Canceling before handoff releases the claim without moving stock, and a refund alone never restocks anything. Returned units re-enter stock through Return operations.

Configure delivery methods and quote buyer choices in Delivery configuration.

Fulfillment webhooks omit recipient. Read fulfillment.resource_url from the webhook and fetch the fulfillment when your OMS or 3PL needs the address.

Terminal transition time#

Fulfillment reads and lifecycle webhook snapshots include terminal_at after the fulfillment enters a terminal state: completed, canceled, or failed. It records the terminal state transition and remains unchanged by later edits. completed_at is separate completion evidence, such as the delivery time, and can differ from terminal_at.

The Fulfillment record object#

Every field on a fulfillment record, as returned by retrieve and carried by the endpoints below.

Attributes

buyer_notification_behaviorenumRequired

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging.

  • send
  • suppress
created_atstring

Timeline entry creation timestamp.

current_statusenum
  • pending
  • on_hold
  • in_progress
  • ready
  • completed
  • canceled
  • failed
  • scheduled
  • accepted
  • preparing
  • picked
  • packed
  • dispatched
  • no_show
  • created
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • exception
  • returned
  • voided
custom_detailsmap of string
event_typeenumRequired
  • status_changed
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • tracking_updated
  • exception
  • returned
  • custom
external_event_idstring
external_statusstring
external_systemstring
fulfillment_event_idstringRequired
fulfillment_idstringRequired
location_descriptionstring
messagestring
occurred_atstring

Provider event timestamp.

orderobject or null
order_idstringRequired
package_idstring
previous_statusenum
  • pending
  • on_hold
  • in_progress
  • ready
  • completed
  • canceled
  • failed
  • scheduled
  • accepted
  • preparing
  • picked
  • packed
  • dispatched
  • no_show
  • created
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • exception
  • returned
  • voided
quantity_effectenum
  • preserve
  • fulfill
  • release
reasonenum
  • address_issue
  • customer_no_show
  • customer_request
  • fraud_review
  • inventory_issue
  • location_unavailable
  • other
  • payment_review
  • provider_issue
  • provider_no_show
  • scheduling_error
  • scheduling_issue
reason_messagestring

The note supplied when this action was requested.

received_atstring

Flint receive timestamp.

shipment_idstring
subject_typeenumRequired
  • fulfillment
  • shipment
  • package
JSON
{
  "buyer_notification_behavior": "send",
  "created_at": "2026-05-13T18:30:01Z",
  "custom_details": {
    "provider_carrier": "ups"
  },
  "event_type": "tracking_updated",
  "external_event_id": "evt_9a41c7",
  "external_status": "in_transit",
  "external_system": "shippo",
  "fulfillment_event_id": "fev_01ABCDEFGHIJKLMNOPQRSTUVWX",
  "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
  "message": "Departed carrier facility.",
  "occurred_at": "2026-05-13T18:30:00Z",
  "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
  "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
  "received_at": "2026-05-13T18:30:01Z",
  "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
  "subject_type": "package"
}

List fulfillment events#

GET/v1/fulfillment-events

Requires scope commerce.orders.read or commerce.orders.write

Lists provider-neutral fulfillment events. Results default to newest received first.

Query parameters

fulfillment_idstring

Optional fulfillment ID filter.

shipment_idstring

Optional shipment ID filter.

package_idstring

Optional package ID filter.

order_idstring

Optional order ID filter.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

event_typeenum

Filter by fulfillment event type.

  • accepted
  • preparing
  • picked
  • packed
  • ready
  • shipped
  • dispatched
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • tracking_updated
  • exception
  • returned
  • completed
  • canceled
  • failed
  • no_show
  • custom
external_systemstring

Filter by external system identifier.

external_event_idstring

Filter by external provider event ID.

occurred_afterstring

RFC3339 lower bound for occurred_at.

occurred_beforestring

RFC3339 upper bound for occurred_at.

sort_byenum

Sort field. Defaults to received_at.

  • received_at
  • occurred_at

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/fulfillment-events \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "buyer_notification_behavior": "send",
      "created_at": "2026-05-13T18:30:01Z",
      "custom_details": {
        "provider_carrier": "ups"
      },
      "event_type": "tracking_updated",
      "external_event_id": "evt_9a41c7",
      "external_status": "in_transit",
      "external_system": "shippo",
      "fulfillment_event_id": "fev_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "message": "Departed carrier facility.",
      "occurred_at": "2026-05-13T18:30:00Z",
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "received_at": "2026-05-13T18:30:01Z",
      "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "subject_type": "package"
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get fulfillment event#

GET/v1/fulfillment-events/{fulfillment_event_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves one provider-neutral fulfillment event by ID.

Path parameters

fulfillment_event_idstringRequired

Flint fulfillment event ID.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/fulfillment-events/fev_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "buyer_notification_behavior": "send",
    "created_at": "2026-05-13T18:30:01Z",
    "custom_details": {
      "provider_carrier": "ups"
    },
    "event_type": "tracking_updated",
    "external_event_id": "evt_9a41c7",
    "external_status": "in_transit",
    "external_system": "shippo",
    "fulfillment_event_id": "fev_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "message": "Departed carrier facility.",
    "occurred_at": "2026-05-13T18:30:00Z",
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "received_at": "2026-05-13T18:30:01Z",
    "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "subject_type": "package"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

List fulfillment notifications#

GET/v1/fulfillment-notifications

Requires scope commerce.orders.read or commerce.orders.write

Returns persisted fulfillment notification audit records. Results default to newest created first.

Query parameters

fulfillment_idstring

Optional fulfillment ID filter.

order_idstring

Optional order ID filter.

fulfillment_event_idstring

Optional fulfillment event ID filter.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

channelenum

Filter by notification channel.

  • email
statusenum

Filter by notification status.

  • pending
  • sent
  • failed
  • suppressed
notification_typeenum

Filter by notification type.

  • fulfillment_canceled
  • fulfillment_completed
  • fulfillment_delivered
  • fulfillment_delivery_attempted
  • fulfillment_dispatched
  • fulfillment_exception
  • fulfillment_failed
  • fulfillment_in_transit
  • fulfillment_no_show
  • fulfillment_out_for_delivery
  • fulfillment_ready
  • fulfillment_returned
  • fulfillment_shipped
  • shipment_delivered
  • shipment_delivery_attempted
  • shipment_exception
  • shipment_in_transit
  • shipment_out_for_delivery
  • shipment_returned
  • shipment_shipped
  • tracking_updated

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/fulfillment-notifications \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "channel": "email",
      "created_at": "2026-05-13T14:30:01Z",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "fulfillment_notification_id": "fnt_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "notification_type": "fulfillment_completed",
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "recipient_email": "buyer@example.com",
      "sent_at": "2026-05-13T14:30:02Z",
      "status": "sent",
      "trigger_type": "fulfillment_status_updated",
      "updated_at": "2026-05-13T14:30:02Z"
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get fulfillment notification#

GET/v1/fulfillment-notifications/{fulfillment_notification_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves one fulfillment notification audit record by ID.

Path parameters

fulfillment_notification_idstringRequired

Flint fulfillment notification ID.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/fulfillment-notifications/fnt_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "channel": "email",
    "created_at": "2026-05-13T14:30:01Z",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "fulfillment_notification_id": "fnt_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "notification_type": "fulfillment_completed",
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "recipient_email": "buyer@example.com",
    "sent_at": "2026-05-13T14:30:02Z",
    "status": "sent",
    "trigger_type": "fulfillment_status_updated",
    "updated_at": "2026-05-13T14:30:02Z"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

List fulfillments#

GET/v1/fulfillments

Requires scope commerce.orders.read or commerce.orders.write

Returns fulfillments for operational queue and order-detail views. Results default to newest created first.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order
order_idstring

Filter by order ID.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search across fulfillment_id and external_reference_id. Also matches an exact order number. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.

statusenum

Filter by the projected value returned in Fulfillment.status. Fulfillments with request_status accepted project to status pending. Fulfillments with outcome.outcome_type no_show project to status failed. A fulfillment with active_hold projects to its public work status from before the hold.

  • pending
  • in_progress
  • ready
  • completed
  • canceled
  • failed
  • scheduled
  • preparing
  • picked
  • packed
  • dispatched
typeenum

Filter by fulfillment type.

  • shipment
  • pickup
  • local_delivery
  • digital
  • service
location_idstring

Filter by assigned Location ID.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

updated_afterstring

Lower bound for updated_at.

updated_beforestring

Upper bound for updated_at.

sort_directionenum

Sort direction for created_at. Defaults to desc.

  • asc
  • desc

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/fulfillments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "completed_at": "2026-05-13T14:30:00Z",
      "created_at": "2026-05-13T09:45:00Z",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "quantity": 1
        }
      ],
      "metadata": {
        "source": "dispatch"
      },
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "request_status": "accepted",
      "status": "completed",
      "supported_actions": [],
      "type": "shipment",
      "updated_at": "2026-05-13T14:30:00Z",
      "version": 4
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get fulfillment#

GET/v1/fulfillments/{fulfillment_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves a single fulfillment by ID.

Path parameters

fulfillment_idstringRequired

Flint fulfillment ID.

Query parameters

expandarray of enum

Supported expansions: order, packages, shipments. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. To-many expansions are capped at 20 related objects per path. Repeat expand, for example expand=order&expand=packages, or pass one comma-separated value.

  • order
  • packages
  • shipments

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/fulfillments/ful_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "completed_at": "2026-05-13T14:30:00Z",
    "created_at": "2026-05-13T09:45:00Z",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "quantity": 1
      }
    ],
    "metadata": {
      "source": "dispatch"
    },
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "request_status": "accepted",
    "status": "completed",
    "supported_actions": [],
    "type": "shipment",
    "updated_at": "2026-05-13T14:30:00Z",
    "version": 4
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update fulfillment#

PATCH/v1/fulfillments/{fulfillment_id}Idempotent

Requires scope commerce.orders.write

Updates mutable fulfillment fields and fulfillment-specific details. Fulfillment line item allocation is set when the fulfillment is created. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

fulfillment_idstringRequired

Flint fulfillment ID.

Request body

Send exactly one of these

Leave out pickup_details, local_delivery_details, digital_details, and service_details.

completed_atstring or null

Completion evidence timestamp. Use only to correct completion evidence on an already completed fulfillment; complete pending fulfillments with POST /transitions.

customer_idstring or null
device_idstring or null
expected_versioninteger

Optional resource version last read by the caller.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

location_idstring or null
metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

recipientobject or null

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X PATCH https://api.withflintpay.com/v1/fulfillments/ful_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 3,
    "location_id": "loc_123",
    "metadata": {
      "stage": "ready"
    }
  }'

Create fulfillment event#

POST/v1/fulfillments/{fulfillment_id}/eventsIdempotent

Requires scope commerce.orders.write

Records an observational event for a fulfillment or one of its shipments or packages.

Path parameters

fulfillment_idstringRequired

Flint fulfillment ID.

Request body

buyer_notification_behaviorenum

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging.

  • send
  • suppress
custom_detailsmap of string
event_typeenumRequired
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • tracking_updated
  • exception
  • returned
  • custom
external_event_idstring
external_statusstring
external_systemstring
location_descriptionstring
messagestring
occurred_atstring

Provider event timestamp.

package_idstring

Nested package associated with this observational event. Flint resolves and validates its shipment and fulfillment ownership.

shipment_idstring

Nested shipment associated with this observational event. Flint validates that it belongs to the fulfillment in the path.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_01ABCDEFGHIJKLMNOPQRSTUVWX/events \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_notification_behavior": "send",
    "custom_details": {
      "facility": "east"
    },
    "event_type": "custom",
    "external_event_id": "evt_7f3df2",
    "external_status": "work_started",
    "external_system": "shippo",
    "message": "The fulfillment partner started work.",
    "occurred_at": "2026-05-13T16:05:00Z",
    "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX"
  }'

Create shipment#

POST/v1/fulfillments/{fulfillment_id}/shipmentsIdempotent

Requires scope commerce.orders.write

Creates a shipment execution record under a shipment-type fulfillment. A shipment groups one carrier leg. Create one package under it for each physical parcel, including single-parcel shipments.

Path parameters

fulfillment_idstringRequired

Flint shipment fulfillment ID.

Request body

Send exactly one of these

Leave out return_id and return_line_items.

directionenum
  • outbound
external_reference_idstring

Caller-owned identifier for this resource in an external system. Caller-owned shipment identifier in external_system. Set with external_system to enable duplicate detection and replay for that provider reference.

external_systemstring

External carrier, aggregator, or fulfillment platform name for this shipment. Set with external_reference_id to enable duplicate detection and replay for that provider reference; without external_reference_id this is stored as provenance only.

metadatamap of string

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_01ABCDEFGHIJKLMNOPQRSTUVWX/shipments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "external_reference_id": "ship_789",
    "external_system": "merchant_wms",
    "metadata": {
      "warehouse": "east"
    }
  }'

Transition fulfillment#

POST/v1/fulfillments/{fulfillment_id}/transitionsIdempotent

Requires scope commerce.orders.write

Performs one action from the fulfillment's supported_actions. Each action accepts only its action-specific fields. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

fulfillment_idstringRequired

Flint fulfillment ID.

Request body

Send exactly one of these

actionenumRequired
  • complete
buyer_notification_behaviorenum
  • send
  • suppress
completed_atstring

RFC3339 timestamp.

expected_versioninteger

Resource version the caller last read.

reason_messagestring

Your note explaining this transition.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_01ABCDEFGHIJKLMNOPQRSTUVWX/transitions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "action": "mark_packed",
    "buyer_notification_behavior": "send",
    "expected_version": 4,
    "occurred_at": "2026-05-13T11:00:00Z"
  }'

Create fulfillment#

POST/v1/orders/{order_id}/fulfillmentsIdempotent

Requires scope commerce.orders.write

Creates an explicit fulfillment for an order.

Path parameters

order_idstringRequired

Flint order ID.

Request body

Send exactly one of these

Leave out pickup_details, local_delivery_details, digital_details, and service_details.

customer_idstring
device_idstring
external_reference_idstring

Caller-owned identifier for this resource in an external system.

line_itemsarray of objectRequired
location_idstring
metadatamap of string
recipientobject
shipmentone of

Creates one outbound shipment and one package atomically with the fulfillment. packaging must be single_package. The package receives the full quantities of only the submitted line_items. Requires type shipment. Omission creates no shipment or package. Tracking does not mark the package shipped. Package tracking notifications are requested when buyer_notification_behavior is omitted; use suppress to prevent buyer messages from this creation.

typeenumRequired
  • shipment
  • pickup
  • local_delivery
  • digital
  • service

Response · 201

Same response as Get fulfillment.

curl -X POST https://api.withflintpay.com/v1/orders/ord_123/fulfillments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "quantity": 1
      }
    ],
    "metadata": {
      "source": "dispatch"
    },
    "shipment": {
      "package": {
        "buyer_notification_behavior": "suppress",
        "carrier": "ups",
        "tracking_number": "1Z999AA10123456784"
      },
      "packaging": "single_package"
    },
    "type": "shipment"
  }'

List packages#

GET/v1/packages

Requires scope commerce.orders.read or commerce.orders.write

Lists package records, newest created first.

Query parameters

shipment_idstring

Optional shipment ID filter.

fulfillment_idstring

Optional fulfillment ID filter.

order_idstring

Optional order ID filter.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

external_systemstring

Filter by external system identifier.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search across package ID, external reference ID, and tracking number. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/packages \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "carrier": "ups",
      "created_at": "2026-05-13T16:01:00Z",
      "dimensions": {
        "height": 4,
        "length": 8,
        "unit": "in",
        "width": 6
      },
      "external_reference_id": "pkg_789",
      "external_system": "merchant_wms",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "metadata": {
        "box": "small"
      },
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "service_code": "ground",
      "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "status": "created",
      "supported_actions": [
        "mark_packed",
        "mark_shipped",
        "mark_in_transit",
        "mark_out_for_delivery",
        "mark_delivered",
        "mark_delivery_attempted",
        "mark_exception"
      ],
      "tracking_number": "1Z999AA10123456784",
      "tracking_url": "https://track.example.com/1Z999AA10123456784",
      "updated_at": "2026-05-13T16:01:00Z",
      "version": 1,
      "weight": {
        "unit": "pound",
        "value": 1.2
      }
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get package#

GET/v1/packages/{package_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves one package by ID.

Path parameters

package_idstringRequired

Flint package ID.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "carrier": "ups",
    "created_at": "2026-05-13T16:01:00Z",
    "dimensions": {
      "height": 4,
      "length": 8,
      "unit": "in",
      "width": 6
    },
    "external_reference_id": "pkg_789",
    "external_system": "merchant_wms",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "metadata": {
      "box": "small"
    },
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "service_code": "ground",
    "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "status": "created",
    "supported_actions": [
      "mark_packed",
      "mark_shipped",
      "mark_in_transit",
      "mark_out_for_delivery",
      "mark_delivered",
      "mark_delivery_attempted",
      "mark_exception"
    ],
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": "https://track.example.com/1Z999AA10123456784",
    "updated_at": "2026-05-13T16:01:00Z",
    "version": 1,
    "weight": {
      "unit": "pound",
      "value": 1.2
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update package#

PATCH/v1/packages/{package_id}Idempotent

Requires scope commerce.orders.write

Updates non-lifecycle package fields such as carrier, tracking, label access, measurements, metadata, and caller-owned external references. Package status cannot be patched directly. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

package_idstringRequired

Flint package ID.

Request body

buyer_notification_behaviorenum

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging.

  • send
  • suppress
carrierstring or null
dimensionsobject or null
expected_versioninteger

Optional resource version last read by the caller.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Caller-owned package identifier in external_system. Set with external_system to enable duplicate detection and replay for that provider reference.

external_systemstring or null

External carrier, aggregator, or fulfillment platform name for this package. Set with external_reference_id to enable duplicate detection and replay for that provider reference; without external_reference_id this is stored as provenance only.

label_urlstring or null

Merchant or integration supplied HTTPS shipping-label URL for authenticated merchant workflows. Non-Flint URLs must include external_system for provenance. Flint does not currently manage label file hosting or buyer-facing label downloads.

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

service_codestring or null
status_reasonstring or null
tracking_numberstring or null
tracking_urlstring or null

Absolute HTTPS carrier tracking URL. Embedded URL credentials are rejected.

weightobject or null

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X PATCH https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_notification_behavior": "send",
    "expected_version": 1,
    "metadata": {
      "box": "small",
      "packed_by": "warehouse-a"
    },
    "tracking_number": "1Z999AA10987654321",
    "tracking_url": "https://track.example.com/1Z999AA10987654321"
  }'

List package items#

GET/v1/packages/{package_id}/items

Requires scope commerce.orders.read or commerce.orders.write

Lists order line quantities contained in packages.

Path parameters

package_idstringRequired

Flint package ID.

Query parameters

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/items \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-05-13T16:02:00Z",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "metadata": {
        "slot": "A"
      },
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "order_line_item_id": "li_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "package_item_id": "pki_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "quantity": 1,
      "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "updated_at": "2026-05-13T16:02:00Z"
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Create package item#

POST/v1/packages/{package_id}/itemsIdempotent

Requires scope commerce.orders.write

Adds an order line quantity to a package. Total active package item quantities cannot exceed the parent fulfillment line-item quantity.

Path parameters

package_idstringRequired

Flint package ID.

Request body

metadatamap of string
order_line_item_idstringRequired
quantityintegerRequired

Whole-number quantity; fractional quantities are not supported.

Response · 201

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/items \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "metadata": {
      "slot": "A"
    },
    "order_line_item_id": "li_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "quantity": 1
  }'

Get package item#

GET/v1/packages/{package_id}/items/{package_item_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves one package item by ID.

Path parameters

package_idstringRequired

Flint package ID.

package_item_idstringRequired

Flint package item ID.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order

Response · 200

Same response as Create package item.

curl https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/items/pki_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "created_at": "2026-05-13T16:02:00Z",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "metadata": {
      "slot": "A"
    },
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "order_line_item_id": "li_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "package_id": "pkg_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "package_item_id": "pki_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "quantity": 1,
    "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "updated_at": "2026-05-13T16:02:00Z"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update package item#

PATCH/v1/packages/{package_id}/items/{package_item_id}Idempotent

Requires scope commerce.orders.write

Updates a package item quantity or metadata while the package is still mutable.

Path parameters

package_idstringRequired

Flint package ID.

package_item_idstringRequired

Flint package item ID.

Request body

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

quantityinteger

Whole-number quantity; fractional quantities are not supported.

Response · 200

Same response as Create package item.

curl -X PATCH https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/items/pki_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "metadata": {
      "slot": "B"
    },
    "quantity": 1
  }'

Delete package item#

DELETE/v1/packages/{package_id}/items/{package_item_id}Idempotent

Requires scope commerce.orders.write

Removes an order line quantity from a package while the package is still mutable.

Path parameters

package_idstringRequired

Flint package ID.

package_item_idstringRequired

Flint package item ID.

Response · 200

Same response as Create package item.

curl -X DELETE https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/items/pki_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Transition package#

POST/v1/packages/{package_id}/transitionsIdempotent

Requires scope commerce.orders.write

Performs one action from the package's supported_actions. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

package_idstringRequired

Flint package ID.

Request body

Send exactly one of these

actionenumRequired
  • mark_delivered
buyer_notification_behaviorenum
  • send
  • suppress
expected_versioninteger

Resource version the caller last read.

occurred_atstring

RFC3339 timestamp.

reason_messagestring

Your note explaining this transition.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/transitions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "action": "mark_out_for_delivery",
    "buyer_notification_behavior": "send",
    "expected_version": 3
  }'

Void package#

POST/v1/packages/{package_id}/voidIdempotent

Requires scope commerce.orders.write

Voids a package before carrier handoff and appends a package timeline event. Voided package items no longer count against fulfillment package allocation capacity. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

package_idstringRequired

Flint package ID.

Request body

buyer_notification_behaviorenum

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging.

  • send
  • suppress
expected_versioninteger

Optional resource version last read by the caller.

occurred_atstring

Void event timestamp.

reason_messagestring

Your note explaining this action.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/packages/pkg_01ABCDEFGHIJKLMNOPQRSTUVWX/void \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_notification_behavior": "suppress",
    "expected_version": 1,
    "occurred_at": "2026-05-13T16:09:00Z",
    "reason_message": "Package was repacked before pickup."
  }'

List shipments#

GET/v1/shipments

Requires scope commerce.orders.read or commerce.orders.write

Lists shipment execution records, newest created first.

Query parameters

order_idstring

Optional order ID filter.

fulfillment_idstring

Optional fulfillment ID filter.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

external_systemstring

Filter by external system identifier.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search across shipment ID, external reference ID, and tracking number. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.

return_idstring

Filter by linked Return ID.

handed_off_afterstring

RFC3339 lower bound for handed_off_at.

handed_off_beforestring

RFC3339 upper bound for handed_off_at.

created_afterstring

RFC3339 lower bound for created_at.

created_beforestring

RFC3339 upper bound for created_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/shipments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-05-13T15:59:00Z",
      "direction": "outbound",
      "external_reference_id": "ship_789",
      "external_system": "merchant_wms",
      "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "metadata": {
        "warehouse": "east"
      },
      "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "package_count": 1,
      "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
      "shipped_at": "2026-05-13T16:10:00Z",
      "status": "shipped",
      "updated_at": "2026-05-13T16:10:01Z",
      "version": 4
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get shipment#

GET/v1/shipments/{shipment_id}

Requires scope commerce.orders.read or commerce.orders.write

Retrieves one shipment execution record by ID.

Path parameters

shipment_idstringRequired

Flint shipment ID.

Query parameters

expandarray of enum

Supported expansions: order. Expansion requires commerce.orders.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=order&expand=order, or pass one comma-separated value.

  • order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/shipments/shp_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "created_at": "2026-05-13T15:59:00Z",
    "direction": "outbound",
    "external_reference_id": "ship_789",
    "external_system": "merchant_wms",
    "fulfillment_id": "ful_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "metadata": {
      "warehouse": "east"
    },
    "order_id": "ord_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "package_count": 1,
    "shipment_id": "shp_01ABCDEFGHIJKLMNOPQRSTUVWX",
    "shipped_at": "2026-05-13T16:10:00Z",
    "status": "shipped",
    "updated_at": "2026-05-13T16:10:01Z",
    "version": 4
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update shipment#

PATCH/v1/shipments/{shipment_id}Idempotent

Requires scope commerce.orders.write

Updates shipment metadata and caller-owned external references. Shipment status is derived from package statuses and cannot be patched directly. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

shipment_idstringRequired

Flint shipment ID.

Request body

expected_versioninteger

Optional resource version last read by the caller.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Caller-owned shipment identifier in external_system. Set with external_system to enable duplicate detection and replay for that provider reference.

external_systemstring or null

External carrier, aggregator, or fulfillment platform name for this shipment. Set with external_reference_id to enable duplicate detection and replay for that provider reference; without external_reference_id this is stored as provenance only.

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X PATCH https://api.withflintpay.com/v1/shipments/shp_01ABCDEFGHIJKLMNOPQRSTUVWX \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1,
    "metadata": {
      "route": "A7",
      "warehouse": "east"
    }
  }'

Create package#

POST/v1/shipments/{shipment_id}/packagesIdempotent

Requires scope commerce.orders.write

Creates a package record under a shipment. Change package status with POST /v1/packages/{package_id}/transitions; this endpoint records package-level carrier, tracking, label, measurement, and external correlation fields.

Path parameters

shipment_idstringRequired

Flint shipment ID.

Request body

buyer_notification_behaviorenum

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging. On create, tracking fields also record an initial tracking_updated fulfillment event; tracking PATCH requests always record tracking_updated events.

  • send
  • suppress
carrierstring
dimensionsobject
external_reference_idstring

Caller-owned identifier for this resource in an external system. Caller-owned package identifier in external_system. Set with external_system to enable duplicate detection and replay for that provider reference.

external_systemstring

External carrier, aggregator, or fulfillment platform name for this package. Set with external_reference_id to enable duplicate detection and replay for that provider reference; without external_reference_id this is stored as provenance only.

label_urlstring

Merchant or integration supplied HTTPS shipping-label URL for authenticated merchant workflows. Non-Flint URLs must include external_system for provenance. Flint does not currently manage label file hosting or buyer-facing label downloads.

metadatamap of string
return_line_itemsarray of object

Required for a package on a return shipment: allocates quantities from the shipment's return_line_items to this parcel. Rejected on outbound shipments.

service_codestring
status_reasonstring
tracking_numberstring
tracking_urlstring

Absolute HTTPS carrier tracking URL. Embedded URL credentials are rejected.

weightobject

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/shipments/shp_01ABCDEFGHIJKLMNOPQRSTUVWX/packages \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_notification_behavior": "send",
    "carrier": "ups",
    "dimensions": {
      "height": 4,
      "length": 8,
      "unit": "in",
      "width": 6
    },
    "external_reference_id": "pkg_789",
    "external_system": "merchant_wms",
    "metadata": {
      "box": "small"
    },
    "service_code": "ground",
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": "https://track.example.com/1Z999AA10123456784",
    "weight": {
      "unit": "pound",
      "value": 1.2
    }
  }'

Void shipment#

POST/v1/shipments/{shipment_id}/voidIdempotent

Requires scope commerce.orders.write

Voids a shipment before carrier handoff and voids all child packages that have not shipped. The action appends timeline events for the shipment and affected packages. expected_version is optional and rejects a stale resource version when supplied.

Path parameters

shipment_idstringRequired

Flint shipment ID.

Request body

buyer_notification_behaviorenum

Controls buyer email handling. Omit or use send to send when recipient, template, and deduplication rules allow it. Use suppress when another system owns buyer messaging.

  • send
  • suppress
expected_versioninteger

Optional resource version last read by the caller.

occurred_atstring

Void event timestamp.

reason_messagestring

Your note explaining this action.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/shipments/shp_01ABCDEFGHIJKLMNOPQRSTUVWX/void \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_notification_behavior": "suppress",
    "expected_version": 2,
    "occurred_at": "2026-05-13T16:08:00Z",
    "reason_message": "Label canceled before carrier pickup."
  }'

Was this helpful?