Documents API
The Documents API can be used to fetch documents related to your shipments.
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.
Format
REST JSON over HTTP when searching for documents. The documents contains JSON or PDF.
Document types
The only type of documents that are currently available in the API are customs documents. These are the same that can be found customs document section in Mybring web. There exists both JSON and PDF variants of most customs declaration documents.
Endpoints
https://www.mybring.com/document-search
Usage | Method | Endpoint |
---|---|---|
Search for documents | GET |
/api/v1/search/{customerNumber}
|
Fetch document by id | GET |
/api/v1/document/{customerNumber}/{id}
|
OpenAPI document
https://www.mybring.com/document-search/v3/api-docsSearch for documents
https://www.mybring.com/document-search/api/v1/search/{customerNumber}
Customer number must be set and at least one of the other search parameters. Max range for date interval search is 100 days
Request
path parameters
-
customerNumber
Required -
- Type
- string
query parameters
-
customsDeclarationNumber
-
- Type
- string
-
orderNumber
-
- Type
- string
-
shipmentNumber
-
- Type
- string
-
packageNumber
-
- Type
- string
-
dateArchivedFrom
-
- Description
- Date format: yyyy-MM-dd
- Type
- string
- Example
dateArchivedFrom=2024-10-01
-
dateArchivedTo
-
- Description
- Date format: yyyy-MM-dd
- Type
- string
- Example
dateArchivedTo=2024-10-30
Responses
200 Successfully provided document ids for the given search
Schema
Media type: application/json
-
Required
- array of objects
consignmentItemNumbers
- array of strings
-
- string
-
-
consignmentNumber
- string
-
customerNumber
Required - string
-
docType
Required - string
-
filename
Required - string
-
id
Required - string
-
orderDate
- string <date>
-
packageNumber
Required - string
-
shipmentNumber
Required - string
-
uploadedDate
Required - string <date>
Response examples
{
"documents": [
{
"customerNumber": "123456789",
"docType": "JSON",
"filename": "filename.json",
"id": "4321-8765-json-4321",
"orderDate": "2024-01-01",
"packageNumber": "370123456789",
"shipmentNumber": "123456789",
"uploadedDate": "2024-01-01"
},
{
"customerNumber": "123456789",
"docType": "pdf",
"filename": "filename.pdf",
"id": "1234-5678-pdf-1234",
"orderDate": "2024-01-01",
"packageNumber": "370123456789",
"shipmentNumber": "123456789",
"uploadedDate": "2024-01-01"
}
]
}
Fetch document by id
https://www.mybring.com/document-search/api/v1/document/{customerNumber}/{id}
Fetch document by id for a given customer number.
Request
path parameters
-
customerNumber
Required -
- Type
- string
-
id
Required -
- Type
- string
header parameters
-
Accept
-
- Description
- Documents are either of type PDF or JSON. Allowed accept headers are application/json and application/pdf or just accept all.
- Type
- any
- Example
Accept=*/*