post
https://accounts.xoxoday.com/chef/v1/oauth/api/
With Place Order API, you can place orders of Charity available in the Catalog.
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 Schema
| Parameter | Type | Description |
|---|---|---|
| productId | Int | Unique ID of the product to be ordered. |
| quantity | Int | Number of units to be ordered. |
| denomination | Float | Value/amount of the voucher or reward. |
| String | Recipient’s email address. | |
| contact | String | Recipient’s contact number. |
| poNumber | String | Purchase Order number to avoid duplicate orders. |
| tag | String | Custom tag to identify or categorize the order. |
| notifyAdminEmail | Int (0/1) | Flag to notify admin via email (1 = Yes, 0 = No). |
| notifyReceiverEmail | Int (0/1) | Flag to notify recipient via email (1 = Yes, 0 = No). |
Response Schema
| Path | Type | Description |
|---|---|---|
| data | object | Root response object. |
| data.placeOrder | object | Container for the place order result. |
| data.placeOrder.status | number | API execution status (1 = success). |
| data.placeOrder.data | object | Full order details. |
| data.placeOrder.data.orderId | number | Unique order ID generated by Xoxoday. |
| data.placeOrder.data.orderTotal | number | Order total before applying discounts. |
| data.placeOrder.data.orderDiscount | string | Discount amount |
| data.placeOrder.data.discountPercent | string | Discount percentage |
| data.placeOrder.data.currencyCode | string | Currency code for the order. |
| data.placeOrder.data.currencyValue | number | Currency conversion multiplier (usually 1). |
| data.placeOrder.data.amountCharged | number | Final amount charged to the customer. |
| data.placeOrder.data.orderStatus | string | Overall status of the order (e.g., complete). |
| data.placeOrder.data.deliveryStatus | string | Delivery status (e.g., delivered). |
| data.placeOrder.data.tag | string | Custom tag passed from the request. |
| data.placeOrder.data.quantity | number | Number of vouchers ordered. |
| data.placeOrder.data.vouchers | array | List of delivered voucher objects. |
| data.placeOrder.data.vouchers[].productId | number | Product ID for the voucher. |
| data.placeOrder.data.vouchers[].orderId | number | Order ID associated with the voucher. |
| data.placeOrder.data.vouchers[].voucherCode | string | Voucher code delivered. |
| data.placeOrder.data.vouchers[].pin | string | PIN of the voucher. |
| data.placeOrder.data.vouchers[].validity | string | Voucher validity/expiry date. |
| data.placeOrder.data.vouchers[].amount | number | Voucher amount/value. |
| data.placeOrder.data.vouchers[].currency | string | Currency code for the voucher. |
| data.placeOrder.data.vouchers[].country | string | Country code where voucher is valid. |
| data.placeOrder.data.vouchers[].type | string | Voucher type (codePin, etc.). |
| data.placeOrder.data.vouchers[].currencyValue | number | FX conversion multiplier for voucher value. |
| data.placeOrder.data.voucherDetails | array | Summary of voucher products in the order. |
| data.placeOrder.data.voucherDetails[].orderId | number | Order ID. |
| data.placeOrder.data.voucherDetails[].productId | number | Product ID. |
| data.placeOrder.data.voucherDetails[].productName | string | Product name. |
| data.placeOrder.data.voucherDetails[].currencyCode | string | Product currency code. |
| data.placeOrder.data.voucherDetails[].productStatus | string | Delivery status for this product. |
| data.placeOrder.data.voucherDetails[].denomination | number | Voucher denomination. |
Implementation Notes
- To avoid facing an error while placing an order, please pass the valid productID and denomination
- The maximum order quantity allowed for the majority of the products is 10 unless mentioned otherwise in the "orderQuantityLimit" parameter in the GetVouchersAPI
- Should you wish to notify the recipient via email, please pass "1" in the "notifyReceiverEmail" parameter
- We recommend you store the "poNumber" that you pass in the request and the "orderID" you receive in the response.
- Should you get a 5xx error from the PlaceOrderAPI, please call GetOrderDetails 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 to receive order status updates for delayed product types.
