Update product by ID
const url = 'https://api.loyx.se/partners/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"brand":"example","categories":["example"],"description":"example","external_product_id":"example","identifiers":[{"type":"example","value":"example"}],"is_loyalty_program_eligible":true,"loyx_app_active":true,"loyx_business_app_active":true,"name":"example","page_url":"example","price":{"currency":"SEK","value":1},"stores":[{"price":{"currency":"SEK","value":1},"store_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}],"unit":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.loyx.se/partners/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "brand": "example", "categories": [ "example" ], "description": "example", "external_product_id": "example", "identifiers": [ { "type": "example", "value": "example" } ], "is_loyalty_program_eligible": true, "loyx_app_active": true, "loyx_business_app_active": true, "name": "example", "page_url": "example", "price": { "currency": "SEK", "value": 1 }, "stores": [ { "price": { "currency": "SEK", "value": 1 }, "store_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "unit": "example" }'Partially update a product. Only include the fields you want to change. Omitted fields are left unchanged. Set a field to null to clear it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The product’s internal UUID.
The product’s internal UUID.
Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Partial update for an existing product.
Only fields explicitly sent in the request body are applied. Fields sent
as null clear their value, except price, name, loyx_app_active,
loyx_business_app_active and is_loyalty_program_eligible, which cannot
be cleared; omitted fields are left unchanged. Immutable
fields (company_id, company_logo_url, etc.) are rejected at the service
layer.
object
Typed product identifier (gtin / ean13 / ean8 / sku / pos).
object
Identifier type: gtin, ean13, ean8, sku, or pos.
Monetary amount in minor units + currency code (request input).
object
ISO 4217 currency code
Amount in minor units (e.g. öre, cents)
Store assortment entry: a store that carries the product.
object
Monetary amount in minor units + currency code (request input).
object
ISO 4217 currency code
Amount in minor units (e.g. öre, cents)
Internal UUID of a store that carries this product.
Responses
Section titled “Responses”The updated product.
Catalog-only product response.
Per-store pricing lives in the stores_products schemas
(GET /stores/{store_id}/products).
object
Typed product identifier in API responses.
object
Monetary amount in minor units + currency code + formatting metadata (response).
Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.
object
ISO 4217 currency code
RFC 5646 locale for formatting (e.g. sv-SE)
Divisor to convert to major units (e.g. 100 for SEK)
Amount in minor units (e.g. öre, cents)
Example
{ "price": { "currency": "SEK" }}missing_token, invalid_authorization_header or invalid_token: get a new access token and retry once.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}insufficient_scope: the API key lacks the scope this route needs.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Product not found.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Another product already has this external_product_id.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Validation Error
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}rate_limit_exceeded: wait Retry-After seconds.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}internal_server_error or database_error (type internal_error): our fault. Retry with backoff; quote request_id.
Standard error response format.
object
Error detail structure (Stripe-like format).
object
Machine-readable error code
One failing field of a validation error.
object
Why the value was refused
Dotted path of the field, e.g. items.0.unit_price.value
Human-readable error message
Error type category
Example generated
{ "error": { "code": "example", "details": [ { "message": "example", "param": "example" } ], "doc_url": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}