to get a personalized navigation.
to get a personalized navigation.
Hi!
We are trying to using the PUT to insert a serial number for a product in a shipment
Below is the relevant part of the result from the GET reponse
"shipmentDetailLines": [
{
"lineNumber": 1,
"inventoryNumber": "IAC-RBAT-5KCINV-01",
"freeItem": false,
"warehouse": {
"id": "108 ",
"description": "Örebro"
},
"location": {
"id": "1",
"name": "Standard"
},
"uom": "STYCK",
"shippedQty": 1,
"orderedQty": 1,
"openQty": 0,
"lotSerialNbr": "",
"description": "SolarEdge Cable set, Battery to Inverter",
"allocations": [
{
"lineNbr": 2,
"itemId": "IAC-RBAT-5KCINV-01",
"location": {
"id": "1",
"name": "Standard"
},
"lotSerialNumber": "",
"quantity": 1,
"uom": "STYCK",
"description": "SolarEdge Cable set, Battery to Inverter"
}
],
"orderLineNbr": 1,
"alternateID": "IAC-RBAT-5KCINV-01"
},
{
"lineNumber": 3,
"inventoryNumber": "HVS",
"freeItem": false,
"warehouse": {
"id": "108 ",
"description": "Örebro"
},
"location": {
"id": "1",
"name": "Standard"
},
"uom": "STYCK",
"shippedQty": 1,
"orderedQty": 1,
"openQty": 0,
"description": "BYD HVS",
"allocations": [
{
"lineNbr": 7,
"itemId": "HVS",
"location": {
"id": "1",
"name": "Standard"
},
"lotSerialNumber": "",
"quantity": 1,
"uom": "STYCK",
"description": "BYD HVS"
}
],
"orderLineNbr": 2,
"alternateID": "HVS"
},
{
"lineNumber": 5,
"inventoryNumber": "FRAKT",
"freeItem": false,
"warehouse": {
"id": "108 ",
"description": "Örebro"
},
"location": {
"id": "1",
"name": "Standard"
},
"uom": "STYCK",
"shippedQty": 1,
"orderedQty": 1,
"openQty": 0,
"lotSerialNbr": "",
"description": "Frakt",
"allocations": [
{
"lineNbr": 6,
"itemId": "FRAKT",
"location": {
"id": "1",
"name": "Standard"
},
"lotSerialNumber": "",
"quantity": 1,
"uom": "STYCK",
"description": "Frakt"
}
],
"orderLineNbr": 3
}
]
It can be seen that the inside the shipment line 3, there is an allocation with lineNbr 7 which has an empty lotSerialNumber. All we want to do is to update the shipment so that a serial number is added. We tried many different approaches, but all failed:
1. Delete the existing empty allocation and insert a new one with a valid lotSerialNumber, see below payload for the PUT request.
Error: 'VismaId: eec30e73-81c6-438c-8dc6-588dafe9973f. Object reference not set to an instance of an object.'
{
"shipmentDetailLines": [
{
"lineNumber": {
"value": 3
},
"operation": "Update",
"allocations": [
{
"lineNbr": {
"value": 7
},
"operation": "Delete",
},
{
"lotSerialNumber": {
"value": "P031T020W2407032144"
},
"operation": "Insert",
},
]
}
]
}
2. Update the exising empty allocation
Error: Shipment Allocation Line: '7' not found.
{
"shipmentDetailLines": [
{
"lineNumber": {
"value": 3
},
"operation": "Update",
"allocations": [
{
"lineNbr": {
"value": 7
},
"operation": "Update",
"lotSerialNumber": {
"value": "P031T020W2407032144"
},
}
]
}
]
}
Copyright © 2022 Visma.com. All rights reserved.