Identifiers
An identifier can be used to simplify the access to a customers account to gather loyalty points. By linking the identifier (that can be a loyalty customer card, online identifier or others) to a customer's accountId, they can verify at the cash register or online checkout to be the customer represented by said accountId.
When an identifier is linked to an account, it can be used as additional identification of the account (can be used as {{accountId}}
variable in calls but with different idType).
Creating Identifiers
A new identifier can be created and mapped to the account.
curl --location --request POST '{{api_url}}/accounts/{{accountId}}/identifiers' \
--header 'interaction-id: {{interactionId}}' \
--header 'Authorization: {{jwt_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{{body}}'
with
Variable | Description |
---|---|
{{api_url}} | Endpoint of the api. (Staging) (Production) |
{{accountId}} | Unique ID assigned to an account at creation. |
{{jwt_token}} | The JWT-token, which has been generated by authentication. |
{{interactionId}} | Unique Identifier of the cash machine (or virtual equivalent, e.g. online-shop), which produced the receipt. This ID has to be listed in the Convercus System as with this ID, the connection to the call origin is made. |
{{body}} | Body with Identifier-Information as explained in the following. |
The body may look like this:
{
"code": "ABCD0001",
"displayCode": "ABCD0001",
"type": "APPCODE"
}
with
Attribute | Description | Relevance |
---|---|---|
code | Code that can be used to identify an account | Optional |
displayCode | Display value of the identifier e.g. for printing | Optional |
type | Declares the type of identifier and has to be one of: APPCODE CARDCODE EXTERNALCODE | Mandatory |
Getting Identifiers
All identifiers assigned to given account can be retrieved simultaniously:
curl --location --request GET '{{api_url}}/accounts/{{accountId}}/identifiers' \
--header 'interaction-id: {{interactionId}}' \
--header 'Authorization: {{jwt_token}}' \
--header 'id-type: {{idType}}' \
with
Variable | Description |
---|---|
{{api_url}} | Endpoint of the api. (Staging) (Production) |
{{accountId}} | Unique ID assigned to an account at creation. The ID has to be given in the format, that is dictated by the {{idType}} . |
{{jwt_token}} | The JWT-token, which has been generated by authentication. |
{{interactionId}} | Unique Identifier of the cash machine (or virtual equivalent, e.g. online-shop), which produced the receipt. This ID has to be listed in the Convercus System as with this ID, the connection to the call origin is made. |
{{idType}} | Identifier-Type (corresponding to the {{accountId}} ). Available values: APPCODE (e.g. A1B2C3D4E5) CARDCODE (e.g. V1W2X3Y4Z5) EXTERNALCODE (e.g. 123456780123) ID (account-identifier, e.g. 7d123457-bfa1-4a83-8213-123456789763 ) |
This will return all identifiers with their specific identifier type the account is currently assigned to, e.g.:
[
{
"identifierId": "7b7587da-7467-4fe6-96d5-1d650a49f1fc",
"code": "TESTCODE",
"displayCode": "AB1299CD",
"type": "APPCODE",
"status": "ACTIVE"
}
]
In order to secure a constistent mapping when displaying the codes, it is hightly recommened to set up different codes and code types unambigously.
Updated 2 months ago