Cs-Cart Api Post Shipment Issue

Hi,

I'm trying to post shipment information for an order and for some reason it's giving me an error stating that something is wrong with the products field name. I'm currently submitting the following data using the Post API command.

{"order_id" : "661" , "carrier" : "USPS" , "shipping" : "USPS First Class Mail" , "tracking_number" : "940233434343434343" , "shipping_id" : "70" , "products" : { "JNO4333" : "1"} }

after products field i have the product code JNO4333 and the Quantity shipped "1".

Please let me know what i need to do to fix the products JSON array, not sure where or how to add the product field JSON array information to the list above?

Thanks.

Hello,

I’ve just created a test shipment via POST http://example.com/api/shipments

I used the demo data that came with CS-Cart 4.3.6 and created a new shipment for Order #100. That shipment used Custom shipping method.

The JSON was as follows:

{“order_id”: “100”, “shipping_id”: “1”, “products”: {“140116777”: “1”}}

I got 140116777 by using GET http://example.com/api/orders/100

Among other properties, the response also included the products array:

“products”: {
140116777: {
“item_id”: “140116777”
“order_id”: “100”
“product_id”: “130”
“product_code”: “T0130501N7”
“price”: “49.95”
“amount”: “1”
“extra”: {…}-
“product”: “Casio DR-210TM”
“product_status”: “A”
“deleted_product”: false
“discount”: 0
“company_id”: “1”
“base_price”: 49.95
“original_price”: 49.95
“cart_id”: “140116777”
“tax_value”: 0
“subtotal”: 49.95
“display_subtotal”: 49.95
“shipped_amount”: “1”
“shipment_amount”: 0
“is_accessible”: true
“shared_product”: false
}

Please let me know if it helps.