Skip to content

Find a gift card or membership by number

Request

Looks up a gift card or membership by its number and reports whether it can pay the visit resolved from appointment_id.

This is for instruments the client does not hold in Altegio: a gift card received as a present, or a membership bought at another location of the chain. Instruments already attached to the client come back from getVisit in payment_methods and need no search. Results carry the same applicability fields, so both are passed to createPayment the same way.

Anti-enumeration: unknown, foreign-tenant, expired, and not-applicable numbers share one client-visible outcome — empty result or 422 instrument_not_applicable — and never distinct codes that would reveal whether a number exists elsewhere. This search and number-bearing createPayment attempts share a per-credential, per-Location rate limit (429 + Retry-After).

Security
OAuth2(Required scopes: loyalty:read) 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.

Query
numberstring

Loyalty instrument number to search.

typestring

Loyalty instrument type.

Enum:"gift_card""membership"
curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/appointments/{appointment_id}/payment_methods/search?number=string&type=gift_card' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

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
dataArray of objects(ApplicablePaymentMethod)required
has_morebooleanrequired

Whether more items exist beyond this page.

next_cursorstring or nullrequired

Opaque cursor for the next page; null on the last page.

objectstringrequired
Value:"list"
Response
{ "object": "list", "has_more": true, "next_cursor": "string", "data": [ {} ] }