Update a Custom API Entry using the settings endpoint
PUThttps://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/entries/:custom_api_entry_id
Update a Custom API Entry using the settings endpoint
Request
Path Parameters
The id 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
Responses
- 200
- 201
- 400
- 404
- 409
- 412
- 413
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
- valid_entry
Schema
data CustomApiEntryAttributesrequired
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"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": 4,
"etag_id": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"
}
}
}
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"
}
}
}
Created
Response Headers
- application/json
- Schema
- Example (from schema)
- valid_entry
Schema
data objectrequired
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"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": 4,
"etag_id": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"
}
}
}
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"
},
"resource_version": 0,
"data_size": 6,
"etag_id": "5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
errors Error[]required
{
"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
errors Error[]required
{
"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
errors Error[]required
{
"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
errors Error[]required
{
"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\"'."
}
]
}
Payload Too Large. The total size of a Custom API Entry must not exceed 64KB.
- application/json
- Schema
- Example (from schema)
- too-large
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Requested entity too large
{
"errors": [
{
"title": "Request Entity Too Large",
"status": "413",
"detail": "Maximum entry size reached."
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors Error[]required
{
"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"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/entries/:custom_api_entry_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"type": "string"
}
}'