Search Documentation
Search documentation topics, API endpoints, and guides
postOrders
OpenAPI Documentation
POST /v1/orders
Create an order
Create one wallet-funded order with idempotent retry protection.
Last updated on 5/26/2026
Endpoint
post/v1/orders
Creates one wallet-funded order for an orderable store product. The Idempotency-Key header is required so clients can safely retry network failures without double-charging the wallet. Reusing a key with a different payload returns IDEMPOTENCY_CONFLICT, and a still-running request returns IDEMPOTENCY_IN_PROGRESS. The response amount is charged in integer minor units.
Authentication
Include your customer API key in the Authorization header:
Authorization: Bearer $AUTOMATIC_PALLET_API_KEYRequest
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| idempotency-key | header | string | Required | Required for order creation. Reuse the same key to safely retry. |
Request Body (application/json)
{
"$ref": "#/components/schemas/CreateOrderRequest"
}Responses
201Order created.
{
"$ref": "#/components/schemas/Order"
}400Invalid request body or headers.
{
"$ref": "#/components/schemas/ErrorResponse"
}401Missing or invalid API key.
{
"$ref": "#/components/schemas/ErrorResponse"
}402Payment Required
403API key lacks orders:write.
{
"$ref": "#/components/schemas/ErrorResponse"
}404Service or customer mapping not found.
{
"$ref": "#/components/schemas/ErrorResponse"
}409Idempotency conflict or in-progress request.
{
"$ref": "#/components/schemas/ErrorResponse"
}422Order cannot be accepted.
{
"$ref": "#/components/schemas/ErrorResponse"
}Example cURL Request
curl "https://automaticpallet.com/v1/orders" \
-X POST \
-H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: client-order-1001" \
--data '{
"serviceId": "prod_123",
"target": "@customer_handle",
"quantity": 100,
"metadata": {
"externalOrderId": "client-order-1001"
}
}'