(Quick Reference)
Service: Update
Description: This web service is used in order to updates a customer segment object into the database
URL:
https://BASE_URL/api/VERSION/customerSegmentations/{id}
URL with external_id:
https://BASE_URL/api/VERSION/customerSegmentations/reference/{id}
Method: PUT
Request content type: application/json
Parameters:
Name | Description | Type | Required | Possible values |
---|
id | id of the segment to update | Long | Yes | 777 |
reference | the new reference value | String | Yes | |
name | the new name value | String | Yes | |
description | the new description value | String | No | |
reference must be unique
Success Output
Success case: response.status=200
{
"id": 4,
"name": "newSegment 4",
"reference": "100",
"organization": "Lyon",
"description": "description 4",
"dateCreated": "2016-08-16T08:45:40Z",
"lastUpdated": "2016-08-16T09:34:13Z"
}
Failure Output
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The customer segmentation with the id 999 doesn't exist."
}
Failure case:response.status = 400
{
"error": "missing_param",
"error_description": "reference parameter is missing"
}
{
"error":"invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
{
"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..."
}