WinShopAPI docs
ReferenceItem lists

Companies / Discount groups

List discount groups

GET
/api/item-lists/companies/discount-groups

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.

Response Body

application/json
  1. response
[index: integer]?
curl -X GET 'https://<your-instance>/api/item-lists/companies/discount-groups' \  -H 'Authorization: Bearer <access-token>'
[  {    "credit": 0,    "dueDate": 0,    "guid": "string",    "id": 0,    "name": "string",    "nextGroupId": 0,    "paymentTypeId": 0,    "previousGroupId": 0,    "transitionLimit": 0,    "turnoverMinimum": 0  }]

Create a discount group

POST
/api/item-lists/companies/discount-groups

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
credit?|
Formatdecimal
dueDate?|
Formatint32
guid?string
Formatguid
id?integer
Formatint32
name?|
Lengthlength <= 80
nextGroupId?|
Formatint32
paymentTypeId?|
Formatint32
previousGroupId?|
Formatint32
transitionLimit?|
Formatdecimal
turnoverMinimum?|
Formatdecimal

Response Body

application/json
  1. response
credit?|
Formatdecimal
dueDate?|
Formatint32
guid?string
Formatguid
id?integer
Formatint32
name?|
Lengthlength <= 80
nextGroupId?|
Formatint32
paymentTypeId?|
Formatint32
previousGroupId?|
Formatint32
transitionLimit?|
Formatdecimal
turnoverMinimum?|
Formatdecimal
curl -X POST 'https://<your-instance>/api/item-lists/companies/discount-groups' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
{  "credit": 0,  "dueDate": 0,  "guid": "string",  "id": 0,  "name": "string",  "nextGroupId": 0,  "paymentTypeId": 0,  "previousGroupId": 0,  "transitionLimit": 0,  "turnoverMinimum": 0}

Get a discount group

GET
/api/item-lists/companies/discount-groups/{id}

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.

Path Parameters

id*integer
Formatint32

Response Body

application/json
  1. response
credit?|
Formatdecimal
dueDate?|
Formatint32
guid?string
Formatguid
id?integer
Formatint32
name?|
Lengthlength <= 80
nextGroupId?|
Formatint32
paymentTypeId?|
Formatint32
previousGroupId?|
Formatint32
transitionLimit?|
Formatdecimal
turnoverMinimum?|
Formatdecimal
curl -X GET 'https://<your-instance>/api/item-lists/companies/discount-groups/0' \  -H 'Authorization: Bearer <access-token>'
{  "credit": 0,  "dueDate": 0,  "guid": "string",  "id": 0,  "name": "string",  "nextGroupId": 0,  "paymentTypeId": 0,  "previousGroupId": 0,  "transitionLimit": 0,  "turnoverMinimum": 0}

Update a discount group

PATCH
/api/item-lists/companies/discount-groups/{id}

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.

Path Parameters

id*integer
Formatint32

Request Body

application/json
  1. body
credit?|
Formatdecimal
dueDate?|
Formatint32
guid?string
Formatguid
id?integer
Formatint32
name?|
Lengthlength <= 80
nextGroupId?|
Formatint32
paymentTypeId?|
Formatint32
previousGroupId?|
Formatint32
transitionLimit?|
Formatdecimal
turnoverMinimum?|
Formatdecimal

Response Body

application/json
  1. response
credit?|
Formatdecimal
dueDate?|
Formatint32
guid?string
Formatguid
id?integer
Formatint32
name?|
Lengthlength <= 80
nextGroupId?|
Formatint32
paymentTypeId?|
Formatint32
previousGroupId?|
Formatint32
transitionLimit?|
Formatdecimal
turnoverMinimum?|
Formatdecimal
curl -X PATCH 'https://<your-instance>/api/item-lists/companies/discount-groups/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
{  "credit": 0,  "dueDate": 0,  "guid": "string",  "id": 0,  "name": "string",  "nextGroupId": 0,  "paymentTypeId": 0,  "previousGroupId": 0,  "transitionLimit": 0,  "turnoverMinimum": 0}

Delete a discount group

DELETE
/api/item-lists/companies/discount-groups/{id}

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.

Path Parameters

id*integer
Formatint32

Response Body

curl -X DELETE 'https://<your-instance>/api/item-lists/companies/discount-groups/0' \  -H 'Authorization: Bearer <access-token>'
Empty