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 /invoicearchive/api/invoices/{customerNumberUnique}{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

Gets the list of invoices corresponding to the given customer number. By default it shows last 65 days of invoices, with the possibilty to access last 365 days by providing “fromDate” and “toDate”. This endpoint supports Parcel Domestic, Parcel International and Cargo customers.

URL

https://www.mybring.com/invoicearchive/api/invoices/{customerNumberUnique}.json
https://www.mybring.com/invoicearchive/api/invoices/{customerNumberUnique}.xml

Request params

URI parameter Type Description
customerNumberUnique string

Required. Unique API Customer Number.

Query params Type Description
fromDate string

Optional. Start date for fetching invoices in format dd.mm.yyyy.


Example: 15.01.2019
toDate string

Optional. End date for fetching invoices in format dd.mm.yyyy.


Example: 25.01.2019