# Membership rewards

## Get membership rewards

<mark style="color:blue;">`GET`</mark> `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 |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

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

{% endtab %}
{% endtabs %}

## Get membership reward detail

<mark style="color:blue;">`GET`</mark> `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 |

{% tabs %}
{% tab title="200 " %}

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

{% endtab %}

{% tab title="404 " %}

```
{
    "status": 404,
    "title": "Not Found",
    "detail": "Membership Reward is not found",
    "_links": {
        "documentation": {
            "href": "https://docs.petje.af",
            "type": "text/html"
        }
    }
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.petje.af/petje.af-api/reference/membership-rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
