Create a new order entry
POST/orders
Create a new order entry to purchase a giftcard product for a specific customer.
The order will be processed either synchronously or asynchronously based on the processing_mode parameter.
sync: the request will only return once the order has been fully processed and the delivery information is available.async: the request will return as soon as the order has been created and processing will continue in the background.
The client can then poll the order status to retrieve the delivery information once available or use webhooks to be notified about the order status changes.
Note: The request must include an Idempotency-Key header to ensure that duplicate requests are not processed multiple times.
Request
Responses
- 201
- 202
- 400
- 500
Order entry created and processed successfully
Order entry created successfully with asynchronous delivery in the background.
Bad Request
Internal Server Error
Error Codes
| HTTP Status | Class | Code | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_body_parameters | Invalid body parameters with details in the fields attribute |
| 400 | invalid_state | order_not_allowed_for_product | The given product is disabled for the client |
| 400 | idempotency | invalid_idempotency_key_header | The Idempotency-Key header is invalid or missing |
| 400 | idempotency | reused_idempotency_key | The Idempotency-Key has already been used for a previous request |
| 403 | forbidden | insufficient_available_balance | The client does not have sufficient available balance to place the order |
| 403 | forbidden | customer_amount_limit_exceeded | The requested amount exceeds the maximum allowed value for the customer |