Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order Product API does not return order_product_id #173

Closed
lisastriker opened this issue Mar 16, 2024 · 2 comments
Closed

Order Product API does not return order_product_id #173

lisastriker opened this issue Mar 16, 2024 · 2 comments
Assignees

Comments

@lisastriker
Copy link

When i run a get request https://api.bigcommerce.com/stores/{store}/v2/orders/{order_number}/products. No order_product_id is found

This is my json result
[ { "id": 108, "order_id": 196, "product_id": 8250, "variant_id": 8215, "order_pickup_method_id": 0, "order_address_id": 97, "name": "Antenna, 3dBi Wifi emONE", "name_customer": "Antenna, 3dBi Wifi emONE", "name_merchant": "Antenna, 3dBi Wifi emONE", "sku": "ANT-008", "upc": "", "type": "physical", "base_price": "25.0000", "price_ex_tax": "25.0000", "price_inc_tax": "25.0000", "price_tax": "0.0000", "base_total": "1000.0000", "total_ex_tax": "1000.0000", "total_inc_tax": "1000.0000", "total_tax": "0.0000", "weight": "0.0800", "width": "0.0000", "height": "0.0000", "depth": "0.0000", "quantity": 40, "base_cost_price": "0.0000", "cost_price_inc_tax": "0.0000", "cost_price_ex_tax": "0.0000", "cost_price_tax": "0.0000", "is_refunded": false, "quantity_refunded": 0, "refund_amount": "0.0000", "return_id": 0, "wrapping_id": 0, "wrapping_name": "", "base_wrapping_cost": "0.0000", "wrapping_cost_ex_tax": "0.0000", "wrapping_cost_inc_tax": "0.0000", "wrapping_cost_tax": "0.0000", "wrapping_message": "", "quantity_shipped": 0, "event_name": null, "event_date": "", "fixed_shipping_cost": "0.0000", "ebay_item_id": "", "ebay_transaction_id": "", "option_set_id": null, "parent_order_product_id": null, "is_bundled_product": false, "bin_picking_number": "", "external_id": null, "fulfillment_source": "", "brand": "", "gift_certificate_id": null, "applied_discounts": [], "product_options": [], "configurable_fields": [], "discounted_total_inc_tax": "1000.0000" } ]

As you can see, there is no order_product_id. This means for this API endpoint https://api.bigcommerce.com/stores/{sttore_id}/v2/orders/{orderr_id}/shipments, i can't create a shipment, because i simply don't have the order_product_id and i have no way to get it.

I'm wondering if this is because of the variant ID. I have a feeling, the variant and product id might have to be combined? I'm not sure what's the problem.
https://api.bigcommerce.com/stores/{store_id}/v2/orders/{order_id}/products/{product_id}
-> This also strangely gives an error once i plug in the product id
image

@slsriehl slsriehl added the wip work in progress PRs, not ready for review label Mar 20, 2024
@bc-tgomez
Copy link
Contributor

Hi @lisastriker 👋 After reviewing the response It appears that your order_product_id is the first line in the response; 108. Looking at our documentation I see where that detail could be missed. To correct the confusion for other devs, I'll go ahead and add a supporting note to the id description that includes its function when creating shipments. Please let me know if this doesn't solve the issue.

bc-tgomez added a commit that referenced this issue May 9, 2024
…_id` (#193)

<!-- Ticket number or summary of work -->
# [DEVDOCS-5847]


## What changed?
<!-- Provide a bulleted list in the present tense -->
* Add note indicating that the response `id` is required when creating
order shipments

## Release notes draft
<!-- Provide an entry for the release notes using simple, conversational
language. Don't be too technical. Explain how the change will benefit
the merchant and link to the feature.

Examples:
* The newly-released [X feature] is now available to use. Now, you’ll be
able to [perform Y action].
* We're happy to announce [X feature], which can help you [perform Y
action].
* [X feature] helps you to create [Y response] using the [Z query
parameter]. Now, you can deliver [ex, localized shopping experiences for
your customers].
* Fixed a bug in the [X endpoint]. Now the [Y field] will appear when
you click [Z option]. -->
* Added a note to /v2/orders/{order_id}/shipments letting merchants know
that the 'id' response is needed when creating order shipments.

## Anything else?
<!-- Add related PRs, salient notes, additional ticket numbers, etc. -->

ping {names}


[DEVDOCS-5847]:
https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5847?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Traci Porter <traci.porter@bigcommerce.com>
Co-authored-by: Sarah Riehl <sarah.riehl@bigcommerce.com>
@bc-tgomez bc-tgomez added changes made and removed wip work in progress PRs, not ready for review labels May 9, 2024
@bc-tgomez
Copy link
Contributor

The changes have been made to our documentation. Thank you for your feedback!

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

No branches or pull requests

3 participants