Create a return
Any signed in user. Restocks units, records the RETURN movement, and raises the credit note. A sale from another branch gets 403, and returning more units than a line has left gets 400.
POST
/api/v1/returnsAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Request body
requiredapplication/jsonsale_idstringrequiredmin length 1
itemsobject[]requiredmin items 1
Show propertiesHide properties
Array of
objectsale_item_idstringrequiredmin length 1
quantitynumber | stringrequiredrestockablebooleanreasonstringreasonstringclient_mutation_idstringdevice_idstring | nullResponses
201
Return processed
return_idstringrequiredcredit_note_numberstringrequiredtotal_refundstringrequireditems_returnedintegerrequiredmin -9007199254740991 · max 9007199254740991
created_atstringrequired400
sale_id is missing, no items were supplied, a line is not on this sale, a line quantity is not positive, or a line asks for more than its returnable quantity
detailstringrequired401
Not authenticated
detailstringrequired403
Sale belongs to a different branch
detailstringrequired404
Sale not found
detailstringrequired