Update product access

PATCH/users/{user_id}/products/{product_id}/access

Overrides the user's access to a product. Only the fields supplied in the request are changed:

  • duration sets the access duration for this product.
  • schedule_id assigns the user to a schedule; send null to remove the assignment.
  • rules_waived controls whether the product's content release rules are waived for this user.

To avoid overwriting a newer version, send the ETag returned by the retrieve operation in the If-Match header.

AuthorizationBearer <token>

Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Path Parameters

user_id*string
product_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/users/string/products/string/access" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "denial_reason": "no_access",    "ends_at": "2019-08-24T14:15:22Z",    "has_access": true,    "object": "product_access",    "overrides": {      "duration": {        "type": "-1",        "value": 0      },      "rules_waived": true,      "schedule_id": "string"    },    "product_id": "string",    "revision": "string",    "sources": [      {        "enrollment_id": "string",        "kind": "manual"      }    ],    "starts_at": "2019-08-24T14:15:22Z",    "user_id": "string"  }}