Skip to content

Update one of your listings (PATCH)

PATCH
/listings/{listing_id}/edit
curl --request PATCH \
--url https://acme.mykreezalid.com/front_api/v1/listings/4242/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "Blue city bike", "description": "example", "category_id": 31, "order_type_url_token": "example", "price": 120, "sku": "SKU-4242", "quantity": 12, "external_id": "REF-4242", "location": "10 Main Street, Springfield", "city": "Springfield", "country": "US", "status": "draft", "visibility": "both", "attributes": {}, "tags": [ "summer", "bikes" ], "medias": [ "https://cdn.example.com/bike-front.jpg" ] }'

Same operation as PUT /listings/{listing_id}/edit: only the fields you send change.

listing_id
required
integer

Listing ID.

Example

4242

The fields to change. Other listing fields are stored as sent.

Media typeapplication/json
object
title

Title of the listing.

string

Example

Blue city bike
description

Description. HTML is converted to plain text.

string
category_id
integer

Example

31
order_type_url_token

URL key of the order type to move the listing to.

string
price
number

Example

120
sku
string

Example

SKU-4242
quantity
integer

Example

12
external_id
string

Example

REF-4242
location
string

Example

10 Main Street, Springfield
city
string

Example

Springfield
country
string

Example

US
status
string
Allowed values: draft published archived
visibility
string
Allowed values: both catalog search none
attributes

Attribute values keyed by attribute alias.

object
key
additional properties
any
tags

Tags of the listing, as tag IDs or tag terms.

Array<string>

Example

[
"summer",
"bikes"
]
medias

Image URLs. When the array is not empty, it replaces all the images of the listing, in this order. The URLs are stored as sent, not copied.

Array<string>

Example

[
"https://cdn.example.com/bike-front.jpg"
]

Outcome of the update. success is false (message Error. No updates were made.) when the listing could not be saved.

Media typeapplication/json
object
message
string
success
boolean

Example

{
"message": "Listing has been updated",
"success": true
}

No valid access token was sent.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}

No listing with this ID among your listings.