post https://{host}/v2/api_gateway/v2/request-workflow/CUSTOMER-STATUS-CHANGE
Note
- For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
This API allows you to initiate a request to change the customer status of a customer.
API endpoint example
[https://eucrm.cc.capillarytech.com/api_gateway/v2/request-workflow/CUSTOMER-STATUS-CHANGE
Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
- Maker request access (CanMakeRequest). Contact the access team for access.
Resource information
| URI | /api_gateway/v2/request-workflow/{requestType} |
| HTTP Method | POST |
| Pagination | No |
| Batch support | No |
| Rate limit information | None |
Header information
| X-CAP-API-AUTH-ORG-ID | Organization ID |
| X-CAP-UI-AUTH-TOKEN | A JSON Web Token (JWT) is used for intouch user authentication. CanMakeRequest access is required to generate this token. |
Request body parameters
The request body contains essential entity information, including store, zone, and concept identifiers, along with a payload for the Intouch API task.
| Parameter (Parameters marked * are mandatory) | Type | Description |
|---|---|---|
entityInfo* | Object | Information about the entity (till, store, zone, concept). |
tillId* | String | The unique identifier for the till associated with the transaction. |
storeId* | String | The unique identifier for the store where the transaction occurs. |
zoneId* | String | The unique identifier for the zone or area the store is associated with. |
conceptId* | String | The unique identifier for the concept or branding associated with the store. |
payload | Object | The Intouch payload for the Customer Status Change Workflow. It facilitates changing a customer’s status within the Intouch system and includes specific data needed for this operation. |
IntouchAPITask-Payload | Object | Information about the Intouch API task. |
hostname* | String | Hostname for the API endpoint. Example: https://eucrm-new.cc.capillarytech.com. |
path* | String | /v2/customers/lookup/status. This is the API that manages customer status changes. |
method* | String | PUT. The HTTP method used for the request. |
pathParams | Object | Parameters to be included in the endpoint path. See Update customer status API for details. Note: In this workflow, pathParams may not be used, as the required information is typically included in the request body. |
queryParams* | Object | Parameters to be included in the query string. See Update customer status API for details. |
source | String | The source of the request (for example, INSTORE). |
accountId | String | The account ID (empty in this case). |
use_async | String | Indicates whether the request should be processed asynchronously. Setting use_async to false means the request will be processed synchronously (the program waits for the response before continuing). |
identifierName | String | The type of identifier. Supported values: mobile, email, externalId, cardnumber, cardExternalId, wechat, fbid, and martjackId. |
identifierValue | String | The value of the identifier (for example, 919780375691 for mobile). |
body* | Object | Contains essential data for the status change operation. |
reason | String | Indicates the reason for the status change (for example, “testing purpose”). |
label | String | The label indicates the new status to assign to the customer (for example, “Suspended” or “Active”). |
headers* | Object | Headers provide additional context and information about the request. |
Authorization | String | Contains the authentication credentials needed to access the Intouch API. |
content-type | String | Specifies the request content type (application/json). Ensures the API correctly interprets the JSON payload. |
{
"entityInfo": {
"tillId" : "50682289",
"storeId": "50682288",
"zoneId": "50682286",
"conceptId": "50678331"
},
"payload": {
"IntouchAPITask-Payload": {
"hostname": "<https://eu.api.capillarytech.com>",
"path": "/v2/customers/lookup/status",
"method": "POST",
"pathParams": {},
"queryParams": {
"source": "INSTORE",
"accountId": "",
"use_async": "false",
"identifierName": "mobile",
"identifierValue": "919780375690"
},
"body": {
"reason": "testing",
"label": "Suspended"
},
"headers": {
"Authorization": "Basic cHVuLjAxOjIwMmNiOTYyYWM1OTA3NWI5NjRiMDcxNTJkMjM0Yjcw",
"content-type": "application/json"
}
}
}
}
Response parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| requestId | String | Unique identifier for the request. |
| userId | Integer | Identifier for the user making the request. |
| userName | String | Email or username of the user making the request. |
| requestType | String | Type of request being made (e.g., "customer-status-change"). |
| state | String | Current state of the request (e.g., "AdminTask"). |
| startTime | DateTime | Timestamp marking the start of the request. |
| endTime | DateTime/Null | Timestamp marking the end of the request, if applicable. |
| IntouchAPITask-Payload | Object | Object containing specifics of the API call to change customer status. |
| hostname | String | The base URL of the API endpoint. |
| path | String | Specific path to the API endpoint for changing customer status. |
| method | String | HTTP method used for the request. |
| pathParams | Object | Path parameters for the API call, if any (empty in this case). |
| queryParams | Object | Query parameters for the API call, detailing aspects like source and identifier. |
| body | Object | Body of the API call, containing the reason for the status change and the new label. |
| headers | Object | Headers for the API call, including Authorization and Content-Type. |
| ValidateMakerAccess_Output | Boolean | Indicates whether maker access validation was successful. |
| ValidatePayload_Output | Boolean | Indicates whether payload validation was successful. |
{
"data": {
"requestId": "113cff87-62a5-11ee-aa6d-0aaee4e533d2",
"userId": 232134,
"userName": "[email protected]",
"requestType": "customer-status-change",
"state": "AdminTask",
"startTime": "2023-10-04T16:29:19",
"endTime": null,
"details": {
"IntouchAPITask-Payload": {
"hostname": "<https://crm-nightly-new.cc.capillarytech.com>",
"path": "/v2/customers/lookup/status",
"method": "PUT",
"pathParams": {},
"queryParams": {
"source": "INSTORE",
"accountId": "",
"use_async": "false",
"identifierName": "mobile",
"identifierValue": "919780375690"
},
"body": {
"reason": "testing",
"label": "Suspended"
},
"headers": {
"Authorization": "Basic cHVuLjAxOjIwMmNiOTYyYWM1OTA3NWI5NjRiMDcxNTJkMjM0Yjcw",
"content-type": "application/json"
}
},
"ValidateMakerAccess_Output": true,
"ValidatePayload_Output": true
}
}
}
