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 | POST |
/api/v1/search
|
Fetch document by id | GET |
/api/v1/document/{id}
|
OpenAPI document
https://www.mybring.com/document-search/v3/api-docsSearch for documents
https://www.mybring.com/document-search/api/v1/search
Customer number must be set and at least one of the other search parameters. Max range for date interval search is 100 days
Request
Body schema
Media type: application/json
-
customerNumber
Required - string
-
customsDeclarationNumber
- string
-
dateArchivedFrom
- string <date>
-
dateArchivedTo
- string <date>
-
orderNumber
- string
-
packageNumber
- string
-
shipmentNumber
- string
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
- string
-
docType
- string
-
filename
- string
-
id
- string
-
orderDate
- string <date>
-
uploadedDate
- string <date>
Response examples
{
"documents": [
{
"consignmentItemNumbers": [
"123456789"
],
"consignmentNumber": "123456789",
"customerNumber": "123456789",
"docType": "JSON",
"filename": "Testfile_name.json",
"id": "123456789",
"orderDate": "2024-01-01",
"uploadedDate": "2024-01-01"
}
]
}
Fetch document by id
https://www.mybring.com/document-search/api/v1/document/{id}
Fetch document by id for a given customer number. Returns a bytearray formatted as either JSON or PDF
Request
path parameters
-
id
Required -
- Type
- string
query parameters
-
customerNumber
Required -
- Type
- string
Responses
200 OK
Schema
-
- string <byte>
-
- string <byte>