Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions docs/resources/Entitlement.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ Returns all entitlements for a given app, active and expired.

###### Query String Params

| param | type | description |
|----------------|--------------------------------------------------|------------------------------------------------------|
| user_id? | snowflake | User ID to look up entitlements for |
| sku_ids? | comma-delimited set of snowflakes | Optional list of SKU IDs to check entitlements for |
| before? | snowflake | Retrieve entitlements before this entitlement ID |
| after? | snowflake | Retrieve entitlements after this entitlement ID |
| limit? | integer | Number of entitlements to return, 1-100, default 100 |
| guild_id? | snowflake | Guild ID to look up entitlements for |
| exclude_ended? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not ended entitlements should be omitted |
| param | type | description |
|------------------|--------------------------------------------------|-------------------------------------------------------|
| user_id? | snowflake | User ID to look up entitlements for |
| sku_ids? | comma-delimited set of snowflakes | Optional list of SKU IDs to check entitlements for |
| before? | snowflake | Retrieve entitlements before this entitlement ID |
| after? | snowflake | Retrieve entitlements after this entitlement ID |
| limit? | integer | Number of entitlements to return, 1-100, default 100 |
| guild_id? | snowflake | Guild ID to look up entitlements for |
| exclude_ended? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not ended entitlements should be omitted |
| exclude_deleted? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not deleted entitlements should be omitted |

```json
[
Expand All @@ -94,6 +95,28 @@ Returns all entitlements for a given app, active and expired.
]
```

## Get Entitlement % GET /applications/{application.id#DOS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object}

Returns an entitlement.

```json
{
"id": "1019653849998299136",
"sku_id": "1019475255913222144",
"application_id": "1019370614521200640",
"user_id": "771129655544643584",
"promotion_id": null,
"type": 8,
"deleted": false,
"gift_code_flags": 0,
"consumed": false,
"starts_at": "2022-09-14T17:00:18.704163+00:00",
"ends_at": "2022-10-14T17:00:18.704163+00:00",
"guild_id": "1015034326372454400",
"subscription_id": "1019653835926409216"
}
Comment on lines +103 to +117
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some properties here don't appear to be on the entitlement object documented. Should they be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same object as documented for the list entitlements endpoint.

```

## Consume an Entitlement % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object}/consume

For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements).
Expand Down Expand Up @@ -128,4 +151,4 @@ After creating a test entitlement, you'll need to reload your Discord client. Af

Deletes a currently-active test entitlement. Discord will act as though that user or guild _no longer has_ entitlement to your premium offering.

Returns `204 No Content` on success.
Returns `204 No Content` on success.