System Consent
Endpoints for System Consent
Endpoints for System Consent
GET/api/v1/members/profile/system-consents
Authentication: Bearer token (JWT)
areaIdstringRequired when parent is presentgroupstringRequired when parent is present"communication", "activity", "profile"legalBasisstringRequired when parent is present"legitimate_interests", "consent"statusstringRequired when parent is present"accepted", "withdrawn", "not_set"[
{
"areaId": "string",
"group": "communication",
"legalBasis": "legitimate_interests",
"status": "accepted",
"allowed": true,
"updatedAt": "2019-08-24T14:15:22Z"
}
]unauthorized
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequiredmemberNotFound
messageCodestringRequired"memberNotFound"messagestringcurlcurl https://api.subrite.no/api/v1/members/profile/system-consents \
--header 'Authorization: Bearer <token>'PUT/api/v1/members/profile/system-consents/{areaId}
Authentication: Bearer token (JWT)
areaIdstringRequiredapplication/jsonstatusstringRequiredGET/api/v1/members/{id}/system-consents
Authentication: Bearer token (JWT)
idstringRequiredGET/api/v1/members/{id}/system-consents/{areaId}/history
Authentication: Bearer token (JWT)
idstringRequiredareaIdstringRequiredpagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: GET/api/v1/system-consents/website-tracking/{userId}
Authentication: Bearer token (JWT)
userIdnumberRequiredallowedbooleanRequired when parent is presentupdatedAtstring (date-time)Required when parent is presenterrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}errorsarray of FieldErrorRequirederrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "memberNotFound",
"message": "string",
"errors": [
{}
]
}"accepted", "withdrawn"referencestringOptionalmaxLength: 1000{
"status": "accepted",
"reference": "string"
}areaIdstringRequiredgroupstringRequired"communication", "activity", "profile"legalBasisstringRequired"legitimate_interests", "consent"statusstringRequired"accepted", "withdrawn", "not_set"allowedbooleanRequiredupdatedAtstring (date-time)Required{
"areaId": "string",
"group": "communication",
"legalBasis": "legitimate_interests",
"status": "accepted",
"allowed": true,
"updatedAt": "2019-08-24T14:15:22Z"
}invalidSystemConsent, invalidFormat
messageCodestringRequired"invalidSystemConsent", "invalidFormat"messageunauthorized
Same fields as Get the signed-in member's system consents (401).
memberNotFound
Same fields as Get the signed-in member's system consents (404).
curlcurl 'https://api.subrite.no/api/v1/members/profile/system-consents/{areaId}' \
--request PUT \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "accepted",
"reference": "string"
}'areaIdstringRequired when parent is presentgroupstringRequired when parent is present"communication", "activity", "profile"legalBasisstringRequired when parent is present"legitimate_interests", "consent"statusstringRequired when parent is present"accepted", "withdrawn", "not_set"allowedbooleanRequired when parent is presentupdatedAtstring (date-time)Required when parent is present[
{
"areaId": "string",
"group": "communication",
"legalBasis": "legitimate_interests",
"status": "accepted",
"allowed": true,
"updatedAt": "2019-08-24T14:15:22Z"
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Get the signed-in member's system consents (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}memberNotFound
Same fields as Get the signed-in member's system consents (404).
{
"messageCode": "memberNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/members/{id}/system-consents' \
--header 'Authorization: Bearer <token>'50orderBystringOptional"createdAt"Allowed values: "createdAt", "id", "updatedAt"orderDirectionstringOptional"desc"Allowed values: "asc", "desc"itemsarray of SystemConsentHistoryDtoRequired8 fieldsitemsidnumberRequired when parent is presentField path: items[].idareaIdstringRequired when parent is presentField path: items[].areaIdtypestringRequired when parent is presentField path: items[].type"accepted", "withdrawn"channelstringRequired when parent is presentField path: items[].channel"mypage", "onboarding", "newsletter", "admin", "mailchimp", "make", "m2m", "mailmojo", "import"referencestringRequired when parent is presentField path: items[].referencelegalBasisstringRequired when parent is presentField path: items[].legalBasis"legitimate_interests", "consent"assessmentVersionnumberRequired when parent is presentField path: items[].assessmentVersioncreatedAtstring (date-time)Required when parent is presentField path: items[].createdAtmetaPageMetaRequired6 fieldsmetapagenumberRequiredField path: meta.pagetakenumberRequiredField path: meta.takecountnumberRequiredField path: meta.countpageCountnumberRequiredField path: meta.pageCounthasPreviousPagebooleanRequiredField path: meta.hasPreviousPagehasNextPagebooleanRequiredField path: meta.hasNextPage{
"items": [
{}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}invalidSystemConsent, badRequest
messageCodestringRequired"invalidSystemConsent", "badRequest"messageunauthorized
This response has no body.
curlcurl 'https://api.subrite.no/api/v1/members/{id}/system-consents/{areaId}/history' \
--header 'Authorization: Bearer <token>'WebsiteTrackingDtoallowedbooleanRequired{
"allowed": true
}unauthorized
This response has no body.
forbiddenResource
Same fields as Get the signed-in member's system consents (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/system-consents/website-tracking/{userId}' \
--header 'Authorization: Bearer <token>'stringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "invalidSystemConsent",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "memberNotFound",
"message": "string",
"errors": [
{}
]
}stringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "invalidSystemConsent",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "memberNotFound",
"message": "string",
"errors": [
{}
]
}