Get a quality control
const url = 'https://api.sancho-wms.pl/v1/qualityControls.get';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sancho-wms.pl/v1/qualityControls.get \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1 }'Returns one quality control by its numeric id (no integrationId: controls are Sancho’s own) with its lines (items), assignee, attachments and the purchase order, goods received note and goods transfer note it was raised against, read live from the ERP. Each of those documents is null when there is none or the ERP could not answer, and a control naming an integration outside the key’s answers not found. The embedded notes carry tags: null, meaning not loaded; read a note’s tags with its own get.
Authorizations
Dział zatytułowany „Authorizations”Request Bodyrequired
Dział zatytułowany „Request Bodyrequired”object
Example generated
{ "id": 1}Responses
Dział zatytułowany „Responses”Successful response
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "sourceDocumentType": "goodsReceivedNote", "sourceDocumentKind": "external", "status": "new", "items": [ { "result": "notChecked", "checks": [ { "status": "compliant" } ], "level": "orderLine" } ], "purchaseOrder": { "type": "purchaseOrder", "kind": "order", "supplier": { "countryCode": null, "status": "draft", "vatTransactionKind": null, "taxIdCountry": null, "currency": null, "province": null, "phone": null, "email": null, "website": null, "fax": null, "regon": null }, "status": "draft", "relatedDocuments": [], "integrationType": "comarch-optima" }, "goodsReceivedNote": { "type": "goodsReceivedNote", "kind": "external", "supplier": { "countryCode": null, "status": "draft", "vatTransactionKind": null, "taxIdCountry": null, "currency": null }, "recipient": null, "status": "draft", "note": null, "items": [ { "lineId": null, "priceNetBeforeDiscount": null, "discountPercent": null, "pricePrecision": 2, "quantityPrecision": 4, "pkwiu": null } ], "customFields": {}, "customFieldsMeta": {}, "relatedDocuments": [], "snapshotSavedAt": null, "placementsAppliedAt": null, "modifiedAt": null, "modifiedBy": null, "tags": null, "integrationType": "comarch-optima" }, "goodsTransferNote": { "type": "transfer", "kind": "transfer", "status": "draft", "currency": null, "totalNet": null, "items": [ { "lineId": null, "pricePrecision": 2, "quantityPrecision": 4 } ], "customFields": {}, "customFieldsMeta": {}, "relatedDocuments": [], "placementsAppliedAt": null, "modifiedAt": null, "modifiedBy": null, "tags": null, "integrationType": "comarch-optima" }, "attachments": [ { "kind": "certificate", "document": { "linkId": null, "integrationType": "sancho", "type": "attachment", "kind": "goodsReceivedSourceOcr" } } ]}Bad request
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "BAD_REQUEST", "message": "Bad request", "issues": []}Unauthorized
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNAUTHORIZED", "message": "Unauthorized", "issues": []}Payment required
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "PAYMENT_REQUIRED", "message": "Payment required", "issues": []}Forbidden
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "FORBIDDEN", "message": "Forbidden", "issues": []}Not found
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "NOT_FOUND", "message": "Not found", "issues": []}Unprocessable content
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNPROCESSABLE_CONTENT", "message": "Unprocessable content", "issues": []}Too many requests
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "TOO_MANY_REQUESTS", "message": "Too many requests", "issues": []}Internal server error
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": []}Service unavailable
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "SERVICE_UNAVAILABLE", "message": "Service unavailable", "issues": []}