---
title: "Order Schema"
canonical: "https://red-ant-documentation.refined.site/space/RDD/761921553/Order%20Schema"
format: markdown
---
> Macro (excerpt)
> 
> | **Field (* Required)** | **Definition** | **Format / Additional Info** |
> | --- | --- | --- |
> | `id` | An internal unique order ID |  |
> | `tax` | The tax currency and value | JSON Object |
> | `tax.code` | Currency code for tax | String (e.g., "GBP") |
> | `tax.value` | Tax amount | Number (decimal) |
> | `total` | Total cost of the order | JSON Object |
> | `total.code` | Currency code for tax | String (e.g., "GBP") |
> | `total.value` | Tax amount | Number (decimal) |
> | `subTotal` | Subtotal cost of the order before any discounts or tax are applied | JSON Object |
> | `subTotal.code` | Currency code for tax | String (e.g., "GBP") |
> | `subTotal.value` | Tax amount | Number (decimal) |
> | `totalDiscount` | Total value of discounts being applied to the order | This includes:<br>`code` - The tax currency<br>`value` - The amount |
> | `status` | The state of the order, such as:<br>`pending`  
> `awaiting_payment`  
> `complete`  
> `void`  
> `partial_refund`  
> `full_refund`  
> `cancelled` |  |
> | `orderNumber` | An external order ID | XXXX-XXXXXX-XXXX |
> | `salesChannel` | Defines whether the order was placed in store or during a virtual consultation |  |
> | `orderDate` | Date & time the order was placed including timezone | E.g. 2019-05-23 15:52:22.728+00 |
> | `products` | Details of each product / variant purchased | [Order Product Schema](https://redantdigital.atlassian.net/wiki/spaces/RDD/pages/761921553/Order+Schema#Order-Product-Schema) |
> | `customerId` | Unique ID of the customer the order was placed against |  |
> | `userId` | Unique ID of the user who placed the order |  |
> | `storeId` | Unique ID of the store the user was logged into when the order was placed |  |
> | `orderType` | The type of order, this includes:<br>`standard`  
> `consultation`  
> `referral`  
> `storeroom` (pick from store only) |  |
> | `paymentToken` |  |  |
> | `deletedAt` |  |  |
> | `createdAt` | Date & time the order was created in our database |  |
> | `updatedAt` | Date & time the order was updated in our database |  |
> | `externalOrderId` |  |  |
> | `deliveryType` | Defines whether the order was a store or home delivery, or an in-store purchase |  |
> | `deliveryOption` | Chosen delivery option. | [https://redantdigital.atlassian.net/wiki/spaces/RDD/pages/1328021509](https://redantdigital.atlassian.net/wiki/spaces/RDD/pages/1328021509) |
> | `deliveryAddress` | Address of the customer (if the `deliveryType` requires it) |  |
> | `deliveryDetails` |  |  |
> | `details` | Additional custom information pertaining to the order such as payment intents, keys etc. |  |
> | `returningCustomer` |  |  |
> | `previousOrderId` | The unique ID of the order prior to this one |  |
> | `createdByUserId` |  |  |
> | `updateSource` |  |  |
> | `orderPriceAdjustments` |  |  |
> | `orderPayments` | An object containing payment details |  |

# Order Product Schema

> Macro (excerpt)
> 
> | **Field (* Required)** | **Definition** | **Format/Additional Info** |
> | --- | --- | --- |
> | `id`* | Order line unique identifier | UUID format |
> | `tax`* | Tax information | JSON Object |
> | `tax.code`* | Currency code for tax | String (e.g., "GBP") |
> | `tax.value`* | Tax amount | Number (decimal) |
> | `link` | Product URL | String (URL format) |
> | `name`* | Product name | String |
> | `brand` | Brand name | String |
> | `price`* | Price information | JSON Object |
> | `price.code`* | Currency code for price | String (e.g., "GBP") |
> | `price.value`* | Price amount | Number (decimal) |
> | `total`* | Total amount | JSON Object |
> | `total.code`* | Currency code for total | String (e.g., "GBP") |
> | `total.value`* | Total amount | Number (decimal) |
> | `images` | Product images | Array of strings (URLs) |
> | `unsold` | Product availability status | Boolean |
> | `isLoved` | Favorite status | Boolean |
> | `preview` | Preview status | Boolean |
> | `service` | Service indicator | Boolean |
> | `variant`* | Product variant information | Object |
> | `variant.id`* | Variant identifier | UUID format |
> | `variant.ean`* | European Article Number | String (13 digits) |
> | `variant.name`* | Variant name | String |
> | `variant.details` | Additional variant details | JSON Object |
> | `clientId` | Client identifier | Null or String |
> | `discount` | Discount information | Object containing currency code and value |
> | `discount.code` | Currency code for discount | String (e.g., "GBP") |
> | `discount.value` | Discount amount | Number (decimal) |
> | `subTotal` | Subtotal amount | Object containing currency code and value |
> | `subTotal.code` | Currency code for subtotal | String (e.g., "GBP") |
> | `subTotal.value` | Subtotal amount | Number (decimal) |
> | `productId` | Product identifier | UUID format |
> | `categoryId` | Category identifier | UUID format |
> | `vatPercent` | Value Added Tax percentage | Null or Number |
> | `externalProductId` | External product identifier | String |