When creating a ticket you will act in the name of an identified or unidentified consumer.
When you call create ticket you have to send in the identification object that will decide what you can do in later calls.
In the identification object you have attribute inPerson which reflects the consumer identification scenario, e.g. if both consumer and merchant sales person are present or if consumer acts without sales person.
Value of inPerson will affect which identificationMethods that are valid when creating ticket. E.g. setting inPerson to false will not allow physical identity documents, e.g. PASSPORT, DRIVERS_LICENSE, ID_CARD…
Depending how it is set will also affect if parameters in subsequent calls in the order flow are mandatory or not. See section Create order.
Value of inPerson will also affect the ticket validity length.
To create ticket, send the above attributes, via a server-side call to our REST API. You’ll find the complete REST API reference here.
POST https://api.ecster.com/v1/identification/tickets
x-api-key: njdfdsdkjfl5598503mnfkfe
x-merchant-key: 86969769
Content-Type: application/json
{
"identification":{
"method":"SE_BANKID_MOBILE",
"identifier":"SE_BANKID_MOBILE"
},
"locale":{
"language":"sv",
"country":"SE"
},
"nationalId": "SE530516-9756",
"inPerson":false
}
You can either get OK response, or an error.
The response contains following information:
Below you have an example of the response from request obove.
Status: 201 created
{
"id": "eYBtAD0wTZIzDWkVpGhe",
"validTo": "2018-04-18T11:06:16+02:00",
"consumer": {
"nationalId": "SE530516-9756",
"name": {
"firstName": "Algot",
"lastName": "Henriksson"
},
"address": {
"line1": "Alsike, Årby",
"city": "Västerås",
"zip": "724 62",
"country": "SE"
},
"contactInfo": {
"email": "algot@testson.com",
"cellular": {
"number": "070-1111111"
},
"phone": {
"number": "018-111111"
}
}
}
}