WinShopAPI docs
ReferencePromotionsOne time promotions

Create a one-time barcode discount

Creates a one-time barcode discount and returns the stored row. Requires `Permissions.Promotions.Create`.

POST
/api/promotions/one-time-barcode-activated

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Request Body

application/json
  1. body
barcode?string
Lengthlength <= 50
createdAt?|
Formatdate-time
id?integer
Formatint32
isInvalid?boolean
lastModify?|
Formatdate-time
receiptDiscountAmount?|
Formatdecimal
receiptDiscountCompanyId?|
Formatint32
receiptDiscountLimit?|
Formatdecimal
receiptDiscountMinimalAmount?|
Formatdecimal
receiptDiscountPercent?|
Formatdecimal
validFrom?|
Formatdate-time
validTo?|
Formatdate-time

Response Body

application/json
  1. response
barcode?string
Lengthlength <= 50
createdAt?|
Formatdate-time
id?integer
Formatint32
isInvalid?boolean
lastModify?|
Formatdate-time
receiptDiscountAmount?|
Formatdecimal
receiptDiscountCompanyId?|
Formatint32
receiptDiscountLimit?|
Formatdecimal
receiptDiscountMinimalAmount?|
Formatdecimal
receiptDiscountPercent?|
Formatdecimal
validFrom?|
Formatdate-time
validTo?|
Formatdate-time
curl -X POST 'https://<your-instance>/api/promotions/one-time-barcode-activated' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
{  "barcode": "string",  "createdAt": "2019-08-24T14:15:22Z",  "id": 0,  "isInvalid": true,  "lastModify": "2019-08-24T14:15:22Z",  "receiptDiscountAmount": 0,  "receiptDiscountCompanyId": 0,  "receiptDiscountLimit": 0,  "receiptDiscountMinimalAmount": 0,  "receiptDiscountPercent": 0,  "validFrom": "2019-08-24T14:15:22Z",  "validTo": "2019-08-24T14:15:22Z"}