# Receipt endpoints

## The Receipt object

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"components":{"schemas":{"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"}}}}
```

## GET /api/receipts/{receiptId}

> Get receipt

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read inbound processes and receipts.","name":"Inbound (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/receipts/{receiptId}":{"get":{"deprecated":false,"description":"","operationId":"getReceipt","parameters":[{"in":"path","name":"receiptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get receipt","tags":["Inbound (Inventory)"]}}}}
```

## PUT /api/receipts/{receiptId}

> Update receipt

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read inbound processes and receipts.","name":"Inbound (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InboundReceiptForUpdate":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptCommentForUpdate"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItemForUpdate"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","version"],"title":"InboundReceiptForUpdate","type":"object","description":"InboundReceiptForUpdate"},"InboundReceiptCommentForUpdate":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptCommentForUpdate","type":"object","description":"InboundReceiptCommentForUpdate"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItemForUpdate":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receival of this item","items":{"$ref":"#/components/schemas/InboundReceiptCommentForUpdate"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItemForUpdate","type":"object","description":"InboundReceiptLineItemForUpdate"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/receipts/{receiptId}":{"put":{"deprecated":false,"description":"","operationId":"putReceipt","parameters":[{"in":"path","name":"receiptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundReceiptForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update receipt","tags":["Inbound (Inventory)"]}}}}
```

## PATCH /api/receipts/{receiptId}

> Update receipt

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read inbound processes and receipts.","name":"Inbound (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InboundReceiptForPatch":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptCommentForUpdate"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItemForUpdate"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["version"],"title":"InboundReceiptForPatch","type":"object","description":"InboundReceiptForPatch"},"InboundReceiptCommentForUpdate":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptCommentForUpdate","type":"object","description":"InboundReceiptCommentForUpdate"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItemForUpdate":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receival of this item","items":{"$ref":"#/components/schemas/InboundReceiptCommentForUpdate"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItemForUpdate","type":"object","description":"InboundReceiptLineItemForUpdate"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/receipts/{receiptId}":{"patch":{"deprecated":false,"description":"","operationId":"patchReceipt","parameters":[{"in":"path","name":"receiptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundReceiptForPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update receipt","tags":["Inbound (Inventory)"]}}}}
```

## POST /api/receipts

> Create receipt

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read inbound processes and receipts.","name":"Inbound (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ReceiptForCreation":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptCommentForCreation"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItemForCreation"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"}},"required":["receivedDate","receivedItems","comments","facilityRef"],"title":"ReceiptForCreation","type":"object","description":"ReceiptForCreation"},"InboundReceiptCommentForCreation":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptCommentForCreation","type":"object","description":"InboundReceiptCommentForCreation"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItemForCreation":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptCommentForCreation"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItemForCreation","type":"object","description":"InboundReceiptLineItemForCreation"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/receipts":{"post":{"deprecated":false,"description":"","operationId":"createReceipt","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Created inbound receipt"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Create receipt","tags":["Inbound (Inventory)"]}}}}
```

## DELETE /api/receipts/{receiptId}

> Delete receipt

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read inbound processes and receipts.","name":"Inbound (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Receipt":{"properties":{"asnRef":{"description":"enables mapping a receipt to one of the ASNs in this inbound process","type":"string"},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"receivedDate":{"description":"date-time of the arrival of the items in the facility","format":"date-time","type":"string"},"receivedItems":{"description":"list of item that arrived in the facility","items":{"$ref":"#/components/schemas/InboundReceiptLineItem"},"maxItems":200,"type":"array"},"status":{"description":"status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.","enum":["OPEN","IN_PROGRESS","FINISHED"],"type":"string"},"version":{"type":"number"}},"required":["receivedDate","receivedItems","comments","id","inboundProcessRef","version","created","lastModified"],"title":"Receipt","type":"object","description":"Receipt"},"InboundReceiptComment":{"properties":{"attachments":{"deprecated":true,"description":"attachments such as photos or documents","items":{"$ref":"#/components/schemas/InboundAttachmentLink"},"type":"array"},"content":{"description":"text content of the comment","type":"string"},"documentSetRef":{"description":"reference to the documentSet that contains the attachments. Read-only field","type":"string"},"id":{"type":"string"},"userRef":{"description":"user that added the comment, is anonymized according to specified rules","type":"string"}},"required":["content"],"title":"InboundReceiptComment","type":"object","description":"InboundReceiptComment"},"InboundAttachmentLink":{"properties":{"inboundAttachmentRef":{"type":"string"}},"required":["inboundAttachmentRef"],"title":"InboundAttachmentLink","type":"object","description":"InboundAttachmentLink"},"InboundReceiptLineItem":{"properties":{"acceptedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was accepted in this receipt. If its larger than 0, Stock will be created when this receipt is FINISHED."},"comments":{"description":"comments regarding the receipt itself","items":{"$ref":"#/components/schemas/InboundReceiptComment"},"maxItems":20,"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"rejectedQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"description":"quantity of the stock that was rejected in this receipt. If it is larger than 0, Stock will be created with condition \"defective\" when this receipt is FINISHED."},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"stock properties that will be set on the created stock"},"storageLocationRef":{"description":"storage location on which stock was placed","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock that was received","type":"string"}},"required":["tenantArticleId","acceptedQuantity","rejectedQuantity","comments"],"title":"InboundReceiptLineItem","type":"object","description":"InboundReceiptLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/receipts/{receiptId}":{"delete":{"deprecated":false,"description":"","operationId":"deleteReceipt","parameters":[{"in":"path","name":"receiptId","required":true,"schema":{"type":"string"}},{"in":"query","name":"version","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Delete receipt","tags":["Inbound (Inventory)"]}}}}
```
