PATCH
/api/items/{id}| Field | Scope | Description |
|---|---|---|
name |
items:write | Item name, max 200 characters |
description |
items:write | HTML description; cleaned with the same filter as the editor |
version |
items:write | e.g. 2.4.1 β a new version tells your buyers there is an update |
demo_link |
items:write | Live preview URL |
tags Β· files_included Β· framework |
items:write | Comma-separated lists |
replace_pending |
β | true to replace the update that is waiting for review instead of getting 409 pending_update β see Hotfixes |
regular_price Β· extended_price |
items:price | Within the site minimum and maximum. A move of more than 30% (or setting a price that was 0) is held until you confirm it from the email we send β the link asks you to be signed in. Not possible while the item is on discount. |
curl -X PATCH https://sellmycode.net/api/items/123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"version":"2.4.1","regular_price":29}'
$res = (new GuzzleHttp\Client)->patch('https://sellmycode.net/api/items/123', [
'headers' => ['Authorization' => 'Bearer ' . $token],
'json' => ['version' => '2.4.1', 'regular_price' => 29],
]);
const res = await fetch("https://sellmycode.net/api/items/123", {
method: "PATCH",
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({ version: "2.4.1", regular_price: 29 }),
});
res = requests.patch("https://sellmycode.net/api/items/123",
headers={"Authorization": f"Bearer {token}"},
json={"version": "2.4.1", "regular_price": 29})
{
"status": "success",
"item_id": 123,
"mode": "review",
"changed": ["version", "regular_price"],
"update_id": 845,
"replaced_pending": false,
"price_confirmation": null
}
mode is published (live now), review (waiting for approval) or unchanged. When a price move needs your confirmation, price_confirmation carries the held prices and when the email link expires.
#Errors
| Code | HTTP | Meaning |
|---|---|---|
pending_update |
409 | Another update of this item is waiting for review β wait, or send replace_pending: true |
discount_active |
409 | Prices cannot change while the item is on discount |
not_found |
404 | No live item with this id in your account |
nothing_to_change |
422 | No known field was sent |
validation |
422 | A field is invalid β errors lists each one |
Developers