Orders
The orders placed on the website: what was bought at what price, whom it goes to and where, and how it is paid. The checkout places them on the engine API; here the shop reads them and records what happens to them — :mark_paid, their fulfillments and refunds, :cancel, which gives the units back to the stock — and their statuses follow from those facts.
List orders
Lists the website's orders, the newest first. filter takes status (status = "OPEN"), payment_status (payment_status = "PENDING"), fulfillment_status, return_status (return_status = "RETURN_REQUESTED" — the requests waiting for the shop), dispute_status (dispute_status = "DISPUTE_OPEN" — the disputes to answer), number, email — compared in any case — customer_id, create_time and update_time; order_by takes create_time, update_time, number and total. An order's update_time moves with each fact recorded on it — a payment, a fulfillment, a refund, a return, a dispute, the cancellation — so an outside system, an ERP, reads what changed since its last pass with filter=update_time > "2026-11-12T10:00:00Z"&order_by=update_time.
path Parameters
website_idId of the parent website.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: create_time, number, total, update_time.
filterAIP-160 subset (§8). Filterable: create_time, customer_id, dispute_status, email, fulfillment_status, number, origin, payment_status, return_status, status, update_time. A field outside the list is INVALID_ARGUMENT.
List orders › Responses
One page of orders.
This page of orders, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Get order
An order placed on the website: a cart its visitor checked out, made into what was bought at what price and tax, whom it goes to and where, and how it is paid. The checkout places it on the engine API; here the shop reads it and records what happens to it — :mark_paid, its fulfillments, its refunds, its returns, :cancel — and its status, payment_status, fulfillment_status, return_status and dispute_status follow from those facts and from what its payment provider reports — its disputes. What was bought and its prices never change; an order is never edited or deleted.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get order › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
numberThe website's own number of the order: 1001 for the first placed, one more for each after it, never reused. What the shop, its customer and its letters call the order; number = 1001 finds one.
statusWhere the order is in its life, worked out from its facts after each of them: OPEN while money or units are owed either way; COMPLETED once nothing is outstanding (outstanding_total zero) and every unit not cancelled is sent (fulfillment_status FULFILLED) with no return asked for or open and no dispute open — OPEN again should a later fact undo that; CANCELLED by :cancel, or once refunds took off its last units while none was sent — for good. No method takes it: each records a fact.
payment_statusWhere the money is, worked out from transactions: PENDING — nothing paid yet; AUTHORIZED — held by an online payment, not taken: :capture_payment takes it, :void_payment lets it go; PARTIALLY_PAID, PAID — part or all of current_total received (an order that costs nothing is PAID); PARTIALLY_REFUNDED, REFUNDED — part or all of it given back; VOIDED — cancelled before anything was paid. A paid order cancelled stays PAID, its outstanding_total below zero, until the money of its refund goes back — REFUNDED then.
fulfillment_statusWhere the units are, worked out from the lines' fulfilled_quantity: UNFULFILLED — none sent; PARTIALLY_FULFILLED — some; FULFILLED — every unit not cancelled. It follows the order's fulfillments; :cancel takes only an UNFULFILLED order.
return_statusWhere the goods sent back are, worked out from the order's returns: NO_RETURN — none, or only declined and cancelled ones; RETURN_REQUESTED — the customer asked for one and the shop has not answered; RETURN_IN_PROGRESS — else one is open, its goods on their way back or received; RETURNED — else one is closed. An order with a return asked for or open is not COMPLETED. return_status = "RETURN_REQUESTED" finds the requests waiting for the shop.
dispute_statusWhere the disputes of the order's payments are — a customer's bank disputing a payment at the payment provider, a chargeback — worked out from the order's disputes: NO_DISPUTE — none; DISPUTE_OPEN — one waits for the shop's evidence or for the bank's decision; DISPUTE_LOST — else one was lost, its money taken back (a CHARGEBACK of transactions); DISPUTE_WON — else one was won. An order with a dispute open is not COMPLETED. dispute_status = "DISPUTE_OPEN" finds the disputes to answer, in the payment provider's dashboard.
originWhere the order comes from: CHECKOUT — a cart its visitor checked out on the website, cart_id that cart; DRAFT_ORDER — a draft order a user of the account put together and completed, draft_order_id that draft. origin = "DRAFT_ORDER" finds the orders the shop placed itself.
create_actorWho placed the order: {type, id?} — type CUSTOMER for an order of a checkout, id the signed-in customer's and absent for a guest's; USER and id the user of the account who completed the draft order.
customer_idThe website's customer the order is of — who placed it signed in, or whom the draft order was made for; absent on a guest's order.
emailThe address the order's letters go to, lowercased as the checkout took it; a filter on it compares in any case — email = "Ana@Example.com" finds ana@example.com.
display_nameThe name of the customer who placed the order.
shipping_addressWhere the order goes and to whom: {recipient_name, organization?, country_code, region?, sublocality?, city?, postal_code?, address_line1, street_number?, address_line2?, phone?}, the country as ISO 3166-1 alpha-2, the rest as the customer typed it and the country's address format took it (address_formats/{country_code}): region the code of one of its regions where it lists them, a part absent where the address has none — city and postal_code too. recipient_name is the person to deliver to, always there — the order's display_name when the checkout named nobody else; organization their company; sublocality the district within the city; street_number the house number where the address names it apart from the street (address_line1 is then the street alone); phone a number to reach them on, when the checkout was given one.
billing_addressWhom and where the order is billed to — the name and the address for the invoice — always there and of the same parts as shipping_address. The address the customer gave apart at the checkout, where checkout.billing_address_mode lets them; else a copy of shipping_address made out to the order's display_name, without the phone (billing_same_as_shipping).
billing_same_as_shippingTrue when billing_address is the copy of shipping_address the checkout made: the customer gave no billing address apart. False, they gave one, whatever it says.
noteWhat the customer added for the shop at the checkout, when they did.
staff_noteWhat the shop's users wrote on the order for each other, at most 2,000 characters — the customer never sees it. Absent when nobody wrote one.
payment_methodHow the customer chose to pay at the checkout: a code of checkout.payment_methods — BANK_TRANSFER, CASH_ON_DELIVERY, or an online one of a payment provider the website connected, which the customer pays on the provider's page (payment_sessions). Every payment :mark_paid records is by it.
payment_due_timeUntil when an order paid by an online way to pay waits for its payment: placed plus checkout.payment_window_minutes as it was then. Its customer opens payment sessions until then; unpaid, the platform cancels it after — never one whose payment is held (AUTHORIZED) or still worked on at the provider. Absent on an order paid offline, and once its hold was let go of (:void_payment): the platform cancels it no more. Set anew when a payment the provider was working on is refused after all: the refusal's time plus the window.
payment_uriThe link the customer pays the order by: the page of the website's storefront, in the order's view, where they see what they pay for and go on to the payment provider — signed in or not, nothing else asked. There on an order of a draft order paid online while it waits for its payment — not cancelled, something outstanding, no payment of it held or on its way at the provider, before its payment_due_time. Absent on every other order, and while the website has no address. Whoever holds it can pay the order and see its lines: send it to the customer alone.
tax_idThe customer's tax number, where checkout.tax_id_requirement asked for one and they gave it — the buyer's number an invoice or an NF-e names: {type, value}. type is the server's, by the country of billing_address: BR_CPF (11 digits) or BR_CNPJ (14 letters and digits) in Brazil, their check digits verified; EU_VAT in a country of the European Union and GB_VAT in the United Kingdom, the country's prefix and 2 to 12 letters and digits; OTHER elsewhere, at most 40 characters. value is kept without dots, hyphens, slashes and spaces, in capitals. Absent when the order has none.
linesWhat was bought, a copy of the cart's lines at the checkout: [{id, variant_id, product_id, sku, display_name, variant_options, quantity, fulfilled_quantity, cancelled_quantity, returned_quantity, unit_price, regular?, price_override?, line_total, tax_rate?, tax_amount?, refunded_amount, weight?}] — the product's name and the variant's values as the order's view named them, and the prices and the tax then, none of it changed when the catalog or the rates are. price_override {reason?} marks a line whose price a user of the shop set by hand in the order's draft: unit_price is that price — zero for a line given away — regular the catalog's beside it, and reason why, when the user said; it is absent on a line priced by the catalog, and the customer never reads it. tax_rate and tax_amount are absent on a line that was not taxed. id is the cart line's the line was copied from, 8 characters, and names the line within the order. fulfilled_quantity is how many of its units were sent and cancelled_quantity how many will not be — both 0 as placed; a fulfillment sends units of it and its cancellation gives them back to what is left to send, :cancel cancels every unit not sent, and a refund cancels the units it takes back. returned_quantity is how many of the units sent came back — a return's :receive counts them — and refunded_amount what the order's refunds gave back of line_total — never more than it — 0 and zero as placed. weight is one unit's weight as the cart last priced the line, a decimal string in the website's unit of weight (general.catalog.weight_unit), absent for a variant without one.
subtotalWhat the lines come to: the sum of their line_total, a google.type.Money in the order's currency.
shipping_totalWhat the way to ship costs, a google.type.Money in the order's currency: the amount of shipping as the checkout took it — in total, its tax in tax_total. Absent on an order of a website that did not ship.
shippingHow the order ships — the way to ship its customer chose at the checkout, copied from the cart's offer then and never quoted again: {method, provider, display_name, description?, delivery_days_min?, delivery_days_max?, tax_rate?, tax_amount?, refunded_amount}. method is the code of the way, <provider>:<method> — what the checkout was sent as shipping_method; provider the shipping provider's id; display_name and description as the provider named it in the language of the order's view; delivery_days_min and delivery_days_max the days to deliver it gave, when it gave them. tax_rate (a percentage as a decimal string) and tax_amount are what the shipping paid — the rate of the destination's country for checkout.shipping_tax_class_id — absent when it was not taxed; refunded_amount is what the order's refunds gave back of shipping_total — their shipping_amount — zero as placed, all of it once :cancel cancelled the order. An order of a draft given its own shipping (the draft's custom_shipping) ships by manual:custom of the provider manual, under the name the shop gave it, on a website that ships nothing too. Absent on any other order of a website that did not ship.
totalWhat the order costs: subtotal + shipping_total + tax_total when the tax came on top of the prices, subtotal + shipping_total when they held it. order_by=total desc sorts by the whole Money — its currency's code first, the amount within each currency.
current_totalWhat the order costs now, a google.type.Money: total less the total of each of its refunds — zero once :cancel cancelled it, its refund giving back everything left, the shipping too.
paid_totalWhat the shop has received: the SALE and CAPTURE transactions that SUCCEEDED, a google.type.Money.
refunded_totalWhat the shop has given back: the REFUND transactions that SUCCEEDED, and the CHARGEBACK ones — money a payment provider took back for a dispute the shop lost — a google.type.Money.
outstanding_totalWhat is still owed: current_total − paid_total + refunded_total, a google.type.Money. Above zero the customer owes it — what :mark_paid without a body records; below zero the shop owes it back — a paid order cancelled, a refund whose money has not gone back yet — units and nanos both negative then.
provider_refundable_totalHow much can still be given back to the customer through the payment providers, a google.type.Money: for each SALE and CAPTURE of a provider that SUCCEEDED, its amount less the REFUND and CHARGEBACK transactions of it (parent_id) that did not fail — one still PENDING counts, its money is on its way back. Zero for an order paid offline: money the shop recorded with :mark_paid goes back past the platform.
tax_country_codeThe country the order's tax went by, ISO 3166-1 alpha-2: the country of its shipping_address.
prices_include_taxWhether the order's prices held the tax already: the mode of its market at the checkout. False, the tax came on top of them.
tax_linesThe tax of the lines and of the shipping by name and rate, the highest rate first, a copy of the cart's at the checkout: [{display_name, rate, amount}], rate a percentage as a decimal string. Empty when nothing was taxed; changing a rate later changes nothing here.
tax_totalThe tax of the order: the sum of its lines' tax_amount and the shipping's, a google.type.Money, zero when nothing was taxed.
currency_codeThe currency of every amount of the order: its cart's when it was checked out — the currency of the market the order was placed on.
view_idThe view of the website the order was placed on — its cart's.
market_idThe market the order was placed on — websites/{website}/catalog_markets/{market_id}, its cart's at the checkout — empty when its view named no market. It never changes after, whatever happens to the market.
cart_idThe cart the order was made of, websites/{website}/carts/{cart_id} — there on an order of the website's checkout (origin CHECKOUT), whose second checkout of that cart answers this order; absent on one of a draft order.
draft_order_idThe draft order the order was completed from — there on an order of origin DRAFT_ORDER, absent on one of the website's checkout.
cancel_reasonWhy the order was cancelled: the reason the shop gave :cancel, when it gave one, or Payment was not received in time when the platform cancelled it unpaid at its payment_due_time.
cancel_timeWhen the order was cancelled; absent on an order not cancelled.
cancel_actorWho cancelled the order: {type, id?} — type USER and id the user of the account who called :cancel, or SYSTEM, no id, when the platform cancelled an order paid online that was still unpaid at its payment_due_time. Absent on an order not cancelled.
transactionsThe order's journal of money, the oldest first, each entry recorded once and never changed but for its settling: [{id, kind, status, amount, method, parent_id?, provider?, provider_ref?, provider_uri?, refund_id?, payment_session_id?, dispute_id?, create_time, settle_time?, failure_reason?, expire_time?, actor}]. kind is AUTHORIZATION, CAPTURE, SALE, REFUND, VOID or CHARGEBACK — money a payment provider took back from the shop for a dispute the shop lost; status PENDING, SUCCEEDED or FAILED: a PENDING transaction waits for its provider and is settled once — SUCCEEDED or FAILED, settle_time when, and on a refusal failure_reason, the provider's own words, at most 500 bytes — and moves no more; neither PENDING nor FAILED counts in paid_total or refunded_total. amount is a google.type.Money in the order's currency; method the way it was paid, a code of checkout.payment_methods; parent_id the transaction it follows — the SALE or CAPTURE a REFUND or a CHARGEBACK gives back; provider and provider_ref an online payment's provider and its id there; provider_uri the page of the provider's dashboard that shows it, where the provider has one; refund_id the refund of the order whose money a REFUND gave back; payment_session_id the payment session an online payment was made in; dispute_id the dispute of disputes a CHARGEBACK lost; expire_time when the provider lets go of the money an AUTHORIZATION holds, when it said; actor {type, id?} who recorded it. Empty as placed; :mark_paid records a SALE that SUCCEEDED, of the amount paid, by the user who called it (actor.type USER), and a refund's money going back a REFUND of its payout_amount — recorded by the shop, or, sent through the payment provider, one of each payment it is laid over, its parent_id that payment, PENDING until the provider settles it. A payment at the payment provider is a SALE of the amount the provider took, recorded once by its provider_ref and by the provider (actor.type PROVIDER, id the provider) — of a cancelled order too, whose outstanding_total then shows below zero what the shop owes back. A payment the provider only holds — its capture mode MANUAL — is an AUTHORIZATION instead: :capture_payment records its CAPTURE, :void_payment and the order's :cancel its VOID, each with the authorization as parent_id — a CAPTURE's provider_ref the payment the capture made, where the provider names one apart from its hold: what its money is given back and disputed by; one the provider took or let go of by itself — at its dashboard, or when the hold expired — is recorded by the provider. A refund made in the payment provider's dashboard is a REFUND of the payment it gives back, recorded by the provider, of no refund of the order (refund_id absent): outstanding_total grows by it until the shop records a refund, whose payout_amount then comes to zero. A dispute lost is a CHARGEBACK of its amount, recorded by the provider — the CHARGEBACKs of one payment never more than it was: one past it is held to what is left, none written when nothing is. paid_total, refunded_total and payment_status are worked out from it. At most 100.
notification_sentWhether every email about the order has gone out: the two about it being placed — the customer's and the shop's — and the customer's about each fulfillment, each refund and its cancellation, unless notify_customer was false. An order paid online at a payment provider waits for its first payment before the two about it being placed are sent: until then nothing waits, and it reads true. False while one waits; the platform sends it again by itself within the next minutes.
Cancel (order)
Cancels the order while nothing of it was sent: it becomes CANCELLED for good, by a refund of everything left of it, recorded among its refunds — every unit not sent taken off (each line's cancelled_quantity becomes its quantity) and back to the stock of the variants still tracked, and the money left of every line and of the shipping given back, so current_total becomes zero. The cancellation, its refund and the stock go in one transaction, so a cancellation gives back once. The order keeps when (cancel_time) and by whom (cancel_actor, the calling user) it was cancelled; {"reason": "…"}, optional, up to 500 characters, is kept as its cancel_reason and as the refund's reason. An unpaid order's payment_status becomes VOIDED, its refund SUCCEEDED. What was paid is owed back, and payout says how it goes back, as a refund's Create does: DEFERRED — the default — the refund is PENDING, the order stays PAID and its outstanding_total below zero — minus what was paid — until the refund's :mark_paid or :pay; RECORDED — the money went back already, the order's transactions take a REFUND of it, the refund is SUCCEEDED and the order REFUNDED, nothing outstanding; PROVIDER — the money goes back to the customer through the payment provider now, each payment of a provider given back by a REFUND of its own, and once they succeed the order is REFUNDED; past what the payment providers can still give back (provider_refundable_total) it answers FAILED_PRECONDITION REFUND_PROVIDER_AMOUNT, nothing cancelled. The customer is sent the order_cancelled email, with the reason, in the language of the view the order was placed on — unless the body says {"notify_customer": false} — and no email of the refund. An order paid online has its open payment sessions closed at the payment provider, so its customer can no longer pay on a page opened before, and the money a payment provider holds for it — an AUTHORIZATION not captured — is let go of there: a VOID of it joins the transactions, by the platform, at once or, when the provider cannot be reached then, a few minutes later. An order something of which was sent answers FAILED_PRECONDITION ORDER_FULFILLED, a cancelled one ORDER_STATUS, each with the order's status, payment_status and fulfillment_status; one that holds 100 refunds LIMIT; nothing changes, and no email goes. Answers the order as it is after.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Cancel (order) › Request Body optional
Cancel (order) › Responses
The affected resource, or the method’s own response object (§10).
Capture payment (order)
Takes the money a payment provider holds for the order. With the provider set to authorize and capture later (its module's setting of the capture mode, MANUAL), a customer's online payment only holds the money: the order is AUTHORIZED, its transactions hold an AUTHORIZATION and nothing is paid yet. This call asks the provider to take it: without a body all of it — or what is outstanding, when that is less — and {"amount": {"currency_code": "USD", "units": "40"}} that much, in the order's currency, no more than the hold and no more than outstanding_total (INVALID_ARGUMENT on amount otherwise). Taking less lets the rest of the hold go: a hold is taken once. The transactions take a CAPTURE, its parent_id the authorization's, the calling user its actor — SUCCEEDED, and the order PAID or PARTIALLY_PAID. A provider that declines answers FAILED_PRECONDITION PAYMENT_PROVIDER_REFUSED with its reason, the CAPTURE recorded FAILED with the reason as its failure_reason, and the hold left as it was; a provider that cannot be reached answers UNAVAILABLE and nothing is recorded. An order with no hold left — none made, or taken or let go of already — answers FAILED_PRECONDITION NO_AUTHORIZATION; a cancelled one, or one with nothing outstanding, ORDER_STATUS. {"request_id": "…"} makes the call safe to repeat: a repeat answers the order without asking the provider again. Answers the order as it is after.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Capture payment (order) › Request Body optional
Capture payment (order) › Responses
The affected resource, or the method’s own response object (§10).
Mark paid (order)
Records money the shop has received for the order: its transactions take a SALE that SUCCEEDED, by the order's payment_method, with the calling user as its actor. Without a body it is everything outstanding — payment_status becomes PAID and outstanding_total zero; {"amount": {"currency_code": "USD", "units": "40"}} records that much, in the order's currency and no more than outstanding_total (INVALID_ARGUMENT on amount otherwise), and an amount below it leaves the order PARTIALLY_PAID. An order paid after it was sent — cash on delivery — becomes COMPLETED. A cancelled order, or one with nothing outstanding, answers FAILED_PRECONDITION ORDER_STATUS with its status, payment_status and fulfillment_status, and nothing changes. {"request_id": "…"} makes the call safe to repeat: a repeat answers the order without recording the money again. Two calls at once without one record one payment of everything — the other answers ORDER_STATUS, or ABORTED when the order kept changing under it. Answers the order as it is after.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Mark paid (order) › Request Body optional
Mark paid (order) › Responses
The affected resource, or the method’s own response object (§10).
Resend notification (order)
Sends the two emails about the order being placed again now — the customer's confirmation to the order's email, and the shop's own to checkout.owner_notification_email when it is set — from the website's current templates, whatever notification_sent says. The emails of its fulfillments and its cancellation are not sent again here: one still waiting keeps notification_sent = false, and the platform sends it by itself. Takes no body; the state of the order does not matter and does not change. When an email cannot be handed over for sending, it answers UNAVAILABLE and nothing changes: what waited still waits, and the platform tries again by itself within the next minutes. Answers the order as it is after.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Resend notification (order) › Request Body optional
Resend notification (order) › Responses
The affected resource, or the method’s own response object (§10).
Send payment request (order)
Sends the customer the order_payment_request email again now — the order, what it costs, how and by when to pay, and a button to its payment_uri, in the language of the view the order was placed on — from the website's current template. For an order placed from a draft order to be paid online by its link (payment_uri), which the customer is sent once when it is placed unless the draft's :complete said {"notify_customer": false}: this is how the shop sends it later, or again. Takes no body and changes nothing of the order. An order that does not wait for its payment by its link — paid offline or on the storefront, paid, cancelled, its money held or still on its way at the payment provider — answers FAILED_PRECONDITION ORDER_STATUS with the order's status, payment_status and fulfillment_status; one past its payment_due_time PAYMENT_WINDOW_CLOSED — the platform cancels it; a website without an address for the link NO_WEBSITE_ADDRESS. When the email cannot be handed over for sending, it answers UNAVAILABLE. Answers the order.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Send payment request (order) › Request Body optional
Send payment request (order) › Responses
The affected resource, or the method’s own response object (§10).
Void payment (order)
Lets go of the money a payment provider holds for the order, all of it: the transactions take a VOID, its parent_id the authorization's, the calling user its actor, and the order is PENDING again — nothing paid, and no longer cancelled by the platform for want of payment: its payment_due_time goes, and what comes of the order is the shop's to decide. Takes no body but {"request_id": "…"}, which makes the call safe to repeat. A provider that declines answers FAILED_PRECONDITION PAYMENT_PROVIDER_REFUSED, the VOID recorded FAILED; one that cannot be reached UNAVAILABLE, nothing recorded; an order with no hold left FAILED_PRECONDITION NO_AUTHORIZATION. Cancelling the order lets go of its hold by itself. Answers the order as it is after.
path Parameters
website_idId of the parent website.
order_idId of the parent order.
Void payment (order) › Request Body optional
Void payment (order) › Responses
The affected resource, or the method’s own response object (§10).