Skip to main content
POST
/
orders
Create an order
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_name": "<string>",
  "items": [
    {
      "sku": "<string>",
      "product_name": "<string>",
      "quantity": 2,
      "unit_price": 1,
      "product_sku_id": "<string>",
      "notes": "<string>"
    }
  ],
  "order_number": "<string>",
  "platform": "manual",
  "customer_email": "jsmith@example.com",
  "customer_phone": "<string>",
  "order_date": "2023-11-07T05:31:56Z",
  "total_revenue": 1,
  "shipping_cost": 0,
  "tax_amount": 0,
  "discount_amount": 0,
  "shipping_street": "<string>",
  "shipping_city": "<string>",
  "shipping_state": "<string>",
  "shipping_zip": "<string>",
  "shipping_country": "USA",
  "external_id": "<string>",
  "notes": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "order_number": "<string>",
    "platform": "<string>",
    "customer_name": "<string>",
    "customer_email": "<string>",
    "customer_phone": "<string>",
    "order_date": "<string>",
    "status": "<string>",
    "total_revenue": 123,
    "shipping_cost": 123,
    "tax_amount": 123,
    "discount_amount": 123,
    "shipping_street": "<string>",
    "shipping_city": "<string>",
    "shipping_state": "<string>",
    "shipping_zip": "<string>",
    "shipping_country": "<string>",
    "tracking_number": "<string>",
    "tracking_url": "<string>",
    "shipped_at": "<string>",
    "external_id": "<string>",
    "notes": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "items": [
      {
        "id": "<string>",
        "product_sku_id": "<string>",
        "sku": "<string>",
        "product_name": "<string>",
        "quantity": 123,
        "unit_price": 123,
        "total_price": 123,
        "quantity_fulfilled": 123,
        "fulfillment_status": "<string>",
        "notes": "<string>",
        "created_at": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Body

application/json
customer_name
string
required
items
object[]
required
Minimum array length: 1
order_number
string
platform
enum<string>
default:manual
Available options:
shopify,
etsy,
manual,
other
customer_email
string<email>
customer_phone
string
order_date
string<date-time>
total_revenue
integer

Total in cents. Calculated from items if omitted.

Required range: x >= 0
shipping_cost
integer
default:0

Shipping cost in cents

Required range: x >= 0
tax_amount
integer
default:0

Tax amount in cents

Required range: x >= 0
discount_amount
integer
default:0

Discount applied in cents

Required range: x >= 0
shipping_street
string
shipping_city
string
shipping_state
string
shipping_zip
string
shipping_country
string
default:USA
external_id
string
notes
string

Response

Order created

success
enum<boolean>
required
Available options:
true
data
object
required