WinShopAPI docs
ReferenceItem lists

Units

List units

GET
/api/item-lists/units

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/units' \  -H 'Authorization: Bearer <access-token>'
[  {    "conversionToSIBaseUnit": 0,    "id": 0,    "indivisible": true,    "isInvisible": true,    "label": "string",    "name": "string",    "quantityCoefficient": 0  }]

Create an unit

POST
/api/item-lists/units

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
conversionToSIBaseUnit?|
Formatdecimal
id?integer
Formatint32
indivisible?boolean|null
isInvisible?boolean|null
label?|
Lengthlength <= 40
name?|
Lengthlength <= 40
quantityCoefficient?|
Formatdecimal

Response Body

application/json
  1. response
conversionToSIBaseUnit?|
Formatdecimal
id?integer
Formatint32
indivisible?boolean|null
isInvisible?boolean|null
label?|
Lengthlength <= 40
name?|
Lengthlength <= 40
quantityCoefficient?|
Formatdecimal
curl -X POST 'https://<your-instance>/api/item-lists/units' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
{  "conversionToSIBaseUnit": 0,  "id": 0,  "indivisible": true,  "isInvisible": true,  "label": "string",  "name": "string",  "quantityCoefficient": 0}

Get an unit

GET
/api/item-lists/units/{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
conversionToSIBaseUnit?|
Formatdecimal
id?integer
Formatint32
indivisible?boolean|null
isInvisible?boolean|null
label?|
Lengthlength <= 40
name?|
Lengthlength <= 40
quantityCoefficient?|
Formatdecimal
curl -X GET 'https://<your-instance>/api/item-lists/units/0' \  -H 'Authorization: Bearer <access-token>'
{  "conversionToSIBaseUnit": 0,  "id": 0,  "indivisible": true,  "isInvisible": true,  "label": "string",  "name": "string",  "quantityCoefficient": 0}

Update an unit

PATCH
/api/item-lists/units/{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
conversionToSIBaseUnit?|
Formatdecimal
id?integer
Formatint32
indivisible?boolean|null
isInvisible?boolean|null
label?|
Lengthlength <= 40
name?|
Lengthlength <= 40
quantityCoefficient?|
Formatdecimal

Response Body

application/json
  1. response
conversionToSIBaseUnit?|
Formatdecimal
id?integer
Formatint32
indivisible?boolean|null
isInvisible?boolean|null
label?|
Lengthlength <= 40
name?|
Lengthlength <= 40
quantityCoefficient?|
Formatdecimal
curl -X PATCH 'https://<your-instance>/api/item-lists/units/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
{  "conversionToSIBaseUnit": 0,  "id": 0,  "indivisible": true,  "isInvisible": true,  "label": "string",  "name": "string",  "quantityCoefficient": 0}

Delete an unit

DELETE
/api/item-lists/units/{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/units/0' \  -H 'Authorization: Bearer <access-token>'
Empty