Our B2B API

You can use our B2B API to perform different tasks, for example you can use it to retrieve information about a transaction or even accept offers in our system.

To understand more about our B2B API, you can view more details about the possible requests you can make in our B2B Metadata grid.

Fetching Transactional Data

After logging into your account that grants you access to the transactional data you'd like to view and interact with, you can make various API calls that will allow you to carry out specific tasks.

It's important to note here that our API is implemented on top of the Odata standard, as documented by Oasis at http://odata.org which then enables you to build a query based on your unique requirements.

All requests made to our B2B API need to be HTTP GET requests and include a header that's named "Authorisation" with a value of "bearer <your auth token>" this will ensure that the API knows who you are.

Fetching Invoices using our API

The full URL to retrieve a full list of invoices that you have access to in our system would be https://<AppURL>/Api/B2B/Invoice

This is an incredibly useful call that allows you to see all of the invoices you have access to in our system. This can be done with credits and payments too.

If there is a specific transaction you're looking to get, you can specify its Id in the call you make, for example if the invoice Id is 123, the full URL would b https://<AppURL>/Api/B2B/Invoice(123)

As explained above, we use odata, this means that within the URL query, you can specify a filter on the data. For example if you want to find the invoices that have a due date after 2024-05-01 then the full URL would be  https://<AppURL>/Api/B2B/Invoice?$filter=DueDate gt 2024-05-01

Using an Odata expand, you can then expand into the transaction's lines, the URL for this would be https://<AppURL>/Api/B2B/Invoice?$filter=DueDate gt 2024-05-01&$expand=Lines

This will then return the same data set, but will allow you to view the nested line items on each of the invoices in the json result.