> For the complete documentation index, see [llms.txt](https://api-docs.easyday.dk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.easyday.dk/pim.md).

# PIM

## GET /v1/pim/categories

> Lists all categories for the authenticated tenant.

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/categories":{"get":{"tags":["PIM"],"summary":"Lists all categories for the authenticated tenant.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryVm"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryVm"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryVm"}}}}}}}}},"components":{"schemas":{"CategoryVm":{"required":["id","title"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"title":{"type":"string"},"description":{"type":["null","string"]}}}}}}
```

## GET /v1/pim/products

> Lists products for the authenticated tenant, newest-id-last, paged.

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products":{"get":{"tags":["PIM"],"summary":"Lists products for the authenticated tenant, newest-id-last, paged.","parameters":[{"name":"itemNumber","in":"query","description":"Filter to products having this exact item number (any number type).","schema":{"type":"string"}},{"name":"active","in":"query","description":"Filter to active (true) or inactive (false) products only.","schema":{"type":"boolean"}},{"name":"page","in":"query","description":"1-based page number.","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":1}},{"name":"pageSize","in":"query","description":"Page size, clamped to 1-200.","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PagedResultOfProductListItemVm"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedResultOfProductListItemVm"}},"text/json":{"schema":{"$ref":"#/components/schemas/PagedResultOfProductListItemVm"}}}}}}}},"components":{"schemas":{"PagedResultOfProductListItemVm":{"required":["total","page","pageSize","items"],"type":"object","properties":{"total":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"page":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"pageSize":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductListItemVm"}}},"description":"Paged list response."},"ProductListItemVm":{"required":["id","familyId","active"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"familyId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"active":{"type":"boolean"},"itemNumber":{"type":["null","string"]},"title":{"type":["null","string"]}}}}}}
```

## GET /v1/pim/products/{id}

> Gets one product's identification, title/description, prices and stock.

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products/{id}":{"get":{"tags":["PIM"],"summary":"Gets one product's identification, title/description, prices and stock.","parameters":[{"name":"id","in":"path","description":"Internal product id.","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int32"}},{"name":"languageId","in":"query","description":"Preferred language for title/description; falls back to any available text.","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProductDetailVm"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetailVm"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProductDetailVm"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProductDetailVm":{"required":["id","familyId","active","numbers","prices","stock"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"familyId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"active":{"type":"boolean"},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/ProductNumberVm"}},"title":{"type":["null","string"]},"description":{"type":["null","string"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceVm"}},"stock":{"type":"array","items":{"$ref":"#/components/schemas/ProductStockVm"}}}},"ProductNumberVm":{"required":["type","no"],"type":"object","properties":{"type":{"type":"string"},"no":{"type":"string"}}},"ProductPriceVm":{"required":["id","type","price","inclVat","active"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"type":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"currencyId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"channelId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"price":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"inclVat":{"type":"boolean"},"active":{"type":"boolean"},"dateStart":{"type":["null","string"],"format":"date-time"},"dateEnd":{"type":["null","string"],"format":"date-time"}}},"ProductStockVm":{"required":["id","stockId","amount"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"stockId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"availableDate":{"type":["null","string"],"format":"date-time"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## GET /v1/pim/products/{id}/prices

> Lists all price rows for a product across channels/currencies.

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products/{id}/prices":{"get":{"tags":["PIM"],"summary":"Lists all price rows for a product across channels/currencies.","parameters":[{"name":"id","in":"path","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceVm"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceVm"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceVm"}}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProductPriceVm":{"required":["id","type","price","inclVat","active"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"type":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"currencyId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"channelId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"price":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"inclVat":{"type":"boolean"},"active":{"type":"boolean"},"dateStart":{"type":["null","string"],"format":"date-time"},"dateEnd":{"type":["null","string"],"format":"date-time"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## PUT /v1/pim/products/{id}/prices

> Creates or updates the price for a given type/channel/currency combination\
> (upsert - matched on Type+ChannelId+CurrencyId, not an internal row id).

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products/{id}/prices":{"put":{"tags":["PIM"],"summary":"Creates or updates the price for a given type/channel/currency combination\n(upsert - matched on Type+ChannelId+CurrencyId, not an internal row id).","parameters":[{"name":"id","in":"path","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPriceRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertPriceRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertPriceRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IdResult"}},"application/json":{"schema":{"$ref":"#/components/schemas/IdResult"}},"text/json":{"schema":{"$ref":"#/components/schemas/IdResult"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"UpsertPriceRequest":{"required":["type","price"],"type":"object","properties":{"type":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Price type/tier (tenant-defined, matches ProductPrices.Type).","format":"int32"},"currencyId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"channelId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"price":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"inclVat":{"type":"boolean","description":"Whether decimal UpsertPriceRequest.Price already includes VAT."},"active":{"type":"boolean"},"dateStart":{"type":["null","string"],"format":"date-time"},"dateEnd":{"type":["null","string"],"format":"date-time"}}},"IdResult":{"required":["id"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}},"description":"Returned by create/upsert endpoints that don't return the full resource."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## GET /v1/pim/products/{id}/stock

> Lists stock quantities per warehouse for a product.

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products/{id}/stock":{"get":{"tags":["PIM"],"summary":"Lists stock quantities per warehouse for a product.","parameters":[{"name":"id","in":"path","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductStockVm"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductStockVm"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductStockVm"}}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProductStockVm":{"required":["id","stockId","amount"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"stockId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"availableDate":{"type":["null","string"],"format":"date-time"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## PUT /v1/pim/products/{id}/stock

> Creates or updates the stock quantity for a given warehouse (upsert -\
> matched on StockId, not an internal row id).

```json
{"openapi":"3.1.1","info":{"title":"Easyday Tenant API","version":"v1"},"tags":[{"name":"PIM"}],"paths":{"/v1/pim/products/{id}/stock":{"put":{"tags":["PIM"],"summary":"Creates or updates the stock quantity for a given warehouse (upsert -\nmatched on StockId, not an internal row id).","parameters":[{"name":"id","in":"path","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertStockRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertStockRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertStockRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IdResult"}},"application/json":{"schema":{"$ref":"#/components/schemas/IdResult"}},"text/json":{"schema":{"$ref":"#/components/schemas/IdResult"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"UpsertStockRequest":{"required":["stockId","amount"],"type":"object","properties":{"stockId":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Which of the tenant's warehouses (Stocks.Id) this quantity is for.","format":"int32"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"description":"New on-hand quantity for this warehouse.","format":"double"},"availableDate":{"type":["null","string"],"format":"date-time"}}},"IdResult":{"required":["id"],"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}},"description":"Returned by create/upsert endpoints that don't return the full resource."},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"description":"Error response shape used by 400 Bad Request responses."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```
