Skip to content

Apply Deduction from the Loyalty Card in the Visit

Request

The amount deducted will not exceed the available bonus balance. If the value is set to 0, no write-off transaction will occur

Security
BearerPartnerUser
Path
location_idnumberrequired

Location ID

card_idnumberrequired

Client card ID

Headers
Acceptstringrequired

application/vnd.api.v2+json

Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

Body*/*required
amountnumberrequired

Number of points to redeem

Example:100
appointment_idnumberrequired

Appointment ID

Example:140967944
visit_idnumberrequired

Visit ID

Example:118389447
curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/visit/loyalty/apply_card_withdrawal/{location_id}/{card_id}' \
  -H 'Accept: string' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: */*' \
  -d '{
    "appointment_id": 140967944,
    "visit_id": 118389447,
    "amount": 100
  }'

Responses

OK

Bodyapplication/json
payment_transactionsArray of objects

Array with information about the financial transactions of the appointment

Example:
[]
loyalty_transactionsArray of objects

An array with information about applied loyalty transactions in a visit

Example:
[ { "id": 22985556, "status_id": 1, "amount": 20, "type_id": 1, "program_id": 20802, "card_id": 9223622, "salon_group_id": 145071, "item_id": 5048384, "item_type_id": 7, "item_record_id": 0, "goods_transaction_id": 96063258, "is_discount": true, "is_loyalty_withdraw": false, "type": { … } } ]
kkm_transaction_details_containerobject

An object that holds details about transactions recorded by the POS system

Example:
{ "last_operation_type": 1, "transactions": [] }
itemsArray of objects

Array with information about products and services of the appointment

Example:
[ { "id": 96063258, "item_id": 5048384, "item_type_id": 7, "record_id": 0, "item_title": "test two", "amount": 1, "first_cost": 20, "manual_cost": 20, "discount": 0, "cost": 20, "master_id": 548096, "good_id": 5048384, "service_id": 0, "event_id": 0, "is_service": false, "is_event": false, "is_good": true }, { "id": 0, "item_id": 2560779, "item_type_id": 1, "record_id": 140878948, "item_title": "Deep bikini", "amount": 1, "first_cost": 3000, "manual_cost": 3000, "discount": 0, "cost": 3000, "master_id": 140878948, "good_id": 0, "service_id": 2560779, "event_id": 0, "is_service": true, "is_event": false, "is_good": false } ]
Response
{ "payment_transactions": [], "loyalty_transactions": [ { … } ], "kkm_transaction_details_container": { "last_operation_type": 1, "transactions": [] }, "items": [ { … }, { … } ] }