Change customer status request

👍

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 MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNone

Header information

X-CAP-API-AUTH-ORG-IDOrganization ID
X-CAP-UI-AUTH-TOKENA 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)TypeDescription
entityInfo*ObjectInformation about the entity (till, store, zone, concept)
- tillId*StringThe unique identifier for the till associated with the transaction.
- storeId*StringThe unique identifier for the store where the transaction occurs.
- zoneId*StringThe unique identifier for the zone or area the store is associated with.
- conceptId*StringThe unique identifier for the concept or branding associated with the store.
payloadObjectThe Intouch payload for the Customer Status Change Workflow is a structured data set that facilitates changing a customer's status within the Intouch system. This payload contains specific information required to execute this operation.
- IntouchAPITask-PayloadObjectInformation about the Intouch API task
- hostname*StringHostname 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*StringPUT. The HTTP method used for the request
\pathParamsObjectParameters to be included in the endpoint path. See Update customer status API for information on the path parameters. Note: In this workflow, pathParams may not be utilized, as the necessary information is typically provided in the request body.
\queryParams*ObjectParameters to be included in the query string. See Update customer status API for information on the path parameters.
- sourceStringThe source of the request (e.g., INSTORE)
- accountIdStringThe account ID (empty in this case)
- use_asyncStringIndicates whether the request should be processed asynchronously. When a request is processed asynchronously, the program doesn't wait for the response before continuing to execute other tasks. Instead, it proceeds with its operations while the request is being processed in the background.
In this specific case, setting "use_async" to "false" means that the request should be processed synchronously, meaning that the program will wait for the response before moving on to other tasks.
- identifierNameStringThe type of the identifier. Supported values: mobile, email, externalId, cardnumber, cardExternalId, wechat, fbid, and martjackId.
- identifierValueStringThe value of the identifier (e.g., 919780375691 for mobile)
\body*ObjectThe body section contains the essential data for the status change operation
- reasonStringThis field indicates the reason for the status change. It may include information such as why the status is being updated (e.g., for testing purposes)
- labelStringThe label indicates the new status that is to be assigned to the customer. For example, "Suspended" or "Active".
\headers*ObjectHeaders provide additional context and information about the request.
- AuthorizationStringContains the authentication credentials needed to access the Intouch API.
- content-typeStringThe content type of the request (application/JSON in this case). This field specifies that the payload is in JSON format, ensuring that the data is properly interpreted by the API.
{
    "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 NameData TypeDescription
requestIdStringUnique identifier for the request.
userIdIntegerIdentifier for the user making the request.
userNameStringEmail or username of the user making the request.
requestTypeStringType of request being made (e.g., "customer-status-change").
stateStringCurrent state of the request (e.g., "AdminTask").
startTimeDateTimeTimestamp marking the start of the request.
endTimeDateTime/NullTimestamp marking the end of the request, if applicable.
IntouchAPITask-PayloadObjectObject containing specifics of the API call to change customer status.
  hostnameStringThe base URL of the API endpoint.
  pathStringSpecific path to the API endpoint for changing customer status.
  methodStringHTTP method used for the request.
  pathParamsObjectPath parameters for the API call, if any (empty in this case).
  queryParamsObjectQuery parameters for the API call, detailing aspects like source and identifier.
  bodyObjectBody of the API call, containing the reason for the status change and the new label.
  headersObjectHeaders for the API call, including Authorization and Content-Type.
ValidateMakerAccess_OutputBooleanIndicates whether maker access validation was successful.
ValidatePayload_OutputBooleanIndicates 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
        }
    }
}

Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!