I’ve currently got the API set up to grab data from our Sage 200 platform and I’ve been asked to grab all invoices and what items they contained for a certain period.
I am able to use the following call to see invoices:
https://api.columbus.sage.com/uk/sage200extra/accounts/v1/sop_order_return_invoice_credit_views
However, I don’t know where to go to see what items these invoices included.
For example, we have an order that was placed on 28th June that had an invoice raised on 30th June for some of the items and then a second invoice raised on 23rd July for the rest of the items.
When I run the above call, I get back that there’s two invoices but I only see the overall information, I can’t see what items the invoices were for.
Array
(
[0] => Array
(
[sop_order_return_id] => 67198786
[sop_order_return_document_type_id] => 0
[sop_order_return_document_no] => 0000173763
[sop_order_return_document_date] => 2024-06-28T00:00:00Z
[sop_order_return_document_status_id] => 2
[sop_order_return_customer_document_no] => PO000181221
[sop_order_return_total_net_value] => 129.02
[sop_order_return_total_tax_value] => 25.8
[sop_order_return_total_gross_value] => 154.82
[customer_id] => 33665303
[customer_reference] => HOME
[customer_name] => Home Company
[customer_short_name] => Home Co
[sop_invoice_credit_id] => 67292796
[sop_invoice_credit_document_no] => 0000151614
[sop_invoice_credit_type_id] => 0
[sop_invoice_credit_document_date] => 2024-06-30T00:00:00Z
[sop_invoice_credit_document_status_id] => 2
[sop_invoice_credit_total_net_value] => 67.52
[sop_invoice_credit_total_tax_value] => 13.5
[sop_invoice_credit_total_gross_value] => 81.02
)
[1] => Array
(
[sop_order_return_id] => 67198786
[sop_order_return_document_type_id] => 0
[sop_order_return_document_no] => 0000173763
[sop_order_return_document_date] => 2024-06-28T00:00:00Z
[sop_order_return_document_status_id] => 2
[sop_order_return_customer_document_no] => PO000181221
[sop_order_return_total_net_value] => 129.02
[sop_order_return_total_tax_value] => 25.8
[sop_order_return_total_gross_value] => 154.82
[customer_id] => 33665303
[customer_reference] => HOME
[customer_name] => Home Company
[customer_short_name] => Home Co
[sop_invoice_credit_id] => 67564111
[sop_invoice_credit_document_no] => 0000152242
[sop_invoice_credit_type_id] => 0
[sop_invoice_credit_document_date] => 2024-07-23T00:00:00Z
[sop_invoice_credit_document_status_id] => 2
[sop_invoice_credit_total_net_value] => 61.5
[sop_invoice_credit_total_tax_value] => 12.3
[sop_invoice_credit_total_gross_value] => 73.8
)
)
Does anyone know what call to make to see the invoiced items? I can’t rely on attempting to calculate the which items from the order they are using the total fields.