Invoice API

Introduction

The Invoice API is used to download the invoice pdfs same as in Mybring.

Authentication

The Invoice API requires authentication for all its endpoints. See the getting started guide on authentication if you’re not sure what this means.

Header Example Comment
X-MyBring-API-Uid john.doe@example.com Mybring login ID
X-MyBring-API-Key 1234abc-abcd-1234-5678-abcd1234abcd Mybring login’s API key
X-Bring-Client-URL https://example.com/ A URL that sort of identifies where you’re using the APIs.

Those headers must be present for authenticating requests.

Overview of endpoints

Base URL

https://www.mybring.com
Method Endpoint Usage
GET /invoicearchive/pdf/{customerNumberUnique}/{invoiceNumber}.pdf Download pdf for invoice
GET /reports/api/invoices/{customerOrGroupId}{mediaTypeExtension} List invoice numbers

Invoice PDF download endpoint

This link is used to download the invoice pdf for the customers by providing API Customer Id and invoice number in URI params.

URL

https://www.mybring.com/invoicearchive/pdf/{customerNumberUnique}/{invoiceNumber}.pdf

Request params

URI parameter Type Description
customerNumberUnique string

Required. Unique API Customer Number for each customer.

invoiceNumber string

Required. Invoice number of the particular invoice to be downloaded.

List of all Invoices

Use the existing Reports Api List invoice numbers for this feature.

URL

https://www.mybring.com/reports/api/invoices/{customerOrGroupId}.json
https://www.mybring.com/reports/api/invoices/{customerOrGroupId}.xml

Request params

URI parameter Type Description
customerOrGroupId string

Required. Id for customer or customer group. Customer group id should have the prefix GROUP_ e.g. GROUP_12345