{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-developer-portal/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Development","owner":"MB"},"seo":{"title":"Norce Commerce - Fetching and retrieving orders","description":"How to fetch order data from Norce Commerce and Norce Checkout after a purchase is completed.","keywords":"technical, guide, shopping, order, checkout, order history, api"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"post-purchase-order-management"},"children":["Post-purchase order management"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once a purchase completes, \"the order\" actually lives in two different places, and which one you should call depends on what you're building."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Norce Checkout (NCO)"]}," owns the live checkout order — the object that exists from the moment checkout starts until the purchase is completed (or abandoned)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Norce Commerce"]}," owns the order once it has been synced over as part of order history — the object used for My Pages, order confirmation emails, ERP export, and support tooling."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you're using ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/working-with-the-nco-purchase-process"},"children":["Norce Checkout"]},", both APIs are relevant at different points in the flow. If you're on the legacy ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/working-with-the-checkout-process"},"children":["Shopping Service checkout"]},", only the Norce Commerce API applies — there is no separate checkout-session order to fetch."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"norce-commerce-order-service"},"children":["Norce Commerce (Order Service)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api-reference/services/orderservice/openapi-v1-read"},"children":["Order Service"]}," is the order-history API: a snapshot of the order as it looked when it was created, plus any DeliveryNotes and Invoices layered on afterwards through process integrations. This is what a \"My orders\" page, customer support tooling, or ERP integration should call."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Base URL:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://{slug}.api-se.norce.tech/commerce"]}," (see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api-reference/services/orderservice/openapi-v1-read"},"children":["Order Service reference"]}," for Playground/Stage equivalents)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication:"]}," OAuth2 client credentials with an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApplicationId"]}," header, same as the other Commerce APIs — see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api-reference/accessing-apis-with-oauth2-accounts"},"children":["Accessing APIs with OAuth2 accounts"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Key endpoints:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Use it to..."},"children":["Use it to..."]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetOrderByNo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fetch a single order by its external order number."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetOrderByBasket"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fetch the order created from a given basket id."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ListOrders3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List orders for a customer or company (B2C and B2B) with paging, filtered by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerId"]},", status, or date range."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ListOrdersByEmail"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List orders for one or more email addresses — useful for guest checkout order history."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SearchOrder"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Look up an order by tracking id, delivery note number, or external order number."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetInvoice"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetInvoiceByNo"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ListInvoices"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fetch invoices linked to an order."]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timing:"]}," An order only exists in Norce Commerce once it has been created there. For NCO-driven checkouts, that happens when the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/adapters/norce-adapter#payments"},"children":["Norce Adapter"]}," completes the payment and pushes the order over — i.e., after the checkout order reaches the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}," state. Calling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetOrderByBasket"]}," right after checkout finishes can return nothing if you call it before that sync has happened."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For broader reporting/filtering needs (e.g. OData-style queries across orders), the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api-reference/query/queryorders/openapi-read"},"children":["Query API's Orders entity set"]}," is also available as a read-only alternative."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"norce-checkout-nco-order-api"},"children":["Norce Checkout (NCO Order API)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/order-overview"},"children":["NCO Order API"]}," manages the live checkout order — cart, customer, payments, shippings, and state — for the duration of the checkout. Use it when you need the order right as checkout completes, e.g. to build your own order confirmation page, or to inspect an in-progress order."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Base URL:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://{slug}.api-se.norce.tech/checkout/order"]}," (see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/how-to-access"},"children":["API Access Overview"]}," for Playground/Stage patterns)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication:"]}," Static provisioned Bearer token plus ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Merchant"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Channel"]}," headers — ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," the OAuth2 flow used by the Commerce APIs. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/how-to-access"},"children":["API Access Overview"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Key endpoint:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v0/checkout/orders/{order_id}"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetCheckoutOrder"]},") — fetch a single checkout order by its id."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v0/checkout/orders"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetCheckoutOrders"]},") — list/search checkout orders for the merchant and channel."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finding the order id:"]}," the checkout order id (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NCOOrderId"]},") is written back onto the Norce Commerce basket as an info type by the Norce adapter once the order exists (see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/developer-portal/app-development/nco/adapters/norce-adapter#norce-commerce-info-types"},"children":["Norce Commerce Info Types"]},"). If you already have a Commerce basket or order and need the corresponding NCO order, read ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NCOOrderId"]}," off it rather than tracking the id separately."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"which-api-should-i-call"},"children":["Which API should I call?"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Right at checkout completion / building a confirmation page:"]}," call the NCO Order API's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetCheckoutOrder"]}," with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," from your checkout session."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order history, My Pages, support tooling, ERP export, anything after the fact:"]}," call the Norce Commerce Order Service — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetOrderByNo"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetOrderByBasket"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ListOrders3"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ListOrdersByEmail"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SearchOrder"]}," depending on what you're looking up by."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Not using Norce Checkout:"]}," only the Norce Commerce Order Service applies; orders are created there directly by the Shopping Service checkout flow."]}]}]},"headings":[{"value":"Post-purchase order management","id":"post-purchase-order-management","depth":1},{"value":"Norce Commerce (Order Service)","id":"norce-commerce-order-service","depth":2},{"value":"Norce Checkout (NCO Order API)","id":"norce-checkout-nco-order-api","depth":2},{"value":"Which API should I call?","id":"which-api-should-i-call","depth":2}],"frontmatter":{"seo":{"title":"Norce Commerce - Fetching and retrieving orders","description":"How to fetch order data from Norce Commerce and Norce Checkout after a purchase is completed.","keywords":"technical, guide, shopping, order, checkout, order history, api"},"metadata":{"redocly_category":"Development","owner":"MB"}},"lastModified":"2026-10-22T16:31:30.617Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-portal/app-development/post-purchase-order-management","userData":{"isAuthenticated":false,"teams":["anonymous"]}}