Migrate from 2024-07 to 2024-10

Compared to 2024-07, the main changes in the 2024-10 API focus on modifying inconsistent or unreasonable field names. The specific changes are as follows:

  • Change restock.items[*].source_order_item_id torestock.items[*].external_order_item_id
  • Change restock.items[*].location.source_id to restock.items[*].location.external_id
  • Change return_items[*].exchange_variant.source_product_id to return_items[*].exchange_variant.external_product_id
  • Change return_items[*].exchange_variant.source_variant_id to return_items[*].exchange_variant.external_variant_id
  • Remove return_items[*].discounted_price_including_tax , provide return_items[*].unit_discounted_price_including_tax instead. The discounted_price_including_tax provided in the 2024-07 version is based on ordered_quantity, which can easily be misused. Starting from the 2024-10 version, we will only provide unit_discounted_price_including_tax, which can be used together with fields like intended_return_quantity, ordered_quantity, etc., to calculate the total amount you need.
  • Rename return_items[*].image_urls to return_items[*].product_image_urls
  • Change fields of country_region, replace field name with code. Example:
    • 2024-07: {"country_region": {"name": "USA"}}
    • 2024-10: {"country_region": {"code": "USA"}}
  • Change type of state from string to object. Example:
    • 2024-07: {"state": "Arkansas"}
    • 2024-10: {"state": {"name": "Arkansas"}}

As an experiential version of the new webhook design, 2024-07 only provided a single event: return.restock.created. While designing the new events for the 2024-10 version, we identified flaws in the design of the modified field. Therefore, corrections have been made in the 2024-10 version.

modified in 2024-07:

preparing...

modified in 2024-10:

preparing...