A fulfillment provider ships orders for a store, for example as a warehouse or a shipping aggregator. The merchant assigns your app to one or more locations; each order those locations fulfil reaches your app as a fulfillment order. Your app ships it, then creates the fulfillment, records tracking events and cancels through the Store API. Tringify doesn't call your app directly for fulfillment.
Declare it#
{
"data_subscribed_events": [
"fulfillment_orders/create",
"fulfillment_orders/cancelled",
"orders/cancelled",
"orders/edited"
],
"providers": [
{
"endpoints": {},
"operations": [
"list_assigned_orders",
"create_fulfillment",
"record_fulfillment_event",
"update_fulfillment_tracking",
"cancel_fulfillment"
],
"protocol_version": "1",
"service_type": "fulfillment",
"supports_test_mode": false
}
],
"store_scopes": [
"read_orders",
"write_orders"
],
"webhook_url": "https://example.app/webhooks"
}
Operation |
What it covers |
Store API |
Declaration |
|---|---|---|---|
|
Read fulfillment orders assigned to this app. |
Required |
|
|
Create shipments beneath assigned fulfillment orders. |
|
Required |
|
Record canonical carrier events for assigned shipments. |
|
Required |
|
Change the tracking number, link or carrier of shipments owned by this provider. |
Optional; needs |
|
|
Cancel shipments owned by this provider. |
Required |
Operations have no endpoints. Merchants can assign your app only while the release they installed has this declaration approved in review, both scopes granted, a webhook URL and a subscription to fulfillment_orders/create. Subscribe to fulfillment_orders/cancelled, orders/cancelled and orders/edited too, so you hear about work you must stop or change.
Change tracking (update_fulfillment_tracking) is optional, and stays optional: many carriers can't change the tracking of a shipment once it is booked. Declare it only if your app changes a shipment's tracking number, link or carrier in place; otherwise cancel the fulfillment and create a new one. Every other operation is required.
How a store uses it#
In Store Admin, under Settings → Fulfillment → Fulfillment providers, the merchant chooses a provider for each location. New orders' fulfillment orders at that location are assigned to your app; existing ones keep the provider they had. A location your app manages itself (an app-managed location) is always fulfilled by your app; the merchant can't assign it another provider.
One app can be the provider for several locations, and an order can draw stock from more than one of them. Tringify plans one fulfillment order per location, so expect several fulfillment orders for the same order: each arrives with its own fulfillment_orders/create, ships from its own location's address and needs its own fulfillment. Whether an order splits follows the store's routing setting (location priority or fewer shipments, and whether an order may use several locations).
When your app receives a fulfillment order#
Tringify sends a fulfillment order only once its order is ready to fulfil (paid, or placed with cash on delivery, pay later, by staff or fully covered), never while payment is still pending, and only once. The order's status label plays no part: a merchant setting Processing by hand sends nothing, and a label they chose before payment holds nothing back.
At that moment Tringify checks your app again: still installed and ready, both scopes granted, and the approved declaration, webhook URL and subscription in the installed release. If any is missing, the fulfillment order goes to the merchant, its order history says why, and your app never receives it.
Stores that take only test orders, such as development stores, never send fulfillment orders to providers. On a live store, a test order is sent with
is_test: true; don't buy a real label for it.fulfillment_orders/createarrives with the fulfillment order and its lines.
Reconcile instead of relying on webhooks#
A webhook can arrive late, twice, out of order or, after repeated failures, not at all. Your own reliability is your app's job: make GET /fulfillment-orders the source of truth and treat webhooks as a prompt to look sooner.
On a schedule, every few minutes, scan
status=openwithoutupdated_since. Follownext_cursorwhilehas_nextis true; each page holds up to 100 fulfillment orders with their lines. Bound each run and persist its cursor when it needs more time.Create work for every fulfillment order you haven't processed yet, keyed by its
id, so a webhook and a reconcile run never create it twice. Never recreate withdrawn work.Start another full scan after completing every page. You may use
updated_sincefor extra incremental passes, but keep recurring full scans: a recent update can appear later than any fixed overlap allows.A plan missing from
GET /orders/{id}may not be visible yet: retry without cancelling its job or spending its retry budget. A cancellation webhook or a listed closed plan provides withdrawal evidence; absence alone does not. Full scans must recover unsubmitted jobs cancelled only because of a missing plan, while keeping your record of cancellations and checking provider ownership.Your app sees only the fulfillment orders it was sent. One the merchant took back no longer appears. Keep a record of every cancellation even if creation has not arrived, and check the current plan’s
provider_app_idbefore booking a shipment.status=cancelledfinds cancelled plans still assigned to your app; it does not list plans taken back by the merchant.
Ship an order#
Read the order for its address, payment and package details with
GET /orders/{id}.When you ship, create a fulfillment under that fulfillment order with the items, carrier, tracking number and tracking URL. Once the order has been edited, send
order_versionso you never ship contents you haven't seen.As the carrier reports progress, record fulfillment events with a stable
source_event_id, one at a time or up to 50 per batch.If the tracking number, link or carrier changes, change the tracking instead of creating another fulfillment.
If a shipment won't go ahead, cancel the fulfillment.
Your app can see and act on only the fulfillment orders assigned to it. Use display_id, such as #1042-1, on labels and in your dashboard.
When you can't fulfill it#
If you can't ship a fulfillment order you were sent (your supplier is out of stock, the address is wrong or can't be delivered to, or the product isn't one you can fulfill), reject it with a reason and, if useful, a message for the merchant, instead of leaving it open. You can reject only while nothing beneath it is fulfilled. It goes back to the merchant like Fulfill manually: it leaves your fulfillment order list, your app can no longer fulfill it, and the merchant sees your reason on the order, gets a Problem on an order notification and finds it under the Problem filter Rejected by a fulfillment app. Rejecting it again returns the recorded rejection. You receive no fulfillment_orders/cancelled for your own rejection.
If you also manage the location's stock, set the stock you actually have with POST /inventory/adjustments at the same time, so the store stops selling what you can't supply. A count below what is already sold is held at that amount and reported as oversold_quantity: those are the orders you'll reject.
When a fulfillment order is taken away#
fulfillment_orders/cancelled tells your app that a fulfillment order it was sent is no longer its to ship. An uninstall withdrawal is queued with the installed recipient before teardown and can arrive after app.uninstalled. Stop work on it, cancel anything you booked with the carrier if you can, and create no fulfillment beneath it; Tringify refuses one. reason says why:
switched_to_manual: the merchant chose to fulfill it themselves.app_uninstalled: the merchant uninstalled your app. You may not receive it, so treatapp.uninstalledthe same way.order_cancelled: the order was cancelled.items_removed: an edit or refund removed all its items.
While a fulfillment order is assigned to your app, the merchant can't fulfill it themselves, in Store Admin or through the Store API, without first taking it back, so you never ship something the merchant shipped too.
Tracking events#
event_type is one of: shipment_created, label_created, pickup_scheduled, pickup_rescheduled, pickup_attempted, pickup_failed, picked_up, in_transit, arrived_at_destination, out_for_delivery, delivery_attempted, delivery_failed, delivered, return_started, return_in_transit, return_arrived, return_out_for_delivery, returned, shipment_cancelled, shipment_failed, shipment_lost, shipment_damaged, shipment_destroyed, shipment_misrouted, shipment_untraceable, exception, ready_for_pickup or customer_picked_up. Events such as picked_up, delivered and returned move the fulfillment's status; the shopper sees them on their order's tracking page.
picked_up is the carrier collecting the parcel from the merchant: the fulfillment becomes in transit and the customer gets the Shipment Sent message. When the customer collects an order from a pickup location, send customer_picked_up instead (after ready_for_pickup). Pickup events apply only to an order with a pickup location, and delivery events only to an order being shipped; an event for the other kind of order stays on the timeline and changes nothing, so no customer message is sent.
Recording the same event again with the same source_event_id is accepted as a duplicate. Reusing a source_event_id with different content is refused with 409, so derive it from everything in the event that can change.
Personalized items#
If an item has files attached by another app, such as print artwork, fetch them with GET …/items/{itemId}/artifacts. Download links last five minutes.
Test#
Development stores never send fulfillment orders to providers. To test end to end, use a live store you control, place an order at a location assigned to your app and pay for it (or choose cash on delivery) so it is ready to fulfil, and cancel the order afterwards. Check that a missed webhook is picked up by your next reconcile run.
Prepare for review#
For a marketplace app, the fulfillment declaration is reviewed with the app release; there is no separate provider submission. Before you submit, check each of these:
The declaration lists every required operation, and
update_fulfillment_trackingonly if your app changes tracking in place.The release grants
read_ordersandwrite_orders, has a webhook URL, and subscribes tofulfillment_orders/create,fulfillment_orders/cancelled,orders/cancelledandorders/edited.A scheduled reconcile run over
GET /fulfillment-orderspicks up work a missed webhook would have started, without creating anything twice.A withdrawn fulfillment order stops your work, even when the withdrawal arrives before the creation, and your app never books a shipment for a plan it no longer owns.
Tracking events carry a stable
source_event_id, and a repeat of the same event is harmless.Test orders (
is_test: true) never buy a real label.app.uninstalledstops every job for that store.Your app's pages and its documentation tell the merchant how to connect their carrier or warehouse account, its privacy policy and terms of service are published and accurate, and your listing has a support email.
With the submission, include: the steps to connect a test account, a recorded end-to-end run on a store you control (order ready to fulfil, fulfillment created, tracking events, cancellation), and how often your reconcile run scans.