# Create Receipts Using this endpoint will create uncommitted receipts. Marking a receipt as committed and thus making the associated adjustments to the item inventory will need to be performed using the Yellow Dog Inventory Client. ### Requirements The following properties must exist in the database in order to be uploaded to a receipt: * Store * Vendor * Items The following requirements are needed for a receipt to be created using this method: * The user making the request has the appropriate Edit permission to the Receipt Editor, in the store that the receipt is being created in. * Only purchase orders that have been committed can be backlinked to a receipt ### BackLinking One common example of backlinking is when a process exists for a location to have a purchase order created for all receipts and purchases of inventory items. This is accomplished by creating a related document for a receipt. In Yellow Dog Inventory, we track the linkage of purchasing documents by the individual lines of a document. To accomplish this, all lines of an existing purchasing document should be marked as the backlink of another document in the process. In example: Given an existing Committed Purchase Order of the following shape. json { "CommdocId": "123e4567-e89b-12d3-a456-426655440025" "type": "PurchaseOrder", "lines": [ { "CommDocLineId": "456e0001-e89b-12d3-a456-426655440000", "quantity": 15, "ItemID":"789e0001-e89b-12d3-a456-426655440000" } ] } Can be fully recieved by sending the following general shape. Notice that the backlinkLineId of the receipt line. json { "type": "Receipt", ..., "lines": [ { "quantity": 15, "ItemID": "789e0001-e89b-12d3-a456-426655440000" "backLinkLineID": "456e0001-e89b-12d3-a456-426655440000" } ] } Endpoint: POST /receipts Version: v3.0: 3.26.2.4 Security: Auth API User Token ## Request fields (application/json-patch+json): - `docNumber` (string, required) - `vendorID` (string, required) - `storeID` (string, required) - `lines` (array, required) - `lines.vendorPrice` (number, required) - `lines.quantity` (number, required) - `lines.itemID` (string, required) - `lines.backLinkLineID` (string,null) - `lines.lineNumber` (integer) - `reference` (string,null) - `description` (string,null) - `instructions` (string,null) - `notes` (string,null) - `paid` (boolean) ## Response 200 fields (application/json): - `id` (string) - `thirdPartyID` (string,null) - `docNumber` (string,null) - `reference` (string,null) - `description` (string,null) - `instructions` (string,null) - `notes` (string,null) - `lines` (array,null) - `lines.thirdPartyLineID` (string,null) - `lines.lineNumber` (integer) - `lines.vendorPrice` (number,null) - `lines.quantity` (number,null) - `lines.backLinkDoc` (object) - `lines.backLinkDoc.type` (string,null) - `lines.backLinkDoc.line` (object) - `lines.backLinkDoc.line.lineNumber` (integer) The position this line appears in the back linked document - `lines.item` (string,null) - `vendor` (string,null) - `store` (string,null) - `committed` (string,null) - `committedByUser` (string,null) - `paid` (boolean) - `createdByUser` (string,null) - `created` (string) - `lastUpdated` (string) ## Response 500 fields (application/json): - `message` (string,null) - `errors` (array,null) - `errors.extensions` (string,null) ## Response 401 fields ## Response 429 fields