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
Bearerheader
AuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
id*integerFormat
int32application/json- response
amount?|Format
decimalbarcode?|Length
length <= 50createdAt?|Format
date-timeid?|Format
int32lastModify?|Format
date-timenumber?|Length
length <= 50pinCode?|Length
length <= 10soldDate?|Format
date-timestatusId?|0 - vystavena, neaktivovaná 1 - aktivni 2 - dočasně deaktivovaná 3 - zrušená
Format
int32userId?|Format
int32validFrom?|Format
date-timevalidTo?|Format
date-timevalidity?|Format
int32movements?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 } ]}Book a credit movement PUT
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`.
List a credit account's movements GET
Returns every top-up and draw-down booked against the credit account, newest state last. Requires `Permissions.Credit.View`.