> ## Documentation Index
> Fetch the complete documentation index at: https://help-plum.xoxoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Order Details API

> Fetch details for a specific lounge order using either `poNumber` or `orderId`. Do not use this to poll delayed order status — use webhooks instead.

**Real URL:** `POST https://accounts.xoxoday.com/chef/v1/oauth/api`


| Parameter          | Type      | Description                                                    |
| :----------------- | :-------- | :------------------------------------------------------------- |
| poNumber           | String    | Purchase Order number to avoid duplicate orders.               |
| orderId            | Float     | Unique ID of the order (used for referencing existing orders). |
| sendMailToReceiver | Int (0/1) | Flag to notify the recipient via email (1 = Yes, 0 = No).      |

## Response Schema

| **Path**                                                      | **Type**    | **Description**                                                             |
| ------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------- |
| data                                                          | object      | Root response object.                                                       |
| data.getOrderDetails                                          | object      | Container for order details.                                                |
| data.getOrderDetails.status                                   | number      | API execution status (`1` = success).                                       |
| data.getOrderDetails.data                                     | object      | Order details payload.                                                      |
| data.getOrderDetails.data.orderId                             | number      | Unique order ID                                                             |
| data.getOrderDetails.data.orderTotal                          | number      | Rounded total amount                                                        |
| data.getOrderDetails.data.rawOrderTotal                       | number      | Exact unrounded amount                                                      |
| data.getOrderDetails.data.orderDiscount                       | string      | Discount applied; may be blank (generic).                                   |
| data.getOrderDetails.data.rawOrderDiscount                    | string      | Exact unrounded discount                                                    |
| data.getOrderDetails.data.discountPercent                     | string      | Discount percent                                                            |
| data.getOrderDetails.data.currencyCode                        | string      | Currency code                                                               |
| data.getOrderDetails.data.currencyValue                       | number      | FX multiplier                                                               |
| data.getOrderDetails.data.amountCharged                       | number      | Final charged amount                                                        |
| data.getOrderDetails.data.orderStatus                         | string      | Order completion status                                                     |
| data.getOrderDetails.data.deliveryStatus                      | string      | Delivery status                                                             |
| data.getOrderDetails.data.tag                                 | string      | Custom tag from request                                                     |
| data.getOrderDetails.data.orderDate                           | string      | Order creation timestamp                                                    |
| data.getOrderDetails.data.deliveryDate                        | string      | Delivery timestamp; blank if pending                                        |
| data.getOrderDetails.data.quantity                            | number      | Ordered quantity                                                            |
| data.getOrderDetails.data.shippingDetails                     | object      | Shipping details **(only for merchandise; empty for other categories)**.    |
| data.getOrderDetails.data.shippingDetails.shippingFirstName   | string      | First name **(merchandise only)**.                                          |
| data.getOrderDetails.data.shippingDetails.shippingLastName    | string      | Last name **(merchandise only)**.                                           |
| data.getOrderDetails.data.shippingDetails.shippingContactNo   | string      | Shipping contact **(merchandise only)**.                                    |
| data.getOrderDetails.data.shippingDetails.shippingCompany     | string      | Company name **(merchandise only)**.                                        |
| data.getOrderDetails.data.shippingDetails.shippingAddress1    | string      | Address line 1 **(merchandise only)**.                                      |
| data.getOrderDetails.data.shippingDetails.shippingAddress2    | string      | Address line 2 **(merchandise only)**.                                      |
| data.getOrderDetails.data.shippingDetails.shippingCity        | string      | Shipping city **(merchandise only)**.                                       |
| data.getOrderDetails.data.shippingDetails.shippingState       | string      | Shipping state **(merchandise only)**.                                      |
| data.getOrderDetails.data.shippingDetails.shippingCountry     | string      | Shipping country **(merchandise only)**.                                    |
| data.getOrderDetails.data.shippingDetails.shippingPostcode    | string      | Postal/ZIP code **(merchandise only)**.                                     |
| data.getOrderDetails.data.vouchers                            | array       | Delivered voucher codes.                                                    |
| data.getOrderDetails.data.vouchers\[].productId               | number      | Product ID                                                                  |
| data.getOrderDetails.data.vouchers\[].voucherCode             | string      | Voucher code                                                                |
| data.getOrderDetails.data.vouchers\[].pin                     | string      | PIN                                                                         |
| data.getOrderDetails.data.vouchers\[].validity                | string      | Expiry date                                                                 |
| data.getOrderDetails.data.vouchers\[].amount                  | number      | Voucher amount                                                              |
| data.getOrderDetails.data.vouchers\[].currency                | string      | Voucher currency                                                            |
| data.getOrderDetails.data.voucherDetails                      | array       | Summary of items in order (generic across all categories).                  |
| data.getOrderDetails.data.voucherDetails\[].orderId           | number      | Order ID (generic).                                                         |
| data.getOrderDetails.data.voucherDetails\[].productId         | number      | Product ID (generic).                                                       |
| data.getOrderDetails.data.voucherDetails\[].productName       | string      | Product name (generic).                                                     |
| data.getOrderDetails.data.voucherDetails\[].currencyCode      | string      | Product currency (generic).                                                 |
| data.getOrderDetails.data.voucherDetails\[].productStatus     | string      | Delivery status (generic).                                                  |
| data.getOrderDetails.data.voucherDetails\[].denomination      | number      | Voucher value / lounge price / merchandise price / top-up amount (generic). |
| data.getOrderDetails.data.voucherDetails\[].cancelledQuantity | number      | Cancelled quantity                                                          |
| data.getOrderDetails.data.voucherDetails\[].trackingId        | string/null | Shipment tracking ID **(merchandise only)**.                                |
| data.getOrderDetails.data.voucherDetails\[].trackingLink      | string/null | Tracking URL **(merchandise only)**.                                        |
| data.getOrderDetails.data.orderMeta                           | object      | Additional metadata captured during place order (category-specific).        |

## Implementation Notes

1. We do not recommend calling GetOrderDetails API to poll the order status for delayed delivery orders. Instead, implement [Webhooks](https://developers.xoxoday.com/v1.2/docs/webhooks-1) to be notified when an order status is changed
2. You can fetch order details by either using poNumber OR orderId
3. When you pass poNumber as a String, accepted values for orderId:
4. Null value. Example: `orderId: null`
5. 0 as an integer. Example: `orderId: 0`
6. 0 as a string. Example: `orderId: "0"`
7. When you only pass orderId, valid cases:
8. Case 1:

* `poNumber: ""`
* `orderId: "26663453"`

2. Case 2:

* `poNumber: ""`
* `orderId: 26663453`

3. Case 3:

* `poNumber: null`
* `orderId: 26663453`

4. Case 4:

* `poNumber: null`
* `orderId: "26663453"`

This ensures that the Get Order Details API works correctly in different situations.


## OpenAPI

````yaml specs/rewards-lounge.yaml POST /getOrderDetails
openapi: 3.0.3
info:
  title: Xoxoday Rewards API – Lounge
  version: '1.2'
  description: >
    Lounge API endpoints for browsing the lounge catalog, placing orders, and
    reporting.


    All operations dispatch to `POST /v1/oauth/api`. Virtual path suffixes are
    used

    for playground differentiation since OpenAPI does not allow multiple POST
    operations

    on the same path.


    **Host split:**

    - `getFilters`, `getBalance`, `paymentHistory` → `stagingstores.xoxoday.com`

    - `getLoungesCatalog`, `placeOrder`, `getOrderDetails`, `getOrderHistory` →
    `accounts.xoxoday.com`


    **Get Balance** sends parameters as URL query string (not request body).
servers:
  - url: https://stagingstores.xoxoday.com/chef/v1/oauth/api
    description: Sandbox
  - url: https://accounts.xoxoday.com/chef/v1/oauth/api
    description: Production
  - url: https://canvas.xoxoday.com/chef/v1/oauth/api
    description: Testing
security:
  - BearerAuth: []
tags:
  - name: Catalog
  - name: Orders
  - name: Reporting
paths:
  /getOrderDetails:
    post:
      tags:
        - Orders
      summary: Get Order Details API
      description: >
        Fetch details for a specific lounge order using either `poNumber` or
        `orderId`. Do not use this to poll delayed order status — use webhooks
        instead.


        **Real URL:** `POST https://accounts.xoxoday.com/chef/v1/oauth/api`
      operationId: loungeGetOrderDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - plumProAPI.mutation.getOrderDetails
                  default: plumProAPI.mutation.getOrderDetails
                tag:
                  type: string
                  enum:
                    - plumProAPI
                  default: plumProAPI
                variables:
                  type: object
                  required:
                    - data
                  properties:
                    data:
                      type: object
                      properties:
                        poNumber:
                          type: string
                          description: >-
                            PO number passed at order time. Use this OR
                            `orderId`.
                          example: PO123
                        orderId:
                          type: integer
                          nullable: true
                          description: Order ID. Pass `0` or `null` when using `poNumber`.
                          example: 123
                        sendMailToReceiver:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: '`1` = resend delivery email to recipient.'
                          example: 0
            example:
              query: plumProAPI.mutation.getOrderDetails
              tag: plumProAPI
              variables:
                data:
                  poNumber: PO123
                  orderId: 123
                  sendMailToReceiver: 0
      responses:
        '200':
          description: Order details returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      getOrderDetails:
                        type: object
                        properties:
                          status:
                            type: number
                          data:
                            type: object
                            properties:
                              orderId:
                                type: number
                              orderTotal:
                                type: number
                              rawOrderTotal:
                                type: number
                              orderDiscount:
                                type: string
                              currencyCode:
                                type: string
                              currencyValue:
                                type: number
                              amountCharged:
                                type: number
                              orderStatus:
                                type: string
                              deliveryStatus:
                                type: string
                              tag:
                                type: string
                              orderDate:
                                type: string
                              deliveryDate:
                                type: string
                              quantity:
                                type: number
                              voucherDetails:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    orderId:
                                      type: number
                                    productId:
                                      type: number
                                    productName:
                                      type: string
                                    currencyCode:
                                      type: string
                                    productStatus:
                                      type: string
                                    denomination:
                                      type: number
                                    cancelledQuantity:
                                      type: number
                              orderMeta:
                                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
      servers:
        - url: https://stagingstores.xoxoday.com/chef/v1/oauth/api
          description: Sandbox
        - url: https://accounts.xoxoday.com/chef/v1/oauth/api
          description: Production
        - url: https://canvas.xoxoday.com/chef/v1/oauth/api
          description: Testing
components:
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Unauthorized
    BadGateway:
      description: Upstream service error.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <access_token>`'

````