Search Campaigns API: searchCampaigns

The Search Campaigns API is used to check if a customer is part of a specific campaign by name. This is useful for targeting marketing efforts based on campaign involvement.

API Endpoint and Method

URL Format

Copy
https://{B2B_API_URL}/api/v1/profile/b2b/searchCampaigns?campaignName={}

Example URL

Copy
https://api-dev.algonomy.com/rcdpapi/api/v1/profile/b2b/searchCampaigns?campaignName=default

HTTP Method

POST

Request Header Parameters

Parameter

Type Required or Optional

Description

access_token

String

Required

Specifies the access token obtained from the create access token API.
tenant_hash

String

Required

Specifies the tenant hash shared with the tenant.
gcrId String Required Specifies the Golden Customer Record ID (GCR ID).
mobile_number String Required

Specifies customer's mobile number.

Example: "1212121212"

email_address String Required

Specifies customer's email address.

Example: "customer@example.com"

customer_code_external

String

Required

Specifies the external customer code.

Example: "123456"

    Notes:
  • You can send all the parameters (gcrId, mobile_number, and email_address) with the request or just one, as at least one parameter is required.

  • These parameters are supported based on the configuration. If your deployment is configured to use them as columns for deduplication, they will be available for use in the API call.

Request Body

The searchCampaigns API facilitates paginated responses, where the initial request to the API does not require additional pagination parameters. However, for subsequent pages, you can include the page size and a pointer to the last record from the previous page to specify where the next page's results should start appearing.

Copy
{
 "page":1,
 "pageSize": 20
}

Response Body

A successful request returns a "200-OK" status code, accompanied by the retrieved data in the response.

Copy
{
  "status": "OK",
  "message": "",
  "data": {
    "customerId": 115772,
    "currentPage": 1,
    "totalCount": 2,
    "pageSize": 20,
    "dataList": [
      {
        "promotionCode": "TP_720",
        "campaignName": "Default Campaign",
        "campaignDesc": "VM_2"
      },
      {
        "promotionCode": "TP_780",
        "campaignName": "Default Campaign",
        "campaignDesc": "DMETagWithoutRule"
      }
    ]
  }
}