hamncheez hamncheez - 10 months ago 139
reST (reStructuredText) Question

shopify transaction api GET all transactions

since shopify's transaction reporting is broken, I'm trying to use the API to get transaction fees for orders and basic accounting. In their API docs, they have their endpoints and parameters listed for getting/posting transactions. To "Receive a list of all Transactions", the docs say

GET /admin/orders/#{id}/transactions.json

but don't explain what the
is for. The call will only work if I put a transaction ID in, but then it only shows a single transaction, rather than a list. The docs state that to "Get the Representation of a specific transaction":

GET /admin/orders/#{id}/transactions/#{id}.json

Which has the id in there twice. I can't use a single transaction, I need all of them for a specific range. I've tried
, or putting in
in for the
, and it returns errors unless the id is a valid transaction id. Any ideas?

Answer Source

Transactions belong to an order. So the ID you are wondering about is for one specific order. So if you want transactions for your accounting system, the important thing you're basing your API work on will be orders. So setup your code to first off download the orders of interest. Say for a month. Now for each order ask for the transactions, and produce your report.