postOrders
Documentation OpenAPI
POST /v1/orders
Create an order
Create one wallet-funded order with idempotent retry protection.
Last updated on 5/26/2026
Endpoint
post
/v1/ordersCreates a wallet-funded order. Idempotency-Key is required; identical retries reuse the encrypted order result for 24 hours, changed payloads return IDEMPOTENCY_CONFLICT, and concurrent requests return IDEMPOTENCY_IN_PROGRESS. After the replay window, reconcile by externalOrderId; an uncertain request is never blindly re-executed.
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
201The request has succeeded and a new resource has been created as a result.
{
"$ref": "#/components/schemas/Order"
}400The server could not understand the request due to invalid syntax.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}401Access is unauthorized.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}402Client error
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}403Access is forbidden.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}404The server cannot find the requested resource.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}409The request conflicts with the current state of the server.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}422Client error
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}429Client error
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}500Server error
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}503Service unavailable.
{
"$ref": "#/components/schemas/CustomerApiErrorResponse"
}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"
}
}'