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`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
application/json- body
filter?Endpoint-specific filter. Every field is optional; the ones you set are combined with AND.
limitFields?array<string>|Names of the fields to return; omit it for all of them. Which fields exist depends on the instance's data-grid view.
orderBy?array<string>|Sort order, one entry per level, each written as Field or Field desc. Which fields can be sorted on depends on the instance's data-grid view.
pageNumber?integer1-based page to return. 0 and 1 both mean the first page.
int32pageSize?integerRows per page. Defaults to every matching row, and -1 asks for every row explicitly.
int32application/json- response
currentPage?integer1-based number of the page in this response.
int32data?array<>The rows of this page, shaped by the request's limitFields.
hasNextPage?booleanTrue when a page follows this one.
hasPreviousPage?booleanTrue when a page precedes this one.
pageSize?integerRows per page actually applied, which is 10 when the request asked for a non-positive size.
int32totalCount?integerNumber of rows matching the filter across every page.
int32totalPages?integerNumber of pages the whole result set spans at this page size.
int32curl -X POST 'https://<your-instance>/api/companies/filter-paginated' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{}'{ "currentPage": 0, "data": [ { "address1": "string", "address2": "string", "address3": "string", "alias": "string", "billingName": "string", "city": "string", "companyIdentificationNumber": "string", "companyTypeId": 0, "contactAddressAddress1": "string", "contactAddressAddress2": "string", "contactAddressAddress3": "string", "contactAddressCity": "string", "contactAddressEmail": "string", "contactAddressFax": "string", "contactAddressPhone": "string", "contactAddressWebsiteUrl": "string", "contactAddressZipCode": "string", "country": "string", "createdAt": "2019-08-24T14:15:22Z", "creditWorthinessId": 0, "customersCardBarcode": "string", "dateOfBirth": "2019-08-24T14:15:22Z", "directionOfDeliveryId": 0, "discountGroup": "string", "discountGroupId": 0, "gdprValidConsent": true, "id": 0, "incompleteData": true, "isBazaar": true, "isBreeder": true, "isBroker": true, "isCompetitor": true, "isContact": true, "isEmployee": true, "isEshop": true, "isFranchisee": true, "isInactive": true, "isNaturalPerson": true, "isRetailCustomer": true, "isSupplier": true, "isUnclassified": true, "isWholesaleCustomer": true, "kindOfOperationId": 0, "lastModify": "2019-08-24T14:15:22Z", "name": "string", "nameAbbreviated": "string", "nameWithoutDiacritics": "string", "number": "string", "optional1Id": 0, "optional2Id": 0, "optional3Id": 0, "paymentTypeId": 0, "priceLevelId": 0, "primaryContactEmail": "string", "primaryContactFax": "string", "primaryContactMobilePhone": "string", "primaryContactName": "string", "primaryContactPhone": "string", "primaryContactSurname": "string", "region": "string", "regionId": 0, "specializationId": 0, "vatRegistrationNumber": "string", "zipCode": "string" } ], "hasNextPage": true, "hasPreviousPage": true, "pageSize": 0, "totalCount": 0, "totalPages": 0}Get several companies GET
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`.
Get a company GET
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`.