Create or update a price list
curl --request POST \
--url https://api.brandgate.dev/v1/price_lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"name": "<string>",
"items": [
{
"unit_price": "<string>",
"product_external_id": "<string>",
"sku": "<string>"
}
],
"replace": true,
"source_updated_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
name: '<string>',
items: [{unit_price: '<string>', product_external_id: '<string>', sku: '<string>'}],
replace: true,
source_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.brandgate.dev/v1/price_lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/price_lists"
payload = {
"external_id": "<string>",
"name": "<string>",
"items": [
{
"unit_price": "<string>",
"product_external_id": "<string>",
"sku": "<string>"
}
],
"replace": True,
"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/price_lists");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"external_id\": \"<string>\",\n \"name\": \"<string>\",\n \"items\": [\n {\n \"unit_price\": \"<string>\",\n \"product_external_id\": \"<string>\",\n \"sku\": \"<string>\"\n }\n ],\n \"replace\": true,\n \"source_updated_at\": \"2023-11-07T05:31:56Z\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"object": "price_list_sync",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"result": "created",
"items": {
"added": 123,
"updated": 123,
"unchanged": 123,
"removed": 123
},
"unmatched_products": [
"<string>"
],
"error": {
"code": "stale_write",
"message": "<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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Create or update a price list
One price list per request (up to 1000 prices), matched by your external_id. Prices are excl. VAT in each product’s currency. By default listed products are added or updated; with replace: true products not listed are removed from the list. Products that cannot be found are returned in unmatched_products and the rest is saved.
Requires the pricing:write scope.
POST
/
v1
/
price_lists
Create or update a price list
curl --request POST \
--url https://api.brandgate.dev/v1/price_lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"name": "<string>",
"items": [
{
"unit_price": "<string>",
"product_external_id": "<string>",
"sku": "<string>"
}
],
"replace": true,
"source_updated_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
name: '<string>',
items: [{unit_price: '<string>', product_external_id: '<string>', sku: '<string>'}],
replace: true,
source_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.brandgate.dev/v1/price_lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/price_lists"
payload = {
"external_id": "<string>",
"name": "<string>",
"items": [
{
"unit_price": "<string>",
"product_external_id": "<string>",
"sku": "<string>"
}
],
"replace": True,
"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/price_lists");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"external_id\": \"<string>\",\n \"name\": \"<string>\",\n \"items\": [\n {\n \"unit_price\": \"<string>\",\n \"product_external_id\": \"<string>\",\n \"sku\": \"<string>\"\n }\n ],\n \"replace\": true,\n \"source_updated_at\": \"2023-11-07T05:31:56Z\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"object": "price_list_sync",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"result": "created",
"items": {
"added": 123,
"updated": 123,
"unchanged": 123,
"removed": 123
},
"unmatched_products": [
"<string>"
],
"error": {
"code": "stale_write",
"message": "<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>"
}
}{
"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
Response
Success.