novinzodevelopers
RPCReferenceOrder access

StorefrontGetOrder

POST/rpc#StorefrontGetOrder

Order pages for guests (signed access links) and signed-in shoppers. Routed to the storefront RPC server by the x-storefront-request: true header. The store is resolved from the merchant domain's Host, so call it through the storefront route POST https://<store-domain>/api/orders/get, which forwards the shopper's cookies. The viewer is the signed-in shopper or a guest holding an order access grant cookie.

Authorization

customerSession
storefront*<token>

Shopper session cookie (name prefix storefront), set by CustomerOtpVerify and managed by the browser.

In: cookie

Header Parameters

x-storefront-request*"true"

Value in

  • "true"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

_tag*"Request"

Value in

  • "Request"
id*string

Correlates the response line with this request.

tag*"StorefrontGetOrder"

Value in

  • "StorefrontGetOrder"
payload*
headers*array<any>

Leave empty; the server prepends the HTTP request headers.

Itemsitems <= 0

Response Body

application/json

curl -X POST "https://$STORE_DOMAIN/api/orders/get" \  -H "Content-Type: application/json" \  -b "$CUSTOMER_SESSION_COOKIE" \  -d '{"orderId":"<uuid>"}'
{  "_tag": "Exit",  "requestId": "string",  "exit": {    "_tag": "Success",    "value": {      "orderId": "string",      "status": "draft",      "buyerStatus": "not_paid",      "customerEmail": "string",      "total": {        "amountMinorUnits": "string",        "currency": "AED"      },      "adjustments": [        {          "type": "discount",          "label": "string",          "amount": {            "amountMinorUnits": "string",            "currency": "AED"          }        }      ],      "createdAt": "string",      "payment": {        "paymentMethod": {          "providerId": "stripe",          "displayName": "string",          "description": "string",          "iconUrl": "string",          "capabilities": {            "canCapture": true,            "canRefund": true,            "canPartialRefund": true,            "requiresManualVerification": true,            "notifications": [              "webhook"            ],            "supportsPreauthorization": true,            "hasApiValidation": true,            "redeemsVouchers": true          }        },        "checkoutSessionId": "string",        "transactionId": "string",        "cryptoInvoice": {          "paymentId": "string",          "status": "pending",          "asset": "btc",          "assetLabel": "string",          "address": "string",          "amountDisplay": "string",          "receivedDisplay": "string",          "overpaidDisplay": "string",          "receivedComparison": "short",          "txIds": [            "string"          ],          "lateSeenAt": "string",          "acceptable": true        }      },      "items": [        {          "productName": "string",          "variantName": "string",          "options": [            {              "name": "string",              "value": "string"            }          ],          "quantity": 1,          "unitPrice": {            "amountMinorUnits": "string",            "currency": "AED"          },          "charges": [            {              "description": "string",              "amount": {                "amountMinorUnits": "string",                "currency": "AED"              }            }          ],          "downloadUrl": "string",          "deliveredKeys": [            {              "value": "string",              "status": "active"            }          ],          "webhookDelivery": {            "status": "pending",            "deliverables": [              "string"            ],            "message": "string"          },          "instructions": "string",          "ships": true,          "deliveryReports": [            {              "id": "string",              "quantity": -9007199254740991,              "label": "string",              "url": "string",              "reportedAt": "string"            }          ],          "oversold": true,          "replacements": [            {              "id": "string",              "variantName": "string",              "options": [                {                  "name": "string",                  "value": "string"                }              ],              "quantity": -9007199254740991,              "status": "held",              "holdExpiresAt": "string",              "label": "string",              "url": "string",              "shippedAt": "string"            }          ]        }      ],      "log": [        {          "id": "string",          "eventType": "order_draft",          "actorType": "system",          "createdAt": "string"        }      ]    }  }}