ReferenceCompanies
Create a company card
Registers a card for the company and returns the stored row. Requires `Permissions.Companies.Create`.
POST
Bearerheader
AuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
companyId*integerFormat
int32application/json- body
barcode?|Length
length <= 255companyId?|Format
int32discount?|Format
decimaldiscountAmount?|Format
decimaldiscountGroupId?|Format
int32guid?|Format
guidid?|Format
int32isBillingEnabled?boolean|nullisInvalid?boolean|nulllastModify?|Format
date-timename?|Length
length <= 80note?string|nullvalidFrom?|Format
date-timevalidTo?|Format
date-timeapplication/json- response
barcode?|Length
length <= 255companyId?|Format
int32discount?|Format
decimaldiscountAmount?|Format
decimaldiscountGroupId?|Format
int32guid?|Format
guidid?|Format
int32isBillingEnabled?boolean|nullisInvalid?boolean|nulllastModify?|Format
date-timename?|Length
length <= 80note?string|nullvalidFrom?|Format
date-timevalidTo?|Format
date-timecurl -X POST 'https://<your-instance>/api/companies/0/cards' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "barcode": "1234567890123", "companyId": 2, "discount": 20, "isInvalid": false, "name": "New Card", "note": "Special gift card", "validFrom": "2022-01-01T00:00:00", "validTo": "2025-01-01T00:00:00"}'{ "barcode": "string", "companyId": 0, "discount": 0, "discountAmount": 0, "discountGroupId": 0, "guid": "string", "id": 0, "isBillingEnabled": true, "isInvalid": true, "lastModify": "2019-08-24T14:15:22Z", "name": "string", "note": "string", "validFrom": "2019-08-24T14:15:22Z", "validTo": "2019-08-24T14:15:22Z"}List a company's cards GET
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`.
Get a company card GET
Returns one loyalty or customer card of the company. 404 when `cardId` does not belong to `companyId`. Requires `Permissions.Companies.View`.