01.software Docs

createReturn

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

All HTTP operations
POST
/api/returns/create

Tenant-admin write. Actual server Return document; reason tuples and restock requests come from the shared request schema.

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.

Request Body

application/json
  1. body
orderNumber*string

Order number (required)

Length1 <= length
reason?string

Return reason (optional)

Value in"change_of_mind""defective""wrong_delivery""damaged""size_too_large""size_too_small""color""style""not_as_described""wrong_item""unknown""other"
reasonDetail?string

Detailed reason text (optional)

Lengthlength <= 2000
returnItems*array<>

Array of products to return (required)

Items1 <= items <= 100
refundAmount*integer

Line refund amount before initial shipping refund (required, min 0)

Range0 <= value <= 9007199254740991
returnShippingFee?integer

Return shipping fee charged to the customer

Range0 <= value <= 9007199254740991
initialShippingRefundAmount?integer

Initial order shipping amount refunded to the customer

Range0 <= value <= 9007199254740991
initialShippingRefundOverrideNote?string

Operator audit note required when overriding policy suggestion

Length1 <= length <= 2000

Response Body

Actual shaped success body

application/json
  1. response

Actual authenticated Payload Return 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
order?string|number|
status?string
refundAmount?number|null
returnShippingFee?number|null
[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/returns/create' \  -H 'Content-Type: application/json' \  -d '{  "orderNumber": "string",  "returnItems": [    {      "orderItem": "string",      "quantity": 1    }  ],  "refundAmount": 0}'
Example Response
{  "id": "string",  "createdAt": "string",  "updatedAt": "string",  "order": "string",  "status": "string",  "refundAmount": 0,  "returnShippingFee": 0}