2105: Accept permission

2105: Accept permission

Accept a permission for an entity

Endpoint ID:

2105

Method:

POST

URL:

/permissions/entity/id/{entityID}/permission/{permissionID}

/permissions/entity/ext-key/{ext-key}/{ext-type}/permission/{permissionID}

 

 

entityID

Rubiq master ID that uniquely identifies the entity

 

ext-key

External key that uniquely identifies the entity

 

ext-type

Type of external key

 

permissionID

A GUID string identifier for the permission

Request body:

JSON data containing the permission acceptance

Required fields



sourceID

The GUID string identifier of the acceptance source

Optional fields



termsID

The GUID string identifier of the terms this permission is being accepted for. When a termsID is included, then this endpoint is only used to accept a permission for an existing terms acceptance.



data

Custom context data

{ "sourceID": "26f2da92-c9ca-4a82-90f0-8a8a43534239", "termsID": "8f87ade0-c5a2-4031-89b9-33c923c4588e", "data": { "resellerID": 123456, "resellerName": "Jane Doe" } }
{ "isActive": true, "isWithdrawn": false, "permissionID": "ff11961d-8ae7-4508-aed7-867220a89668", "acceptance": { "timestamp": "utc timestamp", "sourceID": "26f2da92-c9ca-4a82-90f0-8a8a43534239" } }

Status codes:

200

The permission was accepted

 

400

The permission could not be accepted, because it is inactive, or due to an invalid sourceID.

The following subcodes may be returned:

400.2

Permission not active

400.3

Source not active

 

404

The entity or permission were not found.

The following subcodes may be returned:

404.1

Entity not found

404.2

External entity reference could not be found

404.5

Permission not found

404.6

Source not found

 

412

The contract does not allow access to this permission, or allow this acceptance source

412.2

The permission is not allowed

412.3

The source is not allowed