My Products
Help
Magnus Vadla
PARTNER

Bug: API allows for duplicate serial numbers in shipment allocation

by Magnus Vadla

Hello,

 

This bug is probably already on your radar, but I can't find a thread on it so I just want to make sure.

 

If you try to add a duplicate serial number in shipment allocations in the GUI, the system will reject it before you are able to save.

 

Doing it through the API will get past this validation, and you will get an error when trying to confirm the shipment. The shipment will then be stuck and you will not be able to even delete it in the GUI. The only way to unblock it is to delete/change the allocation through the API.

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım

Hello Magnus, 

 

thank you for mentioning this, could you also please share your JSON ?

Magnus Vadla
PARTNER

by Magnus Vadla

Sure. Here is a PUT Json that will work even if lotSerialNumber "123" is already used for this product

{
    "shipmentDetailLines": [{
            "operation": "Update",
            "lineNumber": {
                "value": 1
            },
            "allocations": [{
                    "operation": "Insert",
                    "lineNbr": {
                        "value": 0
                    },
                    "location": {
                        "value": "1"
                    },
                    "lotSerialNumber": {
                        "value": "123"
                    },
                    "quantity": {
                        "value": 1
                    }
                }
            ]
        }
    ]
}

 

Yıldırım
VISMA

by Yıldırım

Thanks Magnus, this will be reviewed.