WinShopAPI docs
Reference

Companies

Create a company

Creates a company together with the child collections present in the body and returns it (201, `Location` header set). Requires `Permissions.Companies.Create`.

Get several companies

Returns the companies listed in `companyIds`, each shaped by the `details` sub-queries. Prefer this over looping `GET {companyId}` when you already know the whole set of ids. Requires `Permissions.Companies.View`.

Search companies

Returns one page of companies matching the filter. Companies cover customers and suppliers alike; which one a row is depends on its flags. Body is a `PaginationRequest` — see the *Filtering & pagination* concept in the developer docs. Sortable and limitable fields depend on the instance's data-grid view. Requires `Permissions.Companies.Search`.

Get a company

Returns one company by `companyId`. Use `details` to pick which sub-collections (branches, cards, representatives, …) are loaded; omit it for the header only. Requires `Permissions.Companies.View`.

Update a company

Updates the company and the child collections present in the body, then returns the stored header. Collections the body leaves out are untouched. Requires `Permissions.Companies.Update`.

List authorised persons

Returns the people authorised to act for this company. Requires `Permissions.Companies.View`.

Create an authorised person

Adds an authorised person to the company and returns the stored row. Requires `Permissions.Companies.Create`.

Get an authorised person

Returns one authorised person of the company — someone allowed to collect goods or sign for the company. 404 when they do not belong to `companyId`. Requires `Permissions.Companies.View`.

Update an authorised person

Replaces one authorised person of the company and returns the stored row. Requires `Permissions.Companies.Update`.

List a company's branches

Returns the branches of the company — its delivery and billing sites. Requires `Permissions.Companies.View`.

Create a company branch

Adds a branch to the company and returns it with status 201. Requires `Permissions.Companies.Create`.

Get a company branch

Returns one branch of the company. 404 when `branchId` does not belong to `companyId`. Requires `Permissions.Companies.View`.

Update a company branch

Replaces one branch of the company and returns the stored row. Requires `Permissions.Companies.Update`.

List a company's cards

Returns the loyalty and customer cards registered for the company. Their barcodes are what `POST /api/documents/pos/shopping-session/{sessionId}/scan` resolves to a customer. Requires `Permissions.Companies.View`.

Create a company card

Registers a card for the company and returns the stored row. Requires `Permissions.Companies.Create`.

Get a company card

Returns one loyalty or customer card of the company. 404 when `cardId` does not belong to `companyId`. Requires `Permissions.Companies.View`.

Update a company card

Replaces one card of the company and returns the stored row. Requires `Permissions.Companies.Update`.

List a company's documents

Returns the documents raised for this company across all document types, optionally narrowed to the window between `dateFrom` and `dateTo`. Requires `Permissions.Companies.View`.

List a company's representatives

Returns the sales representatives assigned to this company. Requires `Permissions.Companies.View`.

Create a company representative

Assigns a representative to the company and returns the stored row. Requires `Permissions.Companies.Create`.

Get a company representative

Returns one representative of the company. 404 when `representativeId` does not belong to `companyId`. Requires `Permissions.Companies.View`.

Update a company representative

Replaces one representative of the company and returns the stored row. Requires `Permissions.Companies.Update`.