Skip to main content
Question

REST API Packing always packs into the same package

  • January 16, 2025
  • 1 reply
  • 52 views

Forum|alt.badge.img

Our organization just upgraded to 24R2 and we are seeing new functionality that did not exist in the prior version.

We have a shipment with a single line item, but two packages.  When we pack into the Contents, the package that we specify isn’t being used.  It seems like it is adding to the package with the highest PackageLineNbr.

For example, we have the following:

 

{
"id": "74db342b-bf4e-ef11-93aa-00155d1eec41",
"rowNumber": 1,
"note": {
"value": ""
},
"Packages": [
{
"id": "262d42ac-c04e-ef11-93aa-00155d1eec41",
"rowNumber": 1,
"note": {
"value": ""
},
"Contents": [],
"LineNbr": {
"value": 1
},
"custom": {},
"_links": {
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Packages/262d42ac-c04e-ef11-93aa-00155d1eec41/{filename}"
}
},
{
"id": "7440991e-224f-ef11-93ab-00155d1eec41",
"rowNumber": 2,
"note": {
"value": ""
},
"Contents": [],
"LineNbr": {
"value": 5
},
"custom": {},
"_links": {
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Packages/7440991e-224f-ef11-93ab-00155d1eec41/{filename}"
}
}
],
"ShipmentNbr": {
"value": "000042737"
},
"custom": {},
"_links": {
"self": "/AcumaticaERP/entity/Packing/22.200.001/Shipment/74db342b-bf4e-ef11-93aa-00155d1eec41",
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Document/74db342b-bf4e-ef11-93aa-00155d1eec41/{filename}"
}
}

 

We perform an HTTP PUT with the following body:

 

{
"Packages": [
{
"id": "262d42ac-c04e-ef11-93aa-00155d1eec41",
"Contents": [
{
"ShipmentSplitLineNbr": {
"value": 3
},
"Canister": {
"value": 1
},
"Position": {
"value": "Bottom"
}
}
]
}
],
"ShipmentNbr": {
"value": "000042737"
}
}

 

And receive the following response.  Note that we added the Contents to package id "262d42ac-c04e-ef11-93aa-00155d1eec41" but the REST API call added it to id "0a3c524e-5400-495f-82ad-e618fca6c97e".

{
"id": "74db342b-bf4e-ef11-93aa-00155d1eec41",
"rowNumber": 1,
"note": {
"value": ""
},
"Packages": [
{
"id": "262d42ac-c04e-ef11-93aa-00155d1eec41",
"rowNumber": 1,
"note": null,
"Contents": [],
"LineNbr": {
"value": 1
},
"custom": {},
"_links": {
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Packages/262d42ac-c04e-ef11-93aa-00155d1eec41/{filename}"
}
},
{
"id": "7440991e-224f-ef11-93ab-00155d1eec41",
"rowNumber": 2,
"note": {
"value": ""
},
"Contents": [
{
"id": "0a3c524e-5400-495f-82ad-e618fca6c97e",
"rowNumber": 1,
"note": null,
"Canister": {
"value": 1
},
"Position": {
"value": "Bottom"
},
"Quantity": {
"value": 100.000000
},
"ShipmentSplitLineNbr": {
"value": 3
},
"custom": {}
}
],
"LineNbr": {
"value": 5
},
"custom": {},
"_links": {
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Packages/7440991e-224f-ef11-93ab-00155d1eec41/{filename}"
}
}
],
"ShipmentNbr": {
"value": "000042737"
},
"custom": {},
"_links": {
"self": "/AcumaticaERP/entity/Packing/22.200.001/Shipment/74db342b-bf4e-ef11-93aa-00155d1eec41",
"files:put": "/AcumaticaERP/entity/Packing/22.200.001/files/PX.Objects.SO.SOShipmentEntry/Document/74db342b-bf4e-ef11-93aa-00155d1eec41/{filename}"
}
}

 

Can you please help us understand why this is happening and how to resolve it?

1 reply

Forum|alt.badge.img
  • Author
  • Freshman II
  • January 16, 2025

Correction:

> Note that we added the Contents to package id "262d42ac-c04e-ef11-93aa-00155d1eec41" but the REST API call added it to id "7440991e-224f-ef11-93ab-00155d1eec41".