Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add optional "data" property

...

Excerpt

Accept a permission for an entity


Endpoint ID:21042105
Method:

Status
colourGreen
titlePOST

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-keyExternal key that uniquely identifies the entity

ext-typeType of external key

permissionIDA GUID string identifier for the permission
Request body:Response body:

JSON data containing the permission acceptance

Required fields

sourceIDThe GUID string identifier of the acceptance source
Optional fields

termsIDThe 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.

dataCustom context data


Code Block
{
    "
isActive
sourceID": 
true
"26f2da92-c9ca-4a82-90f0-8a8a43534239",
    "
isWithdrawn
termsID":
false,
 
"permissionID": 987,
"8f87ade0-c5a2-4031-89b9-33c923c4588e",
    "
acceptance
data": {
        "
timestamp
resellerID": 123456,
"utc
 
timestamp",
       "
sourceID
resellerName": 
123 },
"Jane Doe"
   
"withdrawal":
 
{
}
}



Span
stylewhite-space:nowrap

Response body:



Code Block
{
    "isActive": falsetrue,
    "isWithdrawn": truefalse,
    "permissionID": 987,"ff11961d-8ae7-4508-aed7-867220a89668",
    "acceptance": {
        "timestamp": "utc timestamp",
        "sourceID": 123
   },
   "withdrawal": { "26f2da92-c9ca-4a82-90f0-8a8a43534239"
      "timestamp": "utc timestamp",
      "sourceID": 234,
      "reason": "Abc"
   }
}}
}


Status codes:201The permission was accepted

303This permission has already been accepted by this entity

400

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

The following subcodes may be returned:

400.2Permission not active
400.3Source not active



404

The entity or permission were not found.

The following subcodes may be returned:

404.1Entity not found
404.2External entity reference could not be found
404.5Permission not found
404.6Source not found



412

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

412.2The permission is not allowed
412.3The source is not allowed