Docs Navigation
Create Order
Request and response structure for a signed endpoint that allows a merchant system to create a Yuter voucher or order from the merchant server.
POST
/api/integrations/merchant/orders/createEndpoint structure for merchant-side order creation.
Request Fields
Field
Type
Required
Description
customerobject
Yes
Customer profile payload for the order to be created.
itemsarray
Yes
Order line items or voucher package selections.
merchantReferencestring
No
Partner-side reference id for reconciliation.
Response Fields
Field
Type
Description
codenumber
Response code.
successboolean
Present when order creation succeeds.
orderIdstring
Created Yuter order id.
bookingIdstring
Created voucher id when applicable.
messagestring
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.
Create Order cURL
Request and response for the create order endpoint.
cURL example
API_KEY='<raw merchant api key>'
TIMESTAMP=$(($(date +%s) * 1000))
NONCE=$(uuidgen)
BODY='{"customer":{"name":"Test User","email":"test@example.com"},"items":[{"programId":"69ce982e96a5b33a356ab001","variantId":"69ce982e96a5b33a356ab002","quantity":1}],"merchantReference":"ORDER-20260411-001"}'
PATH='/api/integrations/merchant/orders/create'
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 created successfully",
"orderId": "69ce982e96a5b33a356ac111",
"bookingId": "69ce982e96a5b33a356abab0"
}