Update a Custom API Entry
PUT/v2/extensions/:customApiSlug/:customApiEntryId
Update a Custom API Entry
Request
Path Parameters
The slug of the Custom API.
The id of the Custom Entry.
Header Parameters
When If-Match is set, the value must be W/"{etag_id}". If the value of the header matches, the request completes. If not, HTTP 412 Precondition Failed is returned.
- application/json
Body
data CustomApiEntryAttributesrequired
Specifies the type of the resource object, use the api_type
of the Custom API for Custom API Entry.
Specifies the data for this Custom API Entry, each key must match a slug
of a Custom Field. The corresponding value must conform to the defined field_type
and meet the validation defined for that field if set.
links object
meta Meta (integer)
timestamps Timestampsrequired
Responses
- 200
- 400
- 404
- 409
- 412
- default
OK
Response Headers
ETag string
A unique identifier representing the current version of the resource. When the resource changes, the ETag value will also change.
- application/json
- Schema
- Example (from schema)
- valid_entry
Schema
data CustomApiEntryAttributesrequired
The unique identifier for the Custom API Entry
Specifies the type of the resource object, use the api_type
of the Custom API for Custom API Entry.
Specifies the data for this Custom API Entry, each key must match a slug
of a Custom Field. The corresponding value must conform to the defined field_type
and meet the validation defined for that field if set.
links object
Specifies the URI of the Custom API Entry.
meta Meta (integer)
timestamps Timestampsrequired
Specifies the date the entity is created.
Specifies the date the entity is last updated.
Default value: 0
Specifies the sum of the size of each value stored for the Custom API Entry in bytes. The total size of a Custom API Entry must not exceed 64KB.
Default value: 0
A unique identifier representing the current version of the resource. When the resource changes, the resource_version
value will also change.
A unique identifier representing the current version of the resource that is a hashed string. When the resource changes, the etag_id
will also change.
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"links": {
"self": "/extensions/wishlists/7e067539-6f6c-46e1-8c55-940031b36c6a"
},
"meta": 0
}
}
Default Wishlist
{
"data": {
"id": "7e067539-6f6c-46e1-8c55-940031b36c6a",
"type": "wishlist_ext",
"name": "My Wishlist",
"items_count": 0,
"keep_purchased": false,
"links": {
"self": "/extensions/wishlists/7e067539-6f6c-46e1-8c55-940031b36c6a"
},
"meta": {
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244Z",
"created_at": "2017-01-10T11:41:19.244Z"
},
"data_size": 6,
"resource_version": 1,
"etag_id": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Required field missing
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "The field 'name' is required."
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Requested entity not found
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "Not found"
}
]
}
Unable to perform the operation at this time.
- application/json
- Schema
- Example (from schema)
- duplicate-custom-api
- duplicate-custom-field
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Duplicate Custom API
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "custom_api with the given api_type already exists"
}
]
}
Duplicate Custom Field
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "custom_field with the given slug already exists"
}
]
}
Precondition Failed.
- application/json
- Schema
- Example (from schema)
- pre-request-failed
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Provided ETag does not match the current ETag.
{
"errors": [
{
"title": "Precondition Failed",
"status": "412",
"detail": "The provided ETag 'W/\"4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a\"', does not match the current ETag 'W/\"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d\"'."
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}