Update add-on (PUT)
const url = 'https://acme.mykreezalid.com/api/v1/add-ons/1';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"title":"Extended warranty","description":"Two more years of warranty","price":12.5,"listing_id":4242}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://acme.mykreezalid.com/api/v1/add-ons/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Extended warranty", "description": "Two more years of warranty", "price": 12.5, "listing_id": 4242 }'Same as Update add-on: PUT is accepted with the same behaviour, so only the fields you send change.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Add-on’s unique identifier
Request Bodyrequired
Section titled “Request Bodyrequired”The fields to change. They can also be wrapped in an add_on object. Any other field is ignored.
object
Example
Extended warrantyExample
Two more years of warrantyExample
12.5Moves the add-on to another listing
Example
4242Responses
Section titled “Responses”The add-on has been updated
object
An extra product or service a buyer can add to a listing, such as gift wrapping or an extended warranty.
object
Add-on’s unique identifier
Unique identifier of the listing the add-on belongs to
Price of the add-on, with up to two decimal places
Example
{ "add_on": { "id": 4242, "object": "Addon", "listing_id": 324353, "title": "Extended Warranty", "description": "Protect your purchases beyond the standard warranty period", "price": 12.5 }}The add-on could not be saved; error lists the invalid fields
object
object
Example generated
{ "error": {}}Missing or wrong API credentials, or add-ons are not enabled for your marketplace (then the body carries an error message)
object
Example generated
{ "error": "example"}No add-on has this identifier, or no listing has the listing_id you sent
object
Example
{ "error": "Add-on with ID 4242 cannot be found"}