Skip to content

Commit 8adda30

Browse files
appellationmazylol
authored andcommitted
Document new entitlement endpoint behavior (discord#7279)
* Document new entitlement endpoint behavior * Clarify defaults
1 parent c9d8f28 commit 8adda30

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

docs/resources/Entitlement.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ Returns all entitlements for a given app, active and expired.
6464

6565
###### Query String Params
6666

67-
| param | type | description |
68-
|----------------|--------------------------------------------------|------------------------------------------------------|
69-
| user_id? | snowflake | User ID to look up entitlements for |
70-
| sku_ids? | comma-delimited set of snowflakes | Optional list of SKU IDs to check entitlements for |
71-
| before? | snowflake | Retrieve entitlements before this entitlement ID |
72-
| after? | snowflake | Retrieve entitlements after this entitlement ID |
73-
| limit? | integer | Number of entitlements to return, 1-100, default 100 |
74-
| guild_id? | snowflake | Guild ID to look up entitlements for |
75-
| exclude_ended? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not ended entitlements should be omitted |
67+
| param | type | description |
68+
|------------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
69+
| user_id? | snowflake | User ID to look up entitlements for |
70+
| sku_ids? | comma-delimited set of snowflakes | Optional list of SKU IDs to check entitlements for |
71+
| before? | snowflake | Retrieve entitlements before this entitlement ID |
72+
| after? | snowflake | Retrieve entitlements after this entitlement ID |
73+
| limit? | integer | Number of entitlements to return, 1-100, default 100 |
74+
| guild_id? | snowflake | Guild ID to look up entitlements for |
75+
| exclude_ended? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not ended entitlements should be omitted. Defaults to false, ended entitlements are included by default. |
76+
| exclude_deleted? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not deleted entitlements should be omitted. Defaults to true, deleted entitlements are not included by default. |
7677

7778
```json
7879
[
@@ -94,6 +95,28 @@ Returns all entitlements for a given app, active and expired.
9495
]
9596
```
9697

98+
## Get Entitlement % GET /applications/{application.id#DOS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object}
99+
100+
Returns an entitlement.
101+
102+
```json
103+
{
104+
"id": "1019653849998299136",
105+
"sku_id": "1019475255913222144",
106+
"application_id": "1019370614521200640",
107+
"user_id": "771129655544643584",
108+
"promotion_id": null,
109+
"type": 8,
110+
"deleted": false,
111+
"gift_code_flags": 0,
112+
"consumed": false,
113+
"starts_at": "2022-09-14T17:00:18.704163+00:00",
114+
"ends_at": "2022-10-14T17:00:18.704163+00:00",
115+
"guild_id": "1015034326372454400",
116+
"subscription_id": "1019653835926409216"
117+
}
118+
```
119+
97120
## Consume an Entitlement % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object}/consume
98121

99122
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).
@@ -128,4 +151,4 @@ After creating a test entitlement, you'll need to reload your Discord client. Af
128151

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

131-
Returns `204 No Content` on success.
154+
Returns `204 No Content` on success.

0 commit comments

Comments
 (0)