Update a Customization¶
Change the information of an existing customization.
Endpoint¶
PATCH https://api.crowdynews.com/publication/customizations/{id}
Request Parameters¶
HEADER FIELD | VALUE DESCRIPTION |
---|---|
Content-Type | The content type of the request body, must be set to application/json . |
URL PARAMETER | VALUE DESCRIPTION |
---|---|
id | The resource ID of the customization. The consumer that wants to update the customization must have access to the contract said customization belongs to, otherwise this action is forbidden. |
QUERY PARAMETER | VALUE DESCRIPTION |
---|---|
access_token | A valid OAuth access token with the correct permission(s). |
REQUEST BODY DATA | VALUE TYPE | VALUE DESCRIPTION |
---|---|---|
name | String | Optional. Identifies the customization in a human readable way and must be unique inside a contract. |
version | String | Optional. Specifies the customization version. This property is auto incremented on update, but can be overridden. |
data | String | Optional. The custom CSS or JavaScript as plain text. |
description | String | Optional. Text that describes the customization. |
active | Boolean | Optional. Specifies if this customization will be processed by the platform. |
Response Format¶
On success, the HTTP status code in the response header is
200 OK
and the response body will contain a customization object in JSON format. On error, the header status code
is an error code and the response
body contains an error object.
Example Request¶
Request:
PATCH https://api.crowdynews.com/publication/customizations/565d4de4046e659546e42253?access_token={your access token}
{
"name": "My Amazing JavaScript Customization",
"data": "while(true);"
}
Response:
HTTP/1.1 200
{
"_id": "565d4de4046e659546e42253",
"created": "2016-03-22T15:01:49.081Z",
"createdBy": "John Doe",
"lastModified": "2016-03-22T15:01:49.081Z",
"lastModifiedBy": "John Doe",
"active": true,
"name": "My Amazing JavaScript Customization",
"contractId":"565c4df4056e859526e62257",
"type": "js",
"data": "while(true);"
"version": "2"
}