Customer API

OpenAPI Documentation

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.

Create a key
Go to account settings, create a personal key for your user wallet, or create an organization key when ordering for an organization.
Fund the wallet
Personal keys spend the user customer wallet. Organization keys spend the organization customer wallet. Check the active balance before creating large batches.
Send first requests
List services, choose the product ID as 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.

Bearer token
curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
  -H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"
x-api-key header
curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
  -H "x-api-key: $AUTOMATIC_PALLET_API_KEY"

API Keys

Personal customer keys
Personal keys are created by a signed-in user from account settings. They spend that user's customer wallet and should be stored in a secret manager.
Organization customer keys
Organization keys are created from the organization settings area and spend the organization's wallet. Use these keys for team-owned systems and shared automation.

Request Basics

OpenAPI source
The docs are generated from the data-service OpenAPI document. The source is available at https://automaticpallet.com/openapi.json.
Money units
Amounts are integer minor units paired with ISO currency codes. For example, 250000 with NGN represents NGN 2,500.00 when the currency uses two decimal places.
Pagination
List endpoints use explicit pagination parameters. Keep the returned order status as the source of truth for reconciliation.
Idempotency
POST /v1/orders requires Idempotency-Key. Reuse a key only for retrying the exact same logical order.

First Requests

List services
curl "$AUTOMATIC_PALLET_API_URL/v1/services" \
  -H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"
Check wallet balance
curl "$AUTOMATIC_PALLET_API_URL/v1/balance" \
  -H "Authorization: Bearer $AUTOMATIC_PALLET_API_KEY"
Create an idempotent order
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.