Skip to main content
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
customers
/
tokens
/
events
Find / Add token events
curl --request POST \
  --url https://api.dintero.com/v1/accounts/{aid}/customers/tokens/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": {
    "type": "<string>",
    "value": "<string>"
  }
}
'
{
  "id": "<string>",
  "customer": {
    "type": "customer",
    "customer_id": "<string>",
    "metadata": {
      "dob_year": 1985
    },
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "deleted_at": "2023-11-07T05:31:56Z",
    "first_name": "John",
    "last_name": "Doe",
    "email": "customer@example.com",
    "phone_number": "+4799999999",
    "attributes": {},
    "status": "<string>",
    "favorite_store": "<string>",
    "enrolled_by": {
      "value": "https://facebook.com",
      "type": "url"
    },
    "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",
        "postal_place": "Oslo",
        "country": "NO",
        "address_line_2": "PB 123",
        "postal_code": "0349",
        "latitude": 59.942112,
        "longitude": 10.716991,
        "type": "custom",
        "custom_type": "<string>",
        "comment": "5th floor, use doorbell."
      }
    ],
    "term": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accepted_at": "2023-11-07T05:31:56Z"
    },
    "company": {
      "bussiness_name": "TKP tech AS",
      "organization_number": "123456789MVA",
      "department": "sales department",
      "industry": "computer industry",
      "website": "<string>",
      "number_of_employees": "<string>"
    },
    "gender": "male",
    "date_of_birth": "1990-09-20",
    "contact_for": [
      {
        "customer_id": "<string>"
      }
    ]
  },
  "token": {
    "type": "sha1:email",
    "value": "a1b79ef1a62d94ffa86b3f3d846df0ee3993af92",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
    "deleted_at": "2023-11-07T05:31:56Z",
    "token_id": "<string>",
    "metadata": {
      "exp_month": 10,
      "exp_year": 20,
      "mask_pan": "**** **** **** 3477"
    }
  },
  "status": "OPT_OUT",
  "events": [
    {
      "event": "customer declined signup in store",
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "status": "OPT_OUT",
      "metadata": {
        "store_id": "SID1234"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.dintero.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication (token authentication) should be used for accessing the API.

Use Get Token to get an access token for client credentials. Pass the token in the request header:

Authorization: Bearer {access_token}

where the access_token is JSON Web Tokens (JWT).

Path Parameters

aid
string<^[PT]{1}\d{8}$>
required

An id that uniquely identifies the account.

Required string length: 9

Body

application/json
token
object
required

Lookup by token type and value

event
object

Record event data about a token An event can be created before the customer exist and before the token has been added to the customer

Response

Token details

id
string
read-only

Auto-generated ID identifying the token type/value. Will be random until the token type/value has been added to a customer or a token event has been registered.

customer
object

The customer (if any) that the token belongs to

token
object

The token (if any) that is found given token type and value

status
string
default:UNKNOWN
read-only

Aggregated status from events registered or customer resolved.

The status will be set to customer.status and fallback to the status of the latest event.

The status will be set to UNKNOWN if no customer.status and event status is registered.

The status will be set to the previous event status (or UNKNOWN) if the event has expired

Example:

"OPT_OUT"

events
object[]
read-only

Events recorded given token type and value