POST/ products/
Create product
You can create a 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.
- 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 POST "https://<your_app_subdomain>.user.com/api/public/products/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"custom_id": "two-person-tent",
"name": "Two-person tent",
"categories": [
90
]
}'
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/products/",
{
method: "POST",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
"Content-Type": "application/json",
},
body: JSON.stringify({
custom_id: "two-person-tent",
name: "Two-person tent",
categories: [
90,
],
}),
},
);
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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"custom_id" => "two-person-tent",
"name" => "Two-person tent",
"categories" => [
90,
],
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.post(
"https://<your_app_subdomain>.user.com/api/public/products/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
json={
"custom_id": "two-person-tent",
"name": "Two-person tent",
"categories": [
90,
],
},
)
print(response.json())
Response examples
- 201 Created
{"id": 114,"name": "Two-person tent","custom_id": "two-person-tent","created_at": "2026-11-10T09:33:13.332566Z","updated_at": "2026-11-10T09:33:13.332577Z","product_url": null,"image_url": null,"attributes": [],"tags": [],"target_group": null,"brand_name": null,"city": null,"country": null,"qty": null,"description": null,"special_price": 0,"categories": [90]}Response fields
Fields returned in the 201 Created 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. - 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.