Skip to main content
View as Markdown

Set and Update Prices

This guide shows you how to set and update pricing for your SKUs using BatchUpsertPricing. By the end, you'll have set the selling price and MSRP for one or more SKUs in a country, and you'll know how to confirm each change succeeded.

BatchUpsertPricing is an upsert: if pricing already exists for a partner_sku and country_code pair, the call updates it; if it does not exist, the call creates it.

Prerequisites

Step 1 — Send the pricing update

BatchUpsertPricing (POST /pricing/v1/pricing/upsert) takes an items array. Each item identifies one SKU in one country and carries the fields you want to set.

Each item requires partner_sku and country_code. The price, msrp, and is_active fields are optional and nullable: include a field to set it, or omit it (or send null) to leave the existing value unchanged. Sending null does not clear a value.

The example below sets the price and MSRP for two SKUs in the UAE (ae).

# get_authenticated_session() is provided in docs/snippets/auth.mdx — see Authenticating Your Requests
session = get_authenticated_session()

response = session.post(
"https://noon-api-gateway.noon.partners/pricing/v1/pricing/upsert",
json={
"items": [
{"partner_sku": "MY-SNK-42", "country_code": "ae", "price": 149.00, "msrp": 199.00},
{"partner_sku": "MY-SNK-43", "country_code": "ae", "price": 149.00, "msrp": 199.00},
],
},
headers={"User-Agent": "MyPricingApp/1.0.0"},
timeout=30,
)
response.raise_for_status()
items = response.json()["items"]

Response:

<!-- from: v1BatchUpsertPricingResponse -->
{
"items": [
{
"partner_sku": "MY-SNK-42",
"country_code": "ae",
"status": {"status_id": 0, "status_code": "OK", "message": ""}
},
{
"partner_sku": "MY-SNK-43",
"country_code": "ae",
"status": {"status_id": 0, "status_code": "OK", "message": ""}
}
]
}

The response returns one item per request item, echoing the partner_sku and country_code so you can match each result back to what you sent. Each item carries its own status.

You'll know this worked when every item in the response has status.status_code set to OK and status.status_id set to 0.

Step 2 — Check each item

A 200 response does not mean every price was set. BatchUpsertPricing processes each item independently, so the batch can partially succeed. Check the result at two levels.

HTTP level. A non-2xx response means the whole request failed before any item was processed — for example an authentication failure or an exceeded quota. The body is an rpcStatus object; read message for the reason.

Item level. On a 200, loop over items and inspect each status. A status_code of OK (with status_id 0) means that item was applied. Any other status_code means that item failed and its price was not changed — read status.message for the reason and retry just the failed items.

for item in items:
status = item["status"]
if status["status_code"] != "OK":
print(f"Failed: {item['partner_sku']} ({item['country_code']}): {status['message']}")
ConditionWhat it meansWhat to do
Non-2xx responseThe request failed entirely before processing — auth error or quota exceededRead message on the rpcStatus body. For quota errors, the message states your limit and period.
status_code other than OK on an itemThat SKU was not updated; the rest of the batch may still have succeededRead status.message, fix the item, and resend only the failed items.
warning

A 200 response does not mean all items succeeded. Always inspect status on every item — partial success is normal.

Field rules

  • partner_sku and country_code are required on every item. country_code must be one of ae, sa, or eg.
  • price, msrp, and is_active are optional and nullable. Include a field to set it; omit it or send null to leave the current value unchanged. null never clears a value.
  • price is the selling price. msrp is the crossed-out reference price shown on the listing page.
  • is_active controls whether the SKU is sold on the platform. Set it to false to stop selling without losing the configured price.
  • The same partner_sku in two different countries is two separate items — set pricing per country.

Next steps