Invoice API
The Invoice API can be used to list your invoices and to download the invoices in PDF format.
Authentication
To integrate with the Bring APIs, you will need a Mybring user account with an API key. Information about prerequisites and authentication headers can be found on the general API Getting Started page.
Formats
REST XML/JSON over HTTP.
Endpoints
https://www.mybring.com/invoicearchive
Usage | Method | Endpoint |
---|---|---|
List of all Invoices | GET |
/api/invoices/{customerNumber}.json
|
List of all Invoices | GET |
/api/invoices/{customerNumber}.xml
|
Invoice PDF download endpoint | GET |
/pdf/{customerNumberUnique}/{invoiceNumber}.pdf
|
OpenAPI document
https://www.mybring.com/invoicearchive/v3/api-docsList of all Invoices
https://www.mybring.com/invoicearchive/api/invoices/{customerNumber}.json
Gets the list of invoices corresponding to the given customer number. By default it shows last 65 days of invoices, with the possibility to access last 365 days by providing “fromDate” and “toDate”. This endpoint supports Parcel Domestic, Parcel International and Cargo customers.
Request
path parameters
-
customerNumber
Required -
- Description
- Unique API Customer Number.
- Type
- string
header parameters
-
X-Mybring-API-Uid
Required -
- Description
- Your Mybring login ID
- Type
- any
- Example
X-MyBring-API-Uid=john.doe@example.com
-
X-Mybring-API-Key
Required -
- Description
- Your user’s API key
- Type
- any
- Example
X-MyBring-API-Key=1234abc-abcd-1234-5678-abcd1234abcd
-
X-Bring-Client-URL
Required -
- Description
- A URL that sort of identifies where you’re using the APIs.
- Type
- any
- Example
X-Bring-Client-URL=https://example.com
query parameters
-
fromDate
-
- Description
- Start date for fetching invoices in format dd.mm.yyyy.
- Type
- string
- Example
fromDate=15.01.2020
-
toDate
-
- Description
- End date for fetching invoices in format dd.mm.yyyy.
- Type
- string
- Example
toDate=25.01.2020
-
invoicesWithSpecification
-
- Description
- Displays only invoices with available specifications when set to true.
- Type
- boolean
-
onlyProcessedInvoices
-
- Description
- Displays only invoices that has been processed when set to true.
- Type
- boolean
-
isApiCall
-
- Type
- boolean
Responses
200 Successful
Schema
Media type: application/json
-
Required
- array of objects
-
attachmentCount
- integer <int32>
-
batchSource
- string
-
currency
- string
-
customerNumber
- string
-
dueDate
- string
-
invalidPdfLink
- boolean
-
invoiceDate
- string
-
invoiceIssuer
- string
-
invoiceNumber
- string
-
invoiceProcessed
- string
- Enum
YES
NO
PARTLY
-
invoiceSpecificationAvailable
- boolean
-
parentInvoiceNumber
- string
parentInvoiceNumberList
- array of strings
-
- string
-
-
specInvoiceReportId
- string
-
specificationAvailability
- string
- Enum
YES
NO
PARTLY
-
status
- string
-
supportCaseNumber
- string
-
supportCaseUrl
- string
-
totalAmount
- string
-
type
- string
-
-
status
Required - string
Response examples
{
"invoices": [
{
"attachmentCount": 0,
"batchSource": "CRM_SF_EXT",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "2022-06-29",
"invoiceDate": "31.12.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "10158070",
"invoiceProcessed": "YES",
"invoiceSpecificationAvailable": false,
"parentInvoiceNumber": "",
"parentInvoiceNumberList": [],
"specInvoiceReportId": "specified_invoice_customer_master",
"specificationAvailability": "NO",
"status": "Open",
"supportCaseNumber": null,
"supportCaseUrl": null,
"totalAmount": "-386.25",
"type": "Credit note"
}
],
"status": "OK"
}
{
"invoices": [
{
"attachmentCount": 0,
"batchSource": "TMS_AMPHORA_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "2022-06-29",
"invoiceDate": "31.12.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "10158070",
"invoiceProcessed": "YES",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": "",
"parentInvoiceNumberList": [],
"specInvoiceReportId": "specified_invoice_customer_master",
"specificationAvailability": "YES",
"status": "Open",
"supportCaseNumber": null,
"supportCaseUrl": null,
"totalAmount": "186.25",
"type": "Invoice"
}
],
"status": "OK"
}
{
"invoices": [
{
"attachmentCount": 0,
"batchSource": "TMS_AMPHORA_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "2022-06-29",
"invoiceDate": "31.12.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "10158070",
"invoiceProcessed": "YES",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": "",
"parentInvoiceNumberList": [],
"specInvoiceReportId": "specified_invoice_customer_master",
"specificationAvailability": "NO",
"status": "Open",
"supportCaseNumber": null,
"supportCaseUrl": null,
"totalAmount": "186.25",
"type": "Invoice"
}
],
"status": "OK"
}
{
"invoices": [
{
"attachmentCount": 0,
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "28.02.2020",
"invoiceDate": "31.12.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "10158070",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Open",
"totalAmount": "386.25",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "PMS_BULKMAIL_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "25.02.2020",
"invoiceDate": "31.12.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "152148",
"invoiceSpecificationAvailable": false,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Closed",
"totalAmount": "7771.69",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "TMS_AMPHORA_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "06.03.2020",
"invoiceDate": "31.01.2020",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "1109932",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Open",
"totalAmount": "115.0",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "TMS_LM_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "03.03.2020",
"invoiceDate": "31.01.2020",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "11404211",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Open",
"totalAmount": "12117.16",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "TMS_AMPHORA_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "03.01.2020",
"invoiceDate": "30.11.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "1100146",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Closed",
"totalAmount": "485.01",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "TMS_LM_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "31.12.2019",
"invoiceDate": "30.11.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "11403110",
"invoiceSpecificationAvailable": true,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Closed",
"totalAmount": "1964.06",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "PMS_BULKMAIL_OM",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "31.12.2019",
"invoiceDate": "30.11.2019",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "12139462",
"invoiceSpecificationAvailable": false,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Closed",
"totalAmount": "2076.69",
"type": "Invoice"
},
{
"attachmentCount": 0,
"batchSource": "CRM_SF_EXT",
"currency": "NOK",
"customerNumber": "customerNumber",
"dueDate": "30.01.2020",
"invoiceDate": "30.01.2020",
"invoiceIssuer": "POSTEN_NORGE_AS",
"invoiceNumber": "10021151",
"invoiceSpecificationAvailable": false,
"parentInvoiceNumber": null,
"specInvoiceReportId": "specified_invoice_customer_master",
"status": "Closed",
"totalAmount": "-75.0",
"type": "Credit note"
}
],
"status": "OK"
}
List of all Invoices
https://www.mybring.com/invoicearchive/api/invoices/{customerNumber}.xml
Gets the list of invoices corresponding to the given customer number. By default it shows last 65 days of invoices, with the possibility to access last 365 days by providing “fromDate” and “toDate”. This endpoint supports Parcel Domestic, Parcel International and Cargo customers.
Request
path parameters
-
customerNumber
Required -
- Description
- Unique API Customer Number.
- Type
- string
header parameters
-
X-Mybring-API-Uid
Required -
- Description
- Your Mybring login ID
- Type
- any
- Example
X-MyBring-API-Uid=john.doe@example.com
-
X-Mybring-API-Key
Required -
- Description
- Your user’s API key
- Type
- any
- Example
X-MyBring-API-Key=1234abc-abcd-1234-5678-abcd1234abcd
-
X-Bring-Client-URL
Required -
- Description
- A URL that sort of identifies where you’re using the APIs.
- Type
- any
- Example
X-Bring-Client-URL=https://example.com
query parameters
-
fromDate
-
- Description
- Start date for fetching invoices in format dd.mm.yyyy.
- Type
- string
- Example
fromDate=15.01.2020
-
toDate
-
- Description
- End date for fetching invoices in format dd.mm.yyyy.
- Type
- string
- Example
toDate=25.01.2020
-
invoicesWithSpecification
-
- Description
- Displays only invoices with available specifications when set to true.
- Type
- boolean
-
onlyProcessedInvoices
-
- Description
- Displays only invoices that has been processed when set to true.
- Type
- boolean
-
isApiCall
-
- Type
- boolean
Responses
200 Successful
Schema
Media type: application/xml
- object
-
-
Required
- array
-
- object
-
-
attachmentCount
- integer <int32>
-
batchSource
- string
-
currency
- string
-
customerNumber
Required - string
-
dueDate
- string
-
invalidPdfLink
Required - boolean
-
invoiceDate
- string
-
invoiceIssuer
Required - string
-
invoiceNumber
- string
-
invoiceProcessed
Required - string
- Enum
YES
NO
PARTLY
-
invoiceSpecificationAvailable
Required - boolean
-
parentInvoiceNumber
- string
-
Required
- array
-
-
- string
-
-
specInvoiceReportId
- string
-
specificationAvailability
Required - string
- Enum
YES
NO
PARTLY
-
status
- string
-
supportCaseNumber
- string
-
supportCaseUrl
- string
-
totalAmount
- string
-
type
- string
-
-
status
Required - string
-
Response examples
<?xml version="1.0" encoding="UTF-8"?>
<InvoiceResponse>
<invoices>
<InvoiceDetails>
<batchSource>CRM_SF_EXT</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>2022-06-29</dueDate>
<invoiceDate>31.12.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>10158070</invoiceNumber>
<invoiceProcessed>YES</invoiceProcessed>
<parentInvoiceNumberList>
</parentInvoiceNumberList>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<specificationAvailability>NO</specificationAvailability>
<status>Open</status>
<totalAmount>-386.25</totalAmount>
<type>Credit note</type>
</InvoiceDetails>
</invoices>
<status>OK</status>
</InvoiceResponse>
<?xml version="1.0" encoding="UTF-8"?>
<InvoiceResponse>
<invoices>
<InvoiceDetails>
<batchSource>TMS_AMPHORA_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>2022-06-29</dueDate>
<invoiceDate>31.12.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>10158070</invoiceNumber>
<invoiceProcessed>YES</invoiceProcessed>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<parentInvoiceNumberList>
</parentInvoiceNumberList>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<specificationAvailability>YES</specificationAvailability>
<status>Open</status>
<totalAmount>186.25</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
</invoices>
<status>OK</status>
</InvoiceResponse>
<?xml version="1.0" encoding="UTF-8"?>
<InvoiceResponse>
<invoices>
<InvoiceDetails>
<batchSource>TMS_AMPHORA_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>2022-06-29</dueDate>
<invoiceDate>31.12.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>10158070</invoiceNumber>
<invoiceProcessed>YES</invoiceProcessed>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<parentInvoiceNumberList>
</parentInvoiceNumberList>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<specificationAvailability>NO</specificationAvailability>
<status>Open</status>
<totalAmount>186.25</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
</invoices>
<status>OK</status>
</InvoiceResponse>
<?xml version="1.0" encoding="UTF-8"?>
<InvoiceResponse>
<invoices>
<InvoiceDetails>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>28.02.2020</dueDate>
<invoiceDate>31.12.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>10158070</invoiceNumber>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Open</status>
<totalAmount>386.25</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>PMS_BULKMAIL_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>25.02.2020</dueDate>
<invoiceDate>31.12.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>152148</invoiceNumber>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Closed</status>
<totalAmount>7771.69</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>TMS_AMPHORA_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>06.03.2020</dueDate>
<invoiceDate>31.01.2020</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>1109932</invoiceNumber>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Open</status>
<totalAmount>115.0</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>TMS_LM_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>03.03.2020</dueDate>
<invoiceDate>31.01.2020</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>11404211</invoiceNumber>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Open</status>
<totalAmount>12117.16</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>TMS_AMPHORA_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>03.01.2020</dueDate>
<invoiceDate>30.11.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>1100146</invoiceNumber>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Closed</status>
<totalAmount>485.01</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>TMS_LM_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>31.12.2019</dueDate>
<invoiceDate>30.11.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>11403110</invoiceNumber>
<invoiceSpecificationAvailable>true</invoiceSpecificationAvailable>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Closed</status>
<totalAmount>1964.06</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>PMS_BULKMAIL_OM</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>31.12.2019</dueDate>
<invoiceDate>30.11.2019</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>12139462</invoiceNumber>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Closed</status>
<totalAmount>2076.69</totalAmount>
<type>Invoice</type>
</InvoiceDetails>
<InvoiceDetails>
<batchSource>CRM_SF_EXT</batchSource>
<currency>NOK</currency>
<customerNumber>customerNumber</customerNumber>
<dueDate>30.01.2020</dueDate>
<invoiceDate>30.01.2020</invoiceDate>
<invoiceIssuer>POSTEN_NORGE_AS</invoiceIssuer>
<invoiceNumber>10021151</invoiceNumber>
<specInvoiceReportId>specified_invoice_customer_master</specInvoiceReportId>
<status>Closed</status>
<totalAmount>-75.0</totalAmount>
<type>Credit note</type>
</InvoiceDetails>
</invoices>
<status>OK</status>
</InvoiceResponse>
Invoice PDF download endpoint
https://www.mybring.com/invoicearchive/pdf/{customerNumberUnique}/{invoiceNumber}.pdf
This link is used to download the invoice pdf for the customers by providing API customer number and invoice number in URI params.
Request
path parameters
-
customerNumberUnique
Required -
- Description
- Unique API Customer Number for each customer.
- Type
- string
-
invoiceNumber
Required -
- Description
- Invoice number of the particular invoice to be downloaded.
- Type
- string
Responses
200 OK
Schema
Media type: application/pdf
-
- string <byte>