The customer segmentation APIs work asynchronously. The first API call allows the brand to run the segmentation simulation job. The second API can be used to subsequently poll the status of the previous API, & if the job status is completed, the segmentation data can be retrieved over a file.
This API allows the brands to trigger the customer segmentation simulation based on the thresholds configured. This API will asynchronously initiate a job to generate & export the customer segmentation data file for your brand. To download the generated file, you need to call "Fetch Customer segmentation file" API.
POST
/api/v1/return-exchange-intelligence/customer-segmentation/customer-segment-data-file
Method: POST
Content-Type: application/json
Authentication: Via username and key as query parameters
Body: None
Request cURL
curl --location --request POST \
'https://www.clickpost.in/api/v1/return-exchange-intelligence/customer-segmentation/customer-segment-data-file?username=<your-enterprise-username>&key=<your-enterprise-key>'
Success response
Success response will be retrieved when the job has started successfully.
{
"meta": {
"message": "SUCCESS",
"success": true,
"status": 200
},
"result": {
"job_id": 12345,
"status": "PENDING"
}
}
Error response
When the service is unavailable, the API returns HTTP 200 and the request is rejected.
{
"meta": {
"status": 320,
"message": "This service is not subscribed by you",
"success": false
}
}