Memberships

The memberships of the authenticated user.

get
Get Memberships

https://api.petje.af/v1/memberships
This endpoint allows you to get all memberships that belongs to the authenticated user. Scope: memberships.read
Request
Response
Request
Headers
Authorization
required
string
Access token using the Bearer method
Query Parameters
pageId
optional
string
Filter the results for a specific page by the ID
limit
optional
integer
The number of memberships to return (with a maximum of 250)
from
optional
string
Offset the results after the membership with this ID.
Response
200: OK
Memberships successfully retrieved.
{
"count": 7,
"_embedded": {
"memberships": [
{
"resource": "memberships",
"id": "HVogpphHSabylpg2gBYL",
"userId": "8jFy8VbRPTfkM1658U2IrwvIV7R2",
"amount": 3,
"interval": "month",
"intervalLabel": "publicatie",
"number": 200001299,
"pageId": "eKEI7z2RrLoZ1Gsr6Mxt",
"pageName": "Test 2",
"pageSlug": "test2",
"plan": "Klein petje",
"planId": "nEkZypHsCJqVkPaje9I6",
"status": "active_end_month",
"_links": {
"self": {
"href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL",
"type": "application/hal+json"
},
"rewards": {
"href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL/rewards",
"type": "application/hal+json"
}
}
},
...
]
},
"_links": {
"self": {
"href": "https://api.petje.af/memberships",
"type": "application/hal+json"
},
"next": null
}
}

‚Äč

get
Get membership detail

https://api.petje.af/v1/memberships/:id
This endpoint allows you to get a specific membership that belongs to the authenticated user. Scope: memberships.read
Request
Response
Request
Path Parameters
id
optional
string
The membership ID
Response
200: OK
{
"resource": "memberships",
"id": "HVogpphHSabylpg2gBYL",
"userId": "8jFy8VbRPTfkM1658U2IrwvIV7R2",
"amount": 3,
"interval": "month",
"intervalLabel": "publicatie",
"number": 200001299,
"pageId": "eKEI7z2RrLoZ1Gsr6Mxt",
"pageName": "Test 2",
"pageSlug": "test2",
"plan": "Klein petje",
"planId": "nEkZypHsCJqVkPaje9I6",
"status": "active_end_month",
"_links": {
"self": {
"href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL",
"type": "application/hal+json"
},
"rewards": {
"href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL/rewards",
"type": "application/hal+json"
}
}
}
404: Not Found
{
"status": 404,
"title": "Not Found",
"detail": "Membership is not found",
"_links": {
"documentation": {
"href": "https://docs.petje.af",
"type": "text/html"
}
}
}