WellnessLiving API (UAT) - v1.2026-02
  1. ecommerce
WellnessLiving API (UAT) - v1.2026-02
  • WellnessLiving API - [Feb-2026]
  • Auth
    • Authentication
  • appointment
    • /v1/appointment/book/asset/category
    • /v1/appointment/book/asset/list
    • /v1/appointment/book/asset/service
    • /v1/appointment/book/finish
    • /v1/appointment/book/finish
    • /v1/appointment/book/payment/paymentPost
    • /v1/appointment/book/product
    • /v1/appointment/book/schedule/calendar
    • /v1/appointment/book/schedule/day-time
    • /v1/appointment/book/service/category
    • /v1/appointment/book/service/list
    • /v1/appointment/book/staff/list
  • book-process
    • /v1/book/process/info
    • /v1/book/process/payment
    • /v1/book/process/purchase
    • /v1/book/process/purchase/element/list
  • business-data
    • /v1/business
    • /v1/business/franchise/location
    • /v1/business/skin
  • catalog
    • /v1/catalog/list
    • /v1/catalog/staff/catalog/list
  • classes
    • /v1/classes/list
    • /v1/classes/promotion
    • /v1/classes/view/element
  • collector-debt
    • /v1/collector/debt/list
    • /v1/collector/debt/pay
    • /v1/collector/debt/transaction
  • drive
    • /v1/drive/product/image/upload
  • ecommerce
    • /v1/ecommerce/order/sync
      POST
  • event
    • /v1/event/book/list
    • /v1/event/book/view/element
    • /v1/event/list
  • lead
    • /v1/lead/info
    • /v1/lead/info
  • location
    • /v1/location/list
    • /v1/location/view
  • login
    • /v1/login/attendance/list
    • /v1/login/search/settings
    • /v1/login/search/settings
    • /v1/login/search/staff-app/list
  • member
    • /v1/member/info
  • profile
    • /v1/profile/contract
    • /v1/profile/create
    • /v1/profile/fields
    • /v1/profile/purchase/list
    • /v1/profile/purchase/list/element
  • promotion
    • /v1/promotion
    • /v1/promotion/list
  • purchase
    • /v1/purchase/receipt
  • report
    • /v1/report/data
    • /v1/report/query
  • report-dev
    • /v1/report/customization-form
    • /v1/report/filter-info
  • schedule
    • /v1/schedule/class/list
    • /v1/schedule/class/view
    • /v1/schedule/class/view
    • /v1/schedule/page/element
    • /v1/schedule/page/list
    • /v1/schedule/tab
  • shop
    • /v1/shop/category
  • staff
    • /v1/staff/list
    • /v1/staff/view
  • user
    • /v1/user
  • visit
    • /v1/visit/status
  1. ecommerce

/v1/ecommerce/order/sync

POST
/v1/ecommerce/order/sync

POST /v1/integration/ecommerce/order-sync#

Overview#

Sync an externally processed order into WellnessLiving without charging the customer.
The OrderSync endpoint allows external e-commerce and point-of-sale systems to push completed orders into WellnessLiving. Because payment has already been collected externally, no charge is applied by WellnessLiving — the endpoint creates the purchase record and fulfils the items only.

Endpoint Details#

Method: POST
Base URL: https://uat-api.wellnessliving.io
Content-Type: application/json

Request Headers#

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token from OAuth 2.0 client_credentials flow
Content-TypestringYesMust be application/json

Request Body#

Send a JSON object in the request body. All top-level required fields must be present. Nested arrays use zero-indexed objects.

Top-level Fields#

FieldTypeRequiredDescription
k_businessstringYesBusiness primary key (RsBusinessSql). Identifies the WellnessLiving business account.
k_locationstringYesLocation primary key (RsLocationSql). The location where the order is being placed.
uidstringYesUser primary key (PassportLoginSql). The client on whose behalf the order is being created.
text_orderstringYesUnique external order ID. Max 255 characters. Acts as an idempotency key — re-submitting the same value returns the existing k_purchase without duplication.
a_purchase_itemarrayYesArray of line items to include in the order. See a_purchase_item fields below.
a_pay_formarrayYesArray of payment methods used. Amounts must sum to the total order value.
id_modeintegerNoOperation mode identifier (ModeSid). Controls how the order is processed.
m_tipstringNoTip amount as a decimal string. e.g. "5.00". Business must have tips enabled.
text_receipt_notestringNoCustom note to appear on the receipt.

a_purchase_item — Line Item Fields#

Each element of the a_purchase_item array represents one line item. Include one object per item.
FieldTypeRequiredDescription
id_purchase_itemintegerYesItem type identifier (RsPurchaseItemSid). 1 = Appointment, 2 = Session / Class pass, 9 = Product.
k_idstringYesPrimary key of the item to purchase (product key, membership key, etc.).
i_quantityintegerYesQuantity of this item to purchase.
m_price_manualstringNoPrice override as a decimal string. e.g. "25.00". Overrides the item's listed price.
k_shop_product_optionstringNoProduct option key. Use when the product has variants (size, colour, etc.).
a_taxarrayNoCustom tax overrides. Each element should contain the tax key and amount.
a_configobjectNoItem-specific configuration. Structure varies by item type. See a_config sub-fields below.

a_config — Item Configuration Sub-fields#

The a_config object is passed inside each a_purchase_item entry. Its accepted fields depend on the item type being purchased.

Promotions & Memberships#

FieldTypeRequiredDescription
dl_startstringNoStart date for the promotion in YYYY-MM-DD format.
is_renewbooleanNoWhether to auto-renew the membership. true or false.
m_prorate_customstringNoCustom proration amount as a decimal string.

Gift Cards (id_purchase_item = COUPON)#

FieldTypeRequiredDescription
s_codestringNoUnique gift card code to assign.
dt_send_localstringNoScheduled send datetime in local time (YYYY-MM-DD HH:MM:SS).
a_quick_giftarrayNoQuick-gift configuration array.

Tips (id_purchase_item = APPOINTMENT_TIP)#

FieldTypeRequiredDescription
k_staffstringNoStaff member key. Assigns the tip to a specific staff member.

a_pay_form — Payment Method Fields#

Each element of the a_pay_form array represents one payment method. Multiple payment methods are allowed and their amounts must sum to the full order total.
FieldTypeRequiredDescription
id_pay_methodintegerYesPayment method identifier (RsPayMethodSid). 11 = External payment (already collected outside WellnessLiving).
m_amountstringYesAmount applied from this payment method as a decimal string. e.g. "50.00".
k_pay_methodstringNoCard-on-file key. Required when charging a saved payment method.
m_surchargestringNoSurcharge amount as a decimal string applied to this payment method.

Request Example#

{
  "k_business": "100",
  "k_location": "25",
  "uid": "9999",
  "text_order": "EXT-ORDER-20240315-0042",
  "text_receipt_note": "Imported from external store",
  "a_purchase_item": [
    {
      "id_purchase_item": 3,
      "k_id": "555",
      "i_quantity": 1,
      "m_price_manual": "45.00",
      "k_shop_product_option": "",
      "a_tax": [],
      "a_config": []
    }
  ],
  "a_pay_form": [
    {
      "id_pay_method": 11,
      "m_amount": "45.00"
    }
  ]
}

Responses#

200 OK — Success#

The order was created successfully. Returns the WellnessLiving purchase key.
{
  "k_purchase": "8888-7777-6666"
}

Response Fields#

FieldTypeDescription
k_purchasestringThe WellnessLiving purchase primary key for the created order.

Error Responses#

All error responses return HTTP 4xx with a JSON body containing a sid_exception field that identifies the specific error condition.

Error Response Format#

{
  "sid_exception": "pay-amount-mismatch",
  "text_message": "Payment amounts do not match order total."
}

Error Codes#

sid_exceptionHTTPDescription
access403The authenticated user does not have the STORE_SELL privilege required to process orders at this location.
pay-amount-mismatch422The sum of all m_amount values in a_pay_form does not equal the total order value. Adjust payment amounts.
order-exists200A purchase with the given text_order already exists. The existing k_purchase is returned — no duplicate is created (idempotent).
access-foreign403The appointment referenced in a_purchase_item belongs to a different user than the uid provided.
purchase-item-location422The item referenced by k_id is not available for purchase at the location specified by k_location.
flagged403The user (uid) is flagged at the specified location and cannot make purchases.
tip-disable422m_tip was provided but tips are disabled for this business. Remove the m_tip field.
product-nx404No product was found matching the provided k_id. Verify the product key is correct and belongs to this business.
code-x409The gift card code in s_code already exists. Use a unique code value.
prorate-start422The dl_start date for a membership proration conflicts with existing membership dates.

Idempotency#

The text_order field serves as an idempotency key. If a request is submitted with a text_order value that has already been successfully processed, the endpoint will return HTTP 200 with the original k_purchase instead of creating a duplicate order.
⚠️ Important: Always use a unique, stable external order identifier as text_order. Do not generate a new random value per retry — use your own system's order ID so that network retries automatically deduplicate without creating duplicate purchases.

Request

Query Params

Body Params text/plain
Examples

Responses

🟢200
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/v1/ecommerce/order/sync?id_region={{id_region}}&k_business={{k_business}}' \
--header 'Content-Type: text/plain' \
--data-raw '{"k_business":"{{k_business}}","k_location":"{{k_location}}","uid":"{{uid}}","text_order":"EXT-12345-ABC","m_tip":"5.00","text_receipt_note":"Imported from Online Store","a_pay_form":[{"id_pay_method":11,"m_amount":"55.00"}],"a_purchase_item":[{"id_purchase_item":3,"k_id":"555","i_quantity":1,"m_price_manual":"50.00","a_config":[]}]}'
Response Response Example
{}
Modified at 2026-03-04 21:57:50
Previous
/v1/drive/product/image/upload
Next
/v1/event/book/list
Built with