01.software Docs

createLegacyOrder

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
POST
/api/orders/create

Tenant-admin write; pre-0.45 placement transport, raw server Order. Provider ID fields must be paired.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Public integration credentials: verified opaque sk01_ secret key or pat01_ personal access token; operation policy and read/write scopes still apply. These credentials are not Customer JWTs.

Header Parameters

X-Idempotency-Key?string

Optional retry identity. Preserve exact body and identity for the same operation; absence does not imply safe automatic retry.

Length1 <= length

Request Body

application/json
  1. body

pgPaymentId and pgProvider must be provided together; numeric relationship IDs normalize to strings.

pgPaymentId?string
Length1 <= length
pgProvider?string
Match^[a-z0-9][a-z0-9_-]{0,63}$
orderNumber*string
Length1 <= length
customer?|number
customerSnapshot*
shippingAddress?
orderItems*array<>
Items1 <= items <= 100
totalAmount*number
Range0 <= value
shippingAmount?number
Range0 <= value
discountCode?string
source?string
Value in"web""app""manual""api""import"
test?boolean
tags?array<>
Itemsitems <= 50

Response Body

Actual shaped success body

application/json
  1. response

Actual authenticated Payload Order document. Relationship depth and field access vary. This is server-only legacy wire, not the canonical public DTO or a browser discovery promise.

id*string
createdAt?string
updatedAt?string
orderNumber?string
status?string
financialStatus?string
totalAmount?number|null
currency?string|null
customerSnapshot?
shippingAddress?
[key: string]?any

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X POST 'https://api.01.software/api/orders/create' \  -H 'Content-Type: application/json' \  -d '{  "orderNumber": "string",  "customerSnapshot": {    "email": "user@example.com"  },  "orderItems": [    {      "variant": "string",      "quantity": 1    }  ],  "totalAmount": 0}'
Example Response
{  "id": "string",  "createdAt": "string",  "updatedAt": "string",  "orderNumber": "string",  "status": "string",  "financialStatus": "string",  "totalAmount": 0,  "currency": "string",  "customerSnapshot": {    "name": "string",    "email": "string",    "phone": "string"  },  "shippingAddress": {    "countryCode": "string",    "regionCode": "string",    "postalCode": "string",    "address": "string",    "detailAddress": "string",    "deliveryMessage": "string",    "recipientName": "string",    "phone": "string"  }}