Knowband Blog | Ecommerce Modules

HubBox Error: Wrong product data in the response of Create Parcel API

Problem Statement:  Wrong product data coming in the response of Create Parcel API of HubBox Sandbox account.

Solution: If you are facing this issue in HubBox sandbox account as shown below, you can ignore this on the sandbox account as It will work fine in the Production account of HubBox.

Sent product data in the request of Create Parcel API:

[order] => Array
        (
            [id] => 1234
            [products] => Array
                (
                    [0] => Array
                        (
                            [name] => Test Item1
                            [sku] => TEST
                            [price] => 1
                        )
 
                    [1] => Array
                        (
                            [name] => Test Item2
                            [sku] => TEST2
                            [price] => 12
                        )
 
                    [2] => Array
                        (
                            [name] => Test Item3
                            [sku] => TEST3
                            [price] => 13
                        )
 
                )
 
        )

Received product data in the response of Create Parcel API:

[order] => stdClass Object
        (
            [id] => 1234
            [products] => Array
                (
                    [0] => stdClass Object
                        (
                            [sku] => TEST
                            [name] => Test Item
                            [price] => 1
                            [qty] =>  
                            [challenge18] =>  
                            [challenge21] =>  
                            [challenge25] =>  
                            [perishable] =>  
                            [flammable] =>  
                        )
 
                    [1] => stdClass Object
                        (
                            [sku] =>  
                            [name] =>  
                            [price] =>  
                            [qty] =>  
                            [challenge18] =>  
                            [challenge21] =>  
                            [challenge25] =>  
                            [perishable] =>  
                            [flammable] =>  
                        )
 
                )
 
        )

Related Article: HubBox Error: Bad Response Code