(Quick Reference)
Service: Save
Description: This web service is used to add a new customer segment object to the database
URL:
https://BASE_URL/api/VERSION/customerSegmentations
Method: POST
Request content type: application/json
Parameters:
Name | Description | Type | Required | Possible values |
---|
reference | the reference of the new segment | String | Yes | |
name | the name of the new segment | String | Yes | |
description | some details about the new segment | String | No | |
reference must be unique
Success Output
Success case: response.status=201
{
"id": 6,
"name": "Segmentation 4",
"reference": "3",
"organization": "Lyon",
"description": null,
"dateCreated": "2016-08-16T08:48:38Z",
"lastUpdated": "2016-08-16T08:48:38Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "missing_param",
"error_description": "reference parameter is missing"
}
{
"error": "not_unique",
"error_description": "reference already used"
}
{
"error": "save_failed",
"error_description": "Failed to save instance"
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}