Get an order's fulfillment
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/orders/{id}/fulfillmentCosts 1 rate-limit point · Rate limits
Read an order's fulfillment: its Shopify fulfillment status and that of its preorder items, the hold note, split orders and each attributed offer's fulfillment handling.
hold_reason_note is the note Shopify got with the hold, from the offer that caused it; change it on the offer.
Also searched asorder fulfillmentshippinghold statefulfillment holdis the order on holdsplit orders
Path parameters
idstringRequiredThe order, by STOQ's order ID or the Shopify order ID.
Returns
fulfillment_statusstringShopify's fulfillment status for the whole order, lowercased, such as unfulfilled, partially_fulfilled, fulfilled, scheduled or on_hold.
preorder_fulfillment_statusnullState of the fulfillment orders holding the preorder items, the most blocked one first: on_hold, scheduled or open (awaiting fulfillment). Null when nothing is left to fulfill or it hasn't been read from Shopify yet.
hold_reason_notenullThe note Shopify received with the fulfillment hold, from the offer that caused it. Null when no offer on the order holds fulfillments.
holds_applied_atnullWhen STOQ last placed the order's fulfillments on hold (ISO 8601), or null.
shopify_split_order_idsarray of anysShopify order gids of the separate orders STOQ moved preorder items to. Empty when the order wasn't split.
offersarray of objectsThe offers on the order and how each fulfills its items.
Show 2 child attributesHide child attributes
offer_idstringThe offer's id.
handlingstringHow the offer fulfills preorder items: none, hold_all (holds every fulfillment), split_fulfillments (ships in-stock items first) or separate_orders (moves preorder items to their own order).
One ofnonehold_allsplit_fulfillmentsseparate_orders
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe request failed validation.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/preorders/orders/5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30/fulfillment" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/orders/5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30/fulfillment", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/orders/5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30/fulfillment",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/orders/5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30/fulfillment")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"fulfillment_status": "string",
"preorder_fulfillment_status": null,
"hold_reason_note": null,
"holds_applied_at": null,
"shopify_split_order_ids": [
null
],
"offers": [
{
"offer_id": "string",
"handling": "none"
}
]
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Offer not found"
],
"code": "not_found",
"details": [
{
"code": "not_found",
"message": "Offer not found",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}