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

Name
Type
Description

membershipId

string

ID of the membership

Query Parameters

Name
Type
Description

limit

integer

The number of rewards to return

from

string

Offset the result after the reward with this ID

Headers

Name
Type
Description

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

Name
Type
Description

id

string

ID of the membership reward

membershipId

string

ID of the membership

Headers

Name
Type
Description

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