Skip to content

Get a List of Membership Types by ID

Request

A list of membership types available at a location can be obtained by querying the location ID and membership type IDs.

The list is an array of membership types.

Get a list of membership types by ID

  • Parameters
    • company_id (required, number) - location ID
    • id: 1 (optional, number) - membership type ID (you can specify several additional parameters &ids[]={id}
Security
BearerPartnerUser
Path
location_idnumberrequired

location ID

Query
ids[]number

Membership type ID (you can specify several additional parameters &ids[]={id}

Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/loyalty/abonement_types/fetch?ids%5B%5D=0' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: string'

Responses

OK

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataArray of objects

Array with data objects

Example:
[ { "id": 12233, "salon_group_id": 123, "title": "Membership with the possibility of freezing for 14 days", "period": 0, "period_unit_id": 0, "allow_freeze": true, "freeze_limit": 14, "is_allow_empty_code": false, "is_united_balance": false, "united_balance_services_count": 0 }, { "id": 255789, "salon_group_id": 456, "title": "Membership for 6 months", "period": 6, "period_unit_id": 3, "allow_freeze": false, "freeze_limit": 0, "is_allow_empty_code": false, "is_united_balance": false, "united_balance_services_count": 0 } ]
metaobject

Metadata (contains the number of membership types found)

Example:
{ "count": 2 }
Response
{ "success": true, "data": [ { … } ], "meta": { "count": 1 } }