How to Link an Order to a Price Rule (Discount Code) via API?

How to Link an Order to a Price Rule (Discount Code) via API?

CeduardoEn
Shopify Partner
3 0 2

Hi everyone,

I'm currently working on integrating Shopify with our system and have encountered a challenge. We recently finalized some orders with custom discounts, but now we need to link these orders to specific price rules (discount codes) so that they are properly reflected in Shopify's metrics and analytics.

Is there a way to associate an existing order with a price rule or discount code via the Shopify API? Specifically, we're looking to:

  1. Link an order that has already been created and completed with a price rule.
  2. Ensure that this linkage updates the order metrics and analytics correctly in Shopify.

I have reviewed the API documentation but couldn't find a straightforward way to update an existing order with a discount code or price rule. Has anyone managed to do this or found a workaround?

Any insights or suggestions would be greatly appreciated!

Thanks in advance for your help.

Replies 0 (0)