Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

API Import discrepancy #2052

Open
punyashlok13 opened this issue Aug 21, 2023 · 1 comment
Open

API Import discrepancy #2052

punyashlok13 opened this issue Aug 21, 2023 · 1 comment

Comments

@punyashlok13
Copy link

I am trying to make a call to order items using these 2 api endpoints. orders/#{order_id}/products) and include=consignment.line_items

BigCommerce says that we can use include consignment.line_items to retrieve shipping addresses and line items, however there is one fundamental difference in the items returned.

When using orders/#{order_id}/products) as end point, for importing orders from big commerce website, I get the weight depth and height, even if the order may not have a line item (according to Big Commerce). However when I use, include=consignment.line_items in my API call, Big Commerce only returns weight, height and depth for items it considers has line items.
To make matters complicated, for two exactly similar orders, one returns line items and the other has no line items.

Here is an example Return response using the 2 above mentioned api endpoints.

https://www.diffchecker.com/tcb3ZAir

It would be nice if I could receive weight, height and depth for all order items I create irrespective of line items using consignment.line_items. Does anyone know what Big Commerce considers as important params to create line items? As for some orders, it clearly returns empty line items even though there are valid items in the order.

@bc-0dp
Copy link

bc-0dp commented Jan 16, 2024

Hi @punyashlok13
I know it's been a while since you posted this question, so not sure if this is still relevant. If not feel free to close it.

Let me try to understand your observation.

When calling v2/orders/{{order-id}}/products you get a response with all the orders line_items also those who are not part of an order consignment. Specifically you are interested in the line_items dimensions W x H x D and Weight.

When calling v2/orders/{{order-id}}?include=consignments.line_items you get a response with all the consignments and their respective line_items with the line_items dimensions W x H x D and Weight. However you are observing that only Weight, H x D are returned.

BigCommerce requires that name, type, weight, and price are defined when creating products. However you can add custom_items to a cart and these only require, name, sku, quantity, and list_price. An item like this would return 0 for all the dimensions.

Unfortunately your diff link has stopped working, so I won't be able to check the content. Feel free to update the link.
If you want you can try and reach out to me on our Dev Community slack on a PM at: bigcommerce-devs.slack.com
and we can look into this in more depth.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants