We are currently developing an interface to the Shopify Gift Card module and are looking for a way to resolve a gift card tender action to the weborder on which the gift card was tendered.
We can find the gift card tender as a 'adjustment' through the Gift Card API, from this we can determine the 'order_transaction_id'.
It does not appear to be possible to resolve the order_id from the order_transaction_id.
The API requires that the order_id must be specified in order to query the order transaction table.
It's a bit of a catch-22.
I found a similar request posted some years ago where the suggested resolution was to query the orders by timestamp (min-max) and presumably query each of the orders in turn for the associated transactions looking to match the transaction id and in turn resolve to the 'order_number'. This seems possible but somewhat convoluted. In addition, the suggested resolution does not specify which of the timestamp values should be used to align with the min/max value specified in the orders API.
The Gift Card adjustment query supplies the 'timestamp' data items: 'processed_at', 'created_at' and 'updated_at'.
Any ideas are most welcome.
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |