Check customer name
POST
{{server}}/api/v1/dispenser/checkCustomerNameThis endpoint checks that the given customer name is valid. It checks it in the banned words list of language and collision with other live ticket customer names.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Apikey {{dispenserApikey}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Body (json)
{
"customerName": "John",
"language": "00000000-0000-4000-0004-000000000017"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/dispenser/checkCustomerName' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}' \
-H 'Content-Type: application/json' \
-d '{
"customerName": "John",
"language": "00000000-0000-4000-0004-000000000017"
}'
const response = await fetch("{{server}}/api/v1/dispenser/checkCustomerName", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"customerName": "John",
"language": "00000000-0000-4000-0004-000000000017"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/dispenser/checkCustomerName"
headers = {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}",
"Content-Type": "application/json"
}
payload = {
"customerName": "John",
"language": "00000000-0000-4000-0004-000000000017"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/dispenser/checkCustomerNameHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Body
{
"customerName": "John",
"language": "00000000-0000-4000-0004-000000000017"
}
Example response 200 Ok
Response headers (9)
| Key | Value |
|---|---|
Access-Control-Expose-Headers | * |
Cache-Control | no-store, no-cache, must-revalidate |
Access-Control-Allow-Origin | * |
Access-Control-Allow-Methods | POST, PUT, GET, OPTIONS, DELETE |
Access-Control-Allow-Credentials | true |
Content-Length | 16 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"success": true
}