WinShopAPI docs
ReferenceCredit

Get a credit account with its movements

Returns one credit account together with its movements in a single response, so a client does not have to call the two endpoints separately. Requires `Permissions.Credit.View`.

GET
/api/credit/{id}/detail

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
amount?|
Formatdecimal
barcode?|
Lengthlength <= 50
createdAt?|
Formatdate-time
id?|
Formatint32
lastModify?|
Formatdate-time
number?|
Lengthlength <= 50
pinCode?|
Lengthlength <= 10
soldDate?|
Formatdate-time
statusId?|

0 - vystavena, neaktivovaná 1 - aktivni 2 - dočasně deaktivovaná 3 - zrušená

Formatint32
userId?|
Formatint32
validFrom?|
Formatdate-time
validTo?|
Formatdate-time
validity?|
Formatint32
movements?array<>
curl -X GET 'https://<your-instance>/api/credit/0/detail' \  -H 'Authorization: Bearer <access-token>'
{  "amount": 0,  "barcode": "string",  "createdAt": "2019-08-24T14:15:22Z",  "id": 0,  "lastModify": "2019-08-24T14:15:22Z",  "number": "string",  "pinCode": "string",  "soldDate": "2019-08-24T14:15:22Z",  "statusId": 0,  "userId": 0,  "validFrom": "2019-08-24T14:15:22Z",  "validTo": "2019-08-24T14:15:22Z",  "validity": 0,  "movements": [    {      "amount": 0,      "cashRegisterId": 0,      "createdAt": "2019-08-24T14:15:22Z",      "creditId": 0,      "deliveryNoteItemId": 0,      "headerInternalId": 0,      "id": 0,      "isImported": true,      "note": "string",      "statusId": 0,      "userId": 0    }  ]}