Skip to content

Update add-on

PATCH
/add-ons/{id}
curl --request PATCH \
--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 }'

Changes the fields you send (title, description, price, listing_id) and leaves the others untouched. Returns the updated add-on.

id
required
integer

Add-on’s unique identifier

The fields to change. They can also be wrapped in an add_on object. Any other field is ignored.

Media typeapplication/json
object
title
string

Example

Extended warranty
description
string

Example

Two more years of warranty
price
number

Example

12.5
listing_id

Moves the add-on to another listing

integer

Example

4242

The add-on has been updated

Media typeapplication/json
object
add_on

An extra product or service a buyer can add to a listing, such as gift wrapping or an extended warranty.

object
id

Add-on’s unique identifier

integer
object
string
default: Addon
listing_id

Unique identifier of the listing the add-on belongs to

integer
title
string
description
string
price

Price of the add-on, with up to two decimal places

number format: double
nullable

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

Media typeapplication/json
object
error
object
key
additional properties
any

Example generated

{
"error": {}
}

Missing or wrong API credentials, or add-ons are not enabled for your marketplace (then the body carries an error message)

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

No add-on has this identifier, or no listing has the listing_id you sent

Media typeapplication/json
object
error
string

Example

{
"error": "Add-on with ID 4242 cannot be found"
}