WinShopAPI docs
ReferenceCredit

Book a credit movement

Applies the requested change to the credit account's balance and returns the account's movements, including the one just booked. Requires `Permissions.Credit.View`.

PUT
/api/credit/{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
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
note?string|null

Response Body

application/json
  1. response
[index: integer]?
curl -X PUT 'https://<your-instance>/api/credit/0' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{}'
[  {    "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  }]