Memberships

The memberships of the authenticated user.

Get Memberships

GET https://api.petje.af/v1/memberships

This endpoint allows you to get all memberships that belongs to the authenticated user. Scope: memberships.read

Query Parameters

Name
Type
Description

pageId

string

Filter the results for a specific page by the ID

limit

integer

The number of memberships to return (with a maximum of 250)

from

string

Offset the results after the membership with this ID.

Headers

Name
Type
Description

Authorization

string

Access token using the Bearer method

{
    "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 membership detail

GET 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

Path Parameters

Name
Type
Description

id

string

The membership ID

{
    "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"
        }
    }
}

Last updated