Archive Order

Request and response structure for a signed endpoint that lets a merchant archive or hide historical orders that should no longer appear in active operational flows.

POST/api/integrations/merchant/orders/archive

Endpoint structure for merchant-side order archival.

Request Fields

Field
Type
Required
Description
orderId
string
Yes
Order id to archive.
reason
string
No
Optional archive reason for audit purposes.

Response Fields

Field
Type
Description
code
number
Response code.
success
boolean
Present when archival succeeds.
message
string
Human-readable summary.

Response Codes

Yuter standardizes the booking integration response into four top-level codes so merchant-side documentation and cashier UI can stay simple.

Code
Meaning
Notes
1
Success
The booking is valid or redeemed successfully.
2
Already redeemed
The booking has already been redeemed before this request.
3
Invalid booking
The booking id is invalid or the booking record cannot be found.
4
Other errors
Authentication failed, booking not redeemable, merchant not allowed, or other controlled failure.

Archive Order cURL

Request and response for the archive order endpoint.

cURL example

API_KEY='<raw merchant api key>'
TIMESTAMP=$(($(date +%s) * 1000))
NONCE=$(uuidgen)
BODY='{"orderId":"69ce982e96a5b33a356ac111","reason":"merchant_closed_case"}'
PATH='/api/integrations/merchant/orders/archive'
PAYLOAD="POST
$PATH
$TIMESTAMP
$NONCE
$BODY"
SIGNATURE=$(printf "%s" "$PAYLOAD" | openssl dgst -sha256 -hmac "$API_KEY" -hex | sed 's/^.* //')

curl -X POST "https://www.yuterwellness.com$PATH" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $API_KEY" \
  -H "x-timestamp: $TIMESTAMP" \
  -H "x-nonce: $NONCE" \
  -H "x-signature: $SIGNATURE" \
  -d "$BODY"

Response Example

{
  "code": 1,
  "success": true,
  "message": "Order archived successfully"
}