CRM identification
POST
{{server}}/api/v1/smart/identify?branch={{branch}}This endpoint identifies the customer by an ID in the CRM.
Response
It returns the customer data if it's found. Otherwise 204 or error.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Query parameters
| Key | Value |
|---|---|
branch | {{branch}} |
Body (json)
{
"id": "12345678"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/smart/identify?branch={{branch}}' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}' \
-H 'Content-Type: application/json' \
-d '{
"id": "12345678"
}'
const response = await fetch("{{server}}/api/v1/smart/identify?branch={{branch}}", {
method: "POST",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "12345678"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/smart/identify?branch={{branch}}"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
}
payload = {
"id": "12345678"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Examples (2)
- Not identified
- Identified
Example request
POST
{{server}}/api/v1/smart/identify?branch={{branch}}Query parameters (1)
| Key | Value |
|---|---|
branch | {{branch}} |
Headers (1)
| Key | Value |
|---|---|
Accept | application/json |
Body
{
"id": "12345678"
}
Example response 204 No Content
No response body
Example request
POST
{{server}}/api/v1/smart/identify?branch={{branch}}Query parameters (1)
| Key | Value |
|---|---|
branch | {{branch}} |
Headers (1)
| Key | Value |
|---|---|
Accept | application/json |
Body
{
"id": "12345678"
}
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 | 56 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"id": "12345678",
"data10": "12345678",
"interfaceValue": 1
}