Skip to main content

Hi i have been having a strange issue when creating a shipment of a sales order via the API

 

This is the standard endpoint i am using: (replaced my base address)

https://baseaddress/entity/Default/18.200.001/Shipment

And the request:

{

    "Type":{"value":"Shipment"},

    "CustomerID":{"value":"TEST1"},

    "LocationID":{"value":"MAIN"},

    "WarehouseID":{"value":"WAREHOUSE1"},

    "Details":;

        {

            "OrderType":{"value":"SA"},

            "OrderNbr":{"value":"ORDER123"}

        }

    ]

}

This does create a shipment for the order however the shipment number it creates has already been allocated to another shipment on the system. What could i be missing here? the Shipment number i an expecting is a new one that has not been previously allocated to any sales order.

Hi @andrewm80,

We have tried with the below API Request and able to create the shipment for the Sales Order. Please find the details below.

Method : POST

URL:  https://baseaddress/entity/Default/18.200.001/SalesOrder/SalesOrderCreateShipment

API Request:
 

 

{

    "entity": {

        "OrderType": {

            "value": "SO"

        },

        "OrderNbr": {

            "value": "SO006389"

        }

    },

    "parameters": {

        "ShipmentDate": {

            "value": "2021-06-07"

        },

        "WarehouseID": {

            "value": "WHOLESALE"

        }

    }

}

 

 

Hope this helps!!

 


Hi i tried the above request but am getting a response of 500 internal error.

 


That is working API request and I can able to create the shipments successfully. Can you please share the URL, which you are using?


https://MYDOMAIN/entity/Default/18.200.001/SalesOrder/SalesOrderCreateShipment

 {

    "entity": {

        "OrderType": {

            "value": "SA"

        },

        "OrderNbr": {

            "value": "TESTRAM01"

        }

    },

    "parameters": {

        "ShipmentDate": {

            "value": "2021-06-07"

        },

        "WarehouseID": {

 

            "value": "DIGITAL"

        }

    }

}

 

Error:

"message": "An error has occurred.",

    "exceptionMessage": "An error occurred during processing of the field Warehouse ID value DIGITAL 'Warehouse ID' cannot be found in the system. Please verify whether you have proper access rights to this object..\nPX.Data.PXOuterException: An error occurred during processing of the field Warehouse ID value DIGITAL 'Warehouse ID' cannot be found in the system. Please verify whether you have proper access rights to this object..",

 

I have this Warehouse ID Setup etc so i dont understand the error.


Strange!! :nerd:

Can you please share your Sales Order screenshot as well, just wanted to confirm the Warehouse and the order details?


 


Something strange with your instance. I just created in another instance also and working fine.

Can you please check with other TEST instance, if you have?

 

 

 


OK thank you for your help will try different instance and tenant to see if there is something related to that.


Sure @andrewm80  NOT sure about the issue with this instance. I see everything looks good except the only difference I see that Sales Order date format different from default date format (I know this will NOT be an issue, in this case).

You can verify in other TEST instance, and will get the expected results. 


Problem resolved. The issue was around user credentials for some reason.Created new credentials and was able to complete the shipment creation. 


Wonderful. You have identified that root cause of an issue and thanks for sharing the update.


Reply