tokens
aid_customers_tokens_events_post
Find details about a token, inclusive details about any customer the token belongs to and any token events recorded Include event in the request to update the status of the token scopes:
- admin:customers
- write:customers
post/accounts/{aid}/customers/tokens/events
Path parameters
aidstring ^[PT]{1}\d{8}$ required
An id that uniquely identifies the account.
Request body
Example request
{
"event": {
"event": "customer declined signup in store",
"status": "OPT_OUT",
"metadata": {
"store_id": "SID1234"
}
}
}Response
Token details
Example response
{
"customer": {
"metadata": {
"dob_year": 1985
},
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"enrolled_by": {
"type": "url",
"value": "https://facebook.com"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"addresses": [
{
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"country": "NO",
"latitude": 59.942112,
"longitude": 10.716991,
"comment": "5th floor, use doorbell."
}
],
"company": {
"organization_number": "123456789MVA",
"bussiness_name": "TKP tech AS",
"department": "sales department",
"industry": "computer industry"
},
"gender": "male",
"date_of_birth": "1990-09-20"
},
"token": {
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"type": "sha1:email",
"value": "a1b79ef1a62d94ffa86b3f3d846df0ee3993af92",
"metadata": {
"exp_month": 10,
"exp_year": 20,
"mask_pan": "**** **** **** 3477"
}
},
"status": "OPT_OUT",
"events": [
{
"event": "customer declined signup in store",
"status": "OPT_OUT",
"metadata": {
"store_id": "SID1234"
}
}
]
}