Create or update products
curl --request POST \
--url https://api.brandgate.dev/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"external_id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
external_id: '<string>',
sku: '<string>',
name: '<string>',
description: '<string>',
category: '<string>',
unit_price: '<string>',
vat_rate: '<string>',
source_updated_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.brandgate.dev/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/products"
payload = { "items": [
{
"external_id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.brandgate.dev/v1/products");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"items\": [\n {\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"vat_rate\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"object": "batch_result",
"results": [
{
"external_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": "created",
"error": {
"code": "stale_write",
"message": "<string>",
"existing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"counts": {
"created": 123,
"updated": 123,
"unchanged": 123,
"errors": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Create or update products
Up to 200 products per request, matched by your external_id (an existing product with the same sku is adopted on first sight). Fields you leave out are not changed; null clears description, category and vat_rate. Prices are excl. VAT. Stock is set with the inventory endpoint. Each item succeeds or fails on its own.
Requires the products:write scope.
POST
/
v1
/
products
Create or update products
curl --request POST \
--url https://api.brandgate.dev/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"external_id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
external_id: '<string>',
sku: '<string>',
name: '<string>',
description: '<string>',
category: '<string>',
unit_price: '<string>',
vat_rate: '<string>',
source_updated_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.brandgate.dev/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/products"
payload = { "items": [
{
"external_id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.brandgate.dev/v1/products");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"items\": [\n {\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"vat_rate\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"object": "batch_result",
"results": [
{
"external_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": "created",
"error": {
"code": "stale_write",
"message": "<string>",
"existing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"counts": {
"created": 123,
"updated": 123,
"unchanged": 123,
"errors": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
apiKeyoauth2
An organization API key (bg_live_…), created in BrandGate under Settings → API & MCP.
Body
application/json
Required array length:
1 - 200 elementsShow child attributes
Show child attributes