Update a goods receipt
The PUT /pic/link/goods-receipts/update
endpoint allows you to update a goods receipt ππΌπ€
Authorizationβ
This endpoint requires authentication through Basic Auth
with the username and password of the backend that will consume it. To create and configure a backend, follow the backends tutorial
Request parametersβ
- π£ Path
- π Query
- πͺ Body
This request does not contain parameters of type Path
This request does not contain parameters of type Query
JSON Bodyβ
{
"inputs": [
GoodsReceipt
]
}
Name | Type | Default | Description |
---|---|---|---|
inputs | Array[ GoodsReceipt ] | Required | List of goods receipts to register |
GoodsReceipt
β
{
"header": GoodsReceiptHeader,
"items": [
GoodsReceiptItem
]
}
Name | Type | Default | Description |
---|---|---|---|
header | GoodsReceiptHeader | Required | Header data of goods received |
items | Array[ GoodsReceiptItem ] | Required | List of items of goods received |
GoodsReceiptHeader
β
{
"goodsReceipt_id": string,
"purchaseOrder_id": string,
"locationId": string,
"storageId": string | null,
"receiptDate": string,
"goodsReceiptFileKey": string | null,
}
Name | Type | Default | Description |
---|---|---|---|
goodsReceiptId | string | Required | Identifier of the goods receipt |
purchaseOrderId | string | Required | Identifier of the purchase order |
locationId | string | Required | Identifier of location |
storageId | string | Required | Identifier of the storage |
receiptDate | string | Required | Receipt date |
goodsReceiptFileKey | string | Required | File key of goods receipt |
The receipt date must be in DD-MM-YYYY
format in order to be processed correctly.
The purchaseOrderId
field must be the identifier of a purchase order created from the same backend through the POST /pic/link/purchase-orders/create
endpoint.
The locationId
field must correspond to the external mapping of an AppliQloud location.
The goodsReceiptFileKey
field is obtained through the output of the POST /pic/link/goods-receipts/files
endpoint.
GoodsReceiptItem
β
{
"itemId": string,
"purchaseOrderItemId": string,
"quantity": int,
"unitId": string,
}
Name | Type | Default | Description |
---|---|---|---|
itemId | string | Required | Goods received item identifier |
purchaseOrderItemId | string | Required | PO item identifier for goods received |
quantity | int | Required | Received amount |
unitId | string | Required | Unit of measurement of the quantity received |
The purchase order item must have an item type of GOODS
and an ascription type of INVENTORY
to be able to register a goods receipt.
Examplesβ
- π₯οΈ cURL
curl --location 'https://<identifier>.api.appliqloud.com/pic/link/goods-receipts/update' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <token>' \
--data '{
"inputs": [
{
"header": {
"goodsReceiptId": "43000001",
"purchaseOrderId": "450000001",
"locationId": "MX-LOC",
"storageId": "ST1",
"receiptDate": "2024-08-09",
"goodsReceiptFileKey": "goods-receipts/d6963433-6d75-4ea6-a7b5-0596546e767f.jpg"
},
"items": [
{
"itemId": "0",
"purchaseOrderItemId": "10",
"quantity": 3,
"unitId": "EA"
}
]
}
]
}'
Make sure to modify the <identifier>
and <token>
fields with your company identifier and authentication token respectively.
Responsesβ
- β 200
- β οΈ 201 (with errors)
- π 401
- π§ 500
The goods receipts were successfully updated
{
"success": [
{
"header": {
"goodsReceiptId": "43000001",
"goodsReceiptStatus": "CLOSED",
"vendorBusinessPartnerId": "1287",
"purchaseOrderId": "45000001",
"locationId": "CMPNHQ",
"storageId": "ST1",
"receiptDate": "2024-08-09",
"goodsReceiptFile": {
"key": "goods-receipts/5973a304-6bdc-436d-9f9f-fd487600c2e0.pdf",
"url": "https://prd-apq-tenant-bucket.s3.amazonaws.com/goods-receipts/5973a304-6bdc-436d-9f9f-fd487600c2e0.pdf"
}
},
"items": [
{
"itemId": "0",
"purchaseOrderItemId": "10",
"quantity": 10,
"unitId": "EA",
"netUnitPrice": 1240.00,
"netTotalPrice": 12400.00
}
]
}
],
"errors": []
}
There is an error in the request
{
"success": [],
"errors": [
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "GoodsReceiptNotFoundException",
"message": "Goods receipt 43000002 not found in backend SAP_APQ",
"context": {
"backendId": "SAP_APQ",
"goodsReceiptId": "43000002"
}
}
]
}
Authorization required or credentials are not correct
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343",
"cause": "UnauthorizedException",
"message": "Authorization required"
}
Internal server error (contact support@appliqloud.com or open a support ticket)
{
"success": [],
"errors": [
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "InternalServerError",
"message": "Internal Server Error"
}
]
}