01.software Docs

calculateDraftOrder

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}/calculate

Tenant-admin read; optional empty body. Totals are advisory and include a complete-input fingerprint. Updates computedTotals on the Draft only, no ledger side effects.

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

Request Body

application/json
  1. body
[key: string]?any

Response Body

Actual shaped success body

application/json
  1. response
fingerprint*string
subtotal*number
discountAmount*number
shippingAmount*number
taxAmount*number
total*number
currency*"KRW"
Value in"KRW"
lines*array<>
issues*array<>

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/calculate' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "fingerprint": "string",  "subtotal": 0,  "discountAmount": 0,  "shippingAmount": 0,  "taxAmount": 0,  "total": 0,  "currency": "KRW",  "lines": [    {      "id": "string",      "lineType": "catalog",      "product": "string",      "variant": "string",      "requiresShipping": true,      "quantity": 0,      "unitPrice": 0,      "lineTotal": 0    }  ],  "issues": [    {      "code": "string",      "message": "string"    }  ]}