Membership rewards

The rewards that belongs to a membership.

Get membership rewards

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

Scope: memberships.read

Path Parameters

NameTypeDescription

membershipId

string

ID of the membership

Query Parameters

NameTypeDescription

limit

integer

The number of rewards to return

from

string

Offset the result after the reward with this ID

Headers

NameTypeDescription

Authorization

string

Access token using the Bearer method

{
    "count": 3,
    "_embedded": {
        "rewards": [
            {
                "resource": "rewards",
                "id": "i3DMlxfiU7bzqLtYmFUS",
                "name": "Sticker",
                "description": "Schitterende sticker!",
                "active": true,
                "user": {},
                "type": "parcel",
                "_links": {
                    "self": {
                        "href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL/rewards/i3DMlxfiU7bzqLtYmFUS",
                        "type": "application/hal+json"
                    },
                    "membership": {
                        "href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL",
                        "type": "application/hal+json"
                    }
                }
            },
            ...
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.petje.af/rewards",
            "type": "application/hal+json"
        },
        "next": null
    }
}

Get membership reward detail

GET https://api.petje.af/v1/memberships/:membershipId/rewards/:id

Scope: memberships.read

Path Parameters

NameTypeDescription

id

string

ID of the membership reward

membershipId

string

ID of the membership

Headers

NameTypeDescription

Authorization

string

Access token using the Bearer method

{
    "resource": "rewards",
    "id": "i3DMlxfiU7bzqLtYmFUS",
    "name": "Sticker",
    "description": "Schitterende sticker!",
    "active": true,
    "user": {},
    "type": "parcel",
    "_links": {
        "self": {
            "href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL/rewards/i3DMlxfiU7bzqLtYmFUS",
            "type": "application/hal+json"
        },
        "membership": {
            "href": "https://api.petje.af/memberships/HVogpphHSabylpg2gBYL",
            "type": "application/hal+json"
        }
    }
}

Last updated