01.software Docs

finalizeDraftOrder

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

All HTTP operations
POST
/api/draft-orders/{id}/finalize

Same handleDraftOrderComplete implementation. Tenant-admin write; optional fingerprint confirmation and optional retry key. Durable committed order identity recovers even without an HTTP key; stale drafts conflict.

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.

Path Parameters

id*string

Document ID

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
fingerprint?string
Match^draft-order:v1:[0-9a-f]{64}$

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/draft-orders/string/finalize' \  -H 'Content-Type: application/json' \  -d '{}'
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"  }}