I’m looking for an endpoint to retrieve the list of invoices for an order, corresponding to the InvoiceService endpoint under XMLRPC.
Our cusotmers use this for their customer service portals.
I checked known issues, and didn’t see it there.
I looked through various sections of the REST v1 and REST v2 API, but nothing is leaping out at me. I DO see invoice_id in the Order and Subscription objects, but not the data itself.
Did I miss something, or is this not being ported forward, or being considered, or?
Hi @David_Bullock. In essence, orders and invoices are now treated as the same concept in the API. Historically they were separate, but going forward they are one-to-one (interchangeable), which is why some endpoints now consistently use Order IDs to access invoice-related data.
This means you can retrieve invoice data through the order endpoints. Future API versions may unify terminology further and standardize.
@OmarAlmonte - Are you aware of the Order and Invoice ID misalignment issue that affect a small number of customers?
There are Keap applications out there that will generate a different Invoice ID to the Order ID. If developers have built integrations to look up by Invoice ID, then they will not be able to in REST V2.
It would a good idea to get your development team to realign the ID number on those applications, and keep them aligned. Or provide a query parameter to look up by the Invoice ID.
@David_Bullock and @Pav, you can find the subscription that generated a particular order by looking at order_items.[].subscription_id, which links each item in the order back to its subscription. That said, there’s currently a bug causing this field to return 0. I’ll add it to the tracker and update you once it’s resolved.
I’m not clear if this is a function of the bug you mentioned.
I checked two endpoints and the known issues list.
Neither endpoint had a property of “subscription_id” anywhere in it, or in their order_items collection.. Normally from what I’ve seen, even if the property is zero, the property is still present, just with no value. (example the “subscriptions” “active” property.
The known issues DOES mention missing fields for Orders, but it doesn’t mention which Orders endpoints, or which fields (custom_fields, etc). so I can’t tell if this is a known issue or not.
@David_Bullock@Pav The bug related to the subscription_id property has now been resolved. Thanks again for your patience and for helping us identify it!