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. It facilitates changing a customer’s status within the Intouch system and includes specific data needed for 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 details. Note: In this workflow, pathParams may not be used, as the required information is typically included in the request body.
queryParams*ObjectParameters to be included in the query string. See Update customer status API for details.
    sourceStringThe source of the request (for example, INSTORE).
    accountIdStringThe account ID (empty in this case).
    use_asyncStringIndicates 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).
    identifierNameStringThe type of identifier. Supported values: mobile, email, externalId, cardnumber, cardExternalId, wechat, fbid, and martjackId.
    identifierValueStringThe value of the identifier (for example, 919780375691 for mobile).
body*ObjectContains essential data for the status change operation.
    reasonStringIndicates the reason for the status change (for example, “testing purpose”).
    labelStringThe label indicates the new status to assign 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-typeStringSpecifies 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 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
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!