PUT/ products/ :id/
Update product
You can update a specific product.
Attributes
Optional unless marked required
- custom_id
- A unique identifier for the product which is provided by the client. Usually related to the product’s SKU.
- id
- A unique identifier for the product which is given by User automatically.
- brand_name
- A brand name.
- categories
- A list of categories' ids.
- city
- An origin city of a product.
- country
- An origin country of a product.
- created_at
- A creation date of a product.
- image_url
- A URL of a product image.
- name
- A product name.
- product_url
- A URL of a product.
- tags
- A list of tags.
- target_group
- A name of a target
- updated_at
- A date of last product update.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X PUT "https://<your_app_subdomain>.user.com/api/public/products/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Trail running shoes, waterproof",
"product_url": "https://example.com/products/trail-running-shoes",
"image_url": "https://example.com/images/trail-running-shoes.jpg",
"brand_name": "Northpeak"
}'
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/products/:id/",
{
method: "PUT",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Trail running shoes, waterproof",
product_url: "https://example.com/products/trail-running-shoes",
image_url: "https://example.com/images/trail-running-shoes.jpg",
brand_name: "Northpeak",
}),
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/products/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"name" => "Trail running shoes, waterproof",
"product_url" => "https://example.com/products/trail-running-shoes",
"image_url" => "https://example.com/images/trail-running-shoes.jpg",
"brand_name" => "Northpeak",
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.put(
"https://<your_app_subdomain>.user.com/api/public/products/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
json={
"name": "Trail running shoes, waterproof",
"product_url": "https://example.com/products/trail-running-shoes",
"image_url": "https://example.com/images/trail-running-shoes.jpg",
"brand_name": "Northpeak",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"id": 134,"name": "Trail running shoes, waterproof","custom_id": "trail-running-shoes","created_at": "2026-11-17T15:02:17.347920Z","updated_at": "2026-11-17T15:02:18.389899Z","product_url": "https://example.com/products/trail-running-shoes","image_url": "https://example.com/images/trail-running-shoes.jpg","attributes": [],"tags": [],"target_group": null,"brand_name": "Northpeak","city": null,"country": null,"qty": null,"description": null,"special_price": 0,"categories": []}{
"detail": "No Product matches the given query."
}
Response fields
Fields returned in the 200 OK response body.
- id
- A unique identifier for the product which is given by User automatically.
- name
- A product name.
- custom_id
- A unique identifier for the product which is provided by the client. Usually related to the product’s SKU.
- created_at
- A creation date of a product.
- updated_at
- A date of last product update.
- product_url
- A URL of a product.
- image_url
- A URL of a product image.
- attributes
- Custom product attributes that have a value, each with
name,name_std,value,descriptionandvalue_type.- attributes[].
name - A product name.
- attributes[].
name_std - Standardized name of the attribute, used as its key in the API.
- attributes[].
value - Value of the attribute for this product.
- attributes[].
description - Description of the attribute.
- attributes[].
value_type - Value type of the attribute:
1boolean,2integer,3date,4string,5datetime,6fixed (a list of choices),7float or8JSON.
- attributes[].
- tags
- A list of tags.
- target_group
- A name of a target
- brand_name
- A brand name.
- city
- An origin city of a product.
- country
- An origin country of a product.
- qty
- Quantity of the product, or
nullif not set. - description
- Description of the product, or
null. - special_price
- Special price of the product, as a whole number;
0if not set. - categories
- A list of categories' ids.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.