Create Order Issue

When creating order M-PO1198-024-TEST via API, it’s coming through with zeroes for the line item prices, line item totals, order subtotal, and grand total. Oddly the initial order summary drilldown screen (prior to entering into the order details page) shows the correct total, but once you click through to the order detail screen all of that information shows zeroes. We’ve checked the API docs and believe the structure is correct. Please see JSON + screenshots below.

{
“order_id”: “PO1198-024-TEST”,
“cart”: 114045,
“order_date”: “2023-08-21T00:00:00”,
“shipping_address”: {
“name”: “withheld”,
“street1”: “withheld”,
“city”: “Ketchum”,
“state”: “ID”,
“zip”: “83340”,
“country”: “USA”,
“email”: “”
},
“billing_address”: {
“name”: “withheld”,
“street1”: “withheld”,
“city”: “Ketchum”,
“state”: “ID”,
“zip”: “83340”,
“country”: “USA”,
“email”: “”
},
“lines”: [
{
“quantity”: 6,
“product”: {
“sku”: “YSRQF33GSEHUXMAC4WTMDJMU”,
“name”: “withheld”,
“price”: 10.75,
“taxable”: “false”
}
},
{
“quantity”: 12,
“product”: {
“sku”: “BDGTZ4X4JIJ6FEMMS6QGWCEB”,
“name”: “withheld”,
“price”: 10.75,
“taxable”: “false”
}
},
{
“quantity”: 12,
“product”: {
“sku”: “O7OXMVEJU3VESTYJCTKFZXFU”,
“name”: “withheld”,
“price”: 10.75,
“taxable”: “false”
}
}
],
“product_amount”: 322.5,
“tax_amount”: 0,
“grand_total”: 322.5
}

Order Summary Screenshot: Annotation-Annotation on 2023-08-24 at 08-06-18.png.png - Droplr

Order Details Screenshot: Annotation-Annotation on 2023-08-24 at 08-04-24.png.png - Droplr

Hi @btjtc Thanks for the question,

If you look at the POST /v3/order documentation you will see that the lines include the information you are seeking if you require them to be displayed.

lines
required Array of objects (Core API Order Line Schema) [ items ]

product_name string
item_price number
quantity integer
selected_option string
total_price number
tax_lines Array of objects[ items ]

As for the differences in the summary vs detail view, I believe this is a UI detail that calculates totals in the detail view.

@sophie Do we have to put both total price and item price? Or would total price be calculated. We changed our call to use item_price instead of item{ price} but we’re still getting 0’s on all the line items. It’s also not clear if we need to pass the product_total and grand_total params either or if those override the line items.

{
“quantity”: 6,
“item_price”: 10.75,
“product”: {
“sku”: “123456”,
“name”: “Product Name”
}

@sophie circling back on the message above from @mikewilliams

Are you talking about for the order? What have you tried? I’m not sure i understand how you’re sending information and getting 0 amounts for everything. Have you looked at an order that has the values in the app via GET in the api to compare?

“quantity”: 6,
“total_price”: 64.50,
“product”: {
“sku”: “123456”,
“name”: “Product Name”
}

edited from above to reflect total_price

just ran a couple of curls, and i used order.lines[0].total_price to get the calculated values in the app.