Skip to content

Add a product line to the appointment's visit

Request

Adds one product line to the visit resolved from appointment_id — the "came for a haircut, bought shampoo, one receipt" case.

Each call appends a single line and never replaces the existing ones, so a client that does not know about lines added elsewhere cannot remove them. Service lines are derived from the appointment itself and cannot be created here. Adding a line increases amount_to_pay_minor and changes the visit ETag. Inventory levels are not checked — the product catalog and inventory are outside this contract. Requires Idempotency-Key; a retry returns the visit as it stood after the first call instead of adding the line twice.

Security
OAuth2(Required scopes: visits:write) or RestrictedKey
Path
location_idintegerrequired

Identifier of the Location. Verified against the credential on every call — a Location the credential cannot access responds with 404.

appointment_idintegerrequired

Identifier of the appointment.

Headers
Idempotency-Keystring, <= 255 charactersrequired

Client-generated unique key for this logical request (UUID recommended). A retry with the same key and body returns the original result; the same key with a different body fails with 409 idempotency_key_reused. Keys are retained at least 24 hours and are scoped to credential, Location, and operation; after expiry the value may be reused for a new logical request.

Bodyapplication/jsonrequired
product_idintegerrequired

Product identifier from listProducts.

quantityinteger, >= 1
Default:1
price_minorinteger

Unit price override in integer minor units. Omit to use the catalog price; overriding requires the discount permission and is rejected without it.

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/appointments/{appointment_id}/visit/items' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "product_id": 4417,
    "quantity": 1
  }'

Responses

The updated visit, including the new line.

Headers
RateLimit-Remaininginteger, (int32), >= 0

Requests left in the most constrained policy window that applies to this request.

RateLimit-Resetinteger, (int32), >= 0

On 429, seconds until the most constrained policy frees up; it equals Retry-After there. On a successful response it reports the length of that policy's window rather than the time left in the current one, so treat it as the window size, not as a countdown — the counter to pace against is RateLimit-Remaining.

RateLimit-Policystring

Most constrained policy applied to the request, as <limit>;w=<window in seconds>.

Example:"10;w=60"
X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
idintegerread-onlyrequired
objectstringread-onlyrequired
Value:"visit"
statusstringrequired

Status of the visit.

Enum:"waiting""confirmed""arrived""no_show"
itemsArray of objects(VisitItem)required
payment_methodsArray of objects(ApplicablePaymentMethod)required

Ways to pay this visit, with applicability resolved against it and identifiers sufficient for createPayment. Only instruments attached to the client appear here; a gift card or membership held by number is found with searchLoyaltyInstrument.

paymentsArray of objects(Payment)required
amount_to_pay_minorintegerread-onlyrequired

Remaining unpaid amount in integer minor units. 0 means fully paid or free.

currencystringread-onlyrequired

ISO 4217, server-controlled by the Location.

location_idintegerread-only
appointment_idsArray of integersread-only

Appointments grouped into this visit.

clientobject(Client)read-only

Present only when requested with expand[]=client; PII rules apply.

created_atstring, (date-time)read-only

UTC.

updated_atstring, (date-time)read-only

UTC.

Response
{ "id": 5001, "object": "visit", "location_id": 4321, "appointment_ids": [ 12345 ], "status": "arrived", "items": [ {} ], "payments": [ {} ], "currency": "EUR", "created_at": "2026-07-24T11:30:00Z", "updated_at": "2026-07-24T13:00:00Z", "amount_to_pay_minor": 0, "payment_methods": [ {} ] }