# Cancel Withdrawal from the Loyalty Card During the Visit

Cancellation of write-off from the loyalty card.

Endpoint: POST /visit/loyalty/cancel_card_withdrawal/{location_id}/{card_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (number, required)
    Location ID

  - `card_id` (number, required)
    Client card ID

## Header parameters:

  - `Accept` (string, required)
    application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Request fields (*/*):

  - `record_id` (number, required)
    Appointment ID

  - `visit_id` (number, required)
    Visit ID

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `payment_transactions` (array)
    Array with information about the financial transactions of the appointment

  - `loyalty_transactions` (array)
    An array with information about applied loyalty transactions in a visit

  - `kkm_transaction_details_container` (object)
    An object that holds details about transactions recorded by the POS system

  - `kkm_transaction_details_container.last_operation_type` (integer)

  - `kkm_transaction_details_container.transactions` (array)

  - `items` (array)
    Array with information about products and services of the appointment

  - `items.id` (integer)
    Object ID

  - `items.item_id` (integer)
    Product/service identifier

  - `items.item_type_id` (integer)
    Operation type identifier

  - `items.record_id` (integer)
    Appointment ID

  - `items.item_title` (string)
    Product/service name

  - `items.amount` (integer)
    Number of products/services

  - `items.first_cost` (number)
    Initial cost

  - `items.manual_cost` (number)
    Cost changed manually

  - `items.discount` (number)
    Discount

  - `items.cost` (number)
    the total cost

  - `items.master_id` (integer)
    team member ID

  - `items.good_id` (integer)
    Item ID

  - `items.service_id` (integer)
    Service ID

  - `items.event_id` (integer)
    Promotion ID

  - `items.is_service` (boolean)
    Is a service

  - `items.is_event` (boolean)
    Is a stock

  - `items.is_good` (boolean)
    Is the commodity

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Access denied.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

