Documentation OpenAPI
Automatic Pallet Customer API
OpenAPI-led documentation for listing orderable products, checking wallets, and creating idempotent customer orders.
Last updated on
Getting Started
Use the customer API to list orderable store products, check the wallet that will pay for orders, and create orders with retry-safe idempotency.
serviceId, then create the order with a unique Idempotency-Key.Authentication
Every /v1 request must include a customer API key. Prefer Authorization: Bearer <api_key>. Use x-api-key only when your client cannot set an Authorization header. Query-string API keys are unsupported.
curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
-H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
-H "x-api-key: $AUTOMATIC_PALLET_API_KEY"API Keys
Request Basics
250000 with NGN represents NGN 2,500.00 when the currency uses two decimal places.POST /v1/orders requires Idempotency-Key. Reuse a key only for retrying the exact same logical order.First Requests
curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
-H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"curl "$AUTOMATIC_PALLET_API_URL/v1/balance" \
-H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"curl "$AUTOMATIC_PALLET_API_URL/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"
}
}'Endpoint Reference
Errors
Errors use a stable envelope with error.code, error.message, and optional error.details. Common codes include UNAUTHORIZED, FORBIDDEN, VALIDATION_ERROR,IDEMPOTENCY_CONFLICT, and INSUFFICIENT_FUNDS.
Support
When opening a ticket, include the endpoint, HTTP status, error.code, order ID, Idempotency-Key, and metadata.externalOrderId. Never send a raw API key in tickets, chat, logs, screenshots, or analytics.