> ## 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.

# Place Order API

> Place a lounge order. A unique `poNumber` must be sent per order. `loungeData` is required for DragonPass/partner fulfillment. Max quantity is `1` per order.

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


> A unique reference ID needs to be sent for every unique order in the "poNumber" parameter
>
> We strongly recommend storing the request and response of every "PlaceOrderAPI" call

## Request Parameter

| **Path**                       | **Type** | **Description**                                                       |
| ------------------------------ | -------- | --------------------------------------------------------------------- |
| productId                      | number   | Lounge product ID to be ordered.                                      |
| quantity                       | number   | Number of lounge passes to purchase.                                  |
| denomination                   | number   | Price/denomination of the lounge product.                             |
| email                          | string   | Customer’s email for order delivery/confirmation.                     |
| contact                        | string   | Customer’s contact number.                                            |
| tag                            | string   | Optional tag for internal tracking.                                   |
| poNumber                       | string   | Client-generated PO number for idempotency.                           |
| notifyReceiverEmail            | number   | Whether receiver should get email notification (`1` = yes, `0` = no). |
| notifyAdminEmail               | number   | Whether admin should receive notification (`0` = no, `1` = yes).      |
| loungeData                     | object   | Lounge-specific metadata required for DragonPass/partner fulfillment. |
| loungeData.firstName           | string   | First name of the traveler.                                           |
| loungeData.lastName            | string   | Last name of the traveler.                                            |
| loungeData.categoryType        | string   | Type of the product (`lounge`).                                       |
| loungeData.flightDepartureDate | string   | Traveler’s flight departure date (`DD-MM-YYYY`).                      |

## Response Schema

| **Path**                                             | **Type** | **Description**                                   |
| ---------------------------------------------------- | -------- | ------------------------------------------------- |
| data                                                 | object   | Root response object.                             |
| data.placeOrder                                      | object   | Container for place order result.                 |
| data.placeOrder.status                               | number   | Status of request (`1` = success).                |
| data.placeOrder.data                                 | object   | Order details object.                             |
| data.placeOrder.data.orderId                         | number   | Unique order ID generated by Xoxoday.             |
| data.placeOrder.data.orderTotal                      | number   | Total order amount (rounded).                     |
| data.placeOrder.data.rawOrderTotal                   | number   | Precise unrounded order amount before rounding.   |
| data.placeOrder.data.orderDiscount                   | string   | Discount applied (string because blank possible). |
| data.placeOrder.data.rawOrderDiscount                | string   | Unrounded discount component (may be blank).      |
| data.placeOrder.data.discountPercent                 | string   | Discount percentage applied.                      |
| data.placeOrder.data.currencyCode                    | string   | Currency code for the order.                      |
| data.placeOrder.data.currencyValue                   | number   | Currency conversion multiplier                    |
| data.placeOrder.data.amountCharged                   | number   | Final amount charged to the customer.             |
| data.placeOrder.data.orderStatus                     | string   | Order status (e.g., `complete`).                  |
| data.placeOrder.data.deliveryStatus                  | string   | Delivery status (e.g., `pending`, `delivered`).   |
| data.placeOrder.data.tag                             | string   | Custom tag from request.                          |
| data.placeOrder.data.quantity                        | number   | Quantity ordered.                                 |
| data.placeOrder.data.vouchers                        | array    | Delivered voucher codes                           |
| data.placeOrder.data.voucherDetails                  | array    | Summary of voucher/lounge items.                  |
| data.placeOrder.data.voucherDetails\[].orderId       | number   | Order ID.                                         |
| data.placeOrder.data.voucherDetails\[].productId     | number   | Lounge product ID.                                |
| data.placeOrder.data.voucherDetails\[].productName   | string   | Name of the lounge.                               |
| data.placeOrder.data.voucherDetails\[].currencyCode  | string   | Currency code of the lounge product.              |
| data.placeOrder.data.voucherDetails\[].productStatus | string   | Status for that product (`pending`, Delivered.).  |
| data.placeOrder.data.voucherDetails\[].denomination  | number   | Lounge price/denomination.                        |
| data.placeOrder.data.voucherDetails\[].vendorLogo    | string   | Vendor’s logo URL (DragonPass logo, etc.).        |
| data.placeOrder.data.orderMeta                       | object   | Additional metadata submitted in the order.       |
| data.placeOrder.data.orderMeta.email                 | string   | Email address submitted for the lounge order.     |

## Implementation Notes

1. To avoid facing an error while placing an order, please pass the valid productID and denomination
2. The maximum order quantity allowed for the products is 1 as mentioned  in the **"orderQuantityLimit"** parameter in the GetVouchersAPI
3. Should you wish to notify the recipient via email, please pass "1" in the **"notifyReceiverEmail"** parameter
4. We recommend you store the **"poNumber"** that you pass in the request and the **"orderID"** you receive in the response
5. Should you get a 5xx error from the PlaceOrderAPI, please call [GetOrderDetails](https://developers.xoxoday.com/v1.2/reference/get-order-details-api-1) and confirm if an order exists using the poNumber. If there's no order against the poNumber, you can go ahead and place another order

> Learn how to manage [webhooks](https://developers.xoxoday.com/v1.2/docs/webhooks-1) to receive order status updates for delayed product types.


## OpenAPI

````yaml specs/rewards-lounge.yaml POST /placeOrder
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:
  /placeOrder:
    post:
      tags:
        - Orders
      summary: Place Order API
      description: >
        Place a lounge order. A unique `poNumber` must be sent per order.
        `loungeData` is required for DragonPass/partner fulfillment. Max
        quantity is `1` per order.


        **Real URL:** `POST https://accounts.xoxoday.com/chef/v1/oauth/api`
      operationId: loungePlaceOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - plumProAPI.mutation.placeOrder
                  default: plumProAPI.mutation.placeOrder
                tag:
                  type: string
                  enum:
                    - plumProAPI
                  default: plumProAPI
                variables:
                  type: object
                  required:
                    - data
                  properties:
                    data:
                      type: object
                      required:
                        - productId
                        - quantity
                        - denomination
                        - poNumber
                        - loungeData
                      properties:
                        productId:
                          type: integer
                          description: Lounge product ID to order.
                          example: 15365
                        quantity:
                          type: integer
                          description: Number of lounge passes. Max `1`.
                          example: 1
                        denomination:
                          type: number
                          description: Price/denomination of the lounge product.
                          example: 20
                        email:
                          type: string
                          format: email
                          description: Customer email for order delivery/confirmation.
                          example: your.email@example.com
                        contact:
                          type: string
                          description: Customer contact number.
                          example: +1-4705000000
                        tag:
                          type: string
                          description: Optional tag for internal tracking.
                          example: Rewarding
                        poNumber:
                          type: string
                          description: >-
                            Client-generated PO number — must be unique per
                            order.
                          example: PO12662
                        notifyReceiverEmail:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: '`1` = notify recipient via email.'
                          example: 1
                        notifyAdminEmail:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: '`1` = notify admin via email.'
                          example: 0
                        loungeData:
                          type: object
                          required:
                            - firstName
                            - lastName
                            - categoryType
                            - flightDepartureDate
                          description: >-
                            Lounge-specific metadata required for partner
                            fulfillment.
                          properties:
                            firstName:
                              type: string
                              description: First name of the traveler.
                              example: Kevin
                            lastName:
                              type: string
                              description: Last name of the traveler.
                              example: Hank
                            categoryType:
                              type: string
                              enum:
                                - lounge
                              default: lounge
                              description: Must be `"lounge"`.
                            flightDepartureDate:
                              type: string
                              description: >-
                                Traveler's flight departure date. Format:
                                `DD-MM-YYYY`.
                              example: 23-01-2026
            example:
              query: plumProAPI.mutation.placeOrder
              tag: plumProAPI
              variables:
                data:
                  productId: 15365
                  quantity: 1
                  denomination: 20
                  email: your.email@example.com
                  contact: +1-4705000000
                  tag: Rewarding
                  poNumber: PO12662
                  notifyReceiverEmail: 1
                  notifyAdminEmail: 0
                  loungeData:
                    firstName: Kevin
                    lastName: Hank
                    categoryType: lounge
                    flightDepartureDate: 23-01-2026
      responses:
        '200':
          description: Lounge order placed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      placeOrder:
                        type: object
                        properties:
                          status:
                            type: number
                          data:
                            type: object
                            properties:
                              orderId:
                                type: number
                              orderTotal:
                                type: number
                              rawOrderTotal:
                                type: number
                              orderDiscount:
                                type: string
                              rawOrderDiscount:
                                type: string
                              discountPercent:
                                type: string
                              currencyCode:
                                type: string
                              currencyValue:
                                type: number
                              amountCharged:
                                type: number
                              orderStatus:
                                type: string
                              deliveryStatus:
                                type: string
                              tag:
                                type: string
                              quantity:
                                type: number
                              vouchers:
                                type: array
                                items:
                                  type: object
                              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
                                    vendorLogo:
                                      type: string
                              orderMeta:
                                type: object
                                properties:
                                  email:
                                    type: string
              example:
                data:
                  placeOrder:
                    status: 1
                    data:
                      orderId: 98765432
                      orderTotal: 20
                      currencyCode: USD
                      amountCharged: 20
                      orderStatus: complete
                      deliveryStatus: pending
                      quantity: 1
                      voucherDetails:
                        - orderId: 98765432
                          productId: 15365
                          productName: JFK Airport Lounge
                          currencyCode: USD
                          productStatus: pending
                          denomination: 20
                          vendorLogo: https://cdn.xoxoday.com/dragonpass.png
                      orderMeta:
                        email: your.email@example.com
        '400':
          $ref: '#/components/responses/BadRequest'
        '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:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string
    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>`'

````