Reports API

Introduction

The Reports API is used to generate shipment reports, the same set of reports that are available in mybring.

Each Mybring user is associated with a set of customers and has access to specific set of report types for which they can generate a report.

The following steps (which will be API calls) enables you to generate a report:

  1. Get the customers associated with the mybring user.
  2. Get the report types allowed for a customer.
  3. Initiate report creation and get report ID. The Report ID is initially used to monitor reports creation progress, later to get the actual report (XML or Excel file).
  4. After initiating report creation, you can check the status if the job. I.e. if it is in progress, completed or failed. When status is completed, a URL for fetching the actual report is returned.
  5. The report can then be downloaded.

For all the above APIs we need to identify and authenticate the user. This is done by passing the following header information. These are described in Reference section:

  • Mybring username (email address)
  • API Key

All these APIs are available in json and xml formats.

How to use

The Reports API is a logged-in service and you need to get an API-key and authenticate before being able to use the API.

The two first steps in the process is only necessary to find customer numbers and report types for the user. You can save these IDs, and perform the generation-step without verifying the IDs. The response may get added information, so implementation should ignore new elements added to the response.

  1. Get customer IDs
  2. Get list of available reports
  3. Generate report
  4. Check status of report
  5. Download report
  6. Get list of invoice numbers for given customer or group

Authentication

The Reports 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 set for all endpoints documented below.

Overview of endpoints

Base URL

https://www.mybring.com/reports/api
Method Endpoint Usage
GET /generate{mediaTypeExtension} List available customers
GET /generate/{customerId}{mediaTypeExtension} List available reports for a customer
GET /generate/{customerId}/{reportTypeId}{mediaTypeExtension} Generate a report
GET /reports/{reportId}/status{mediaTypeExtension} Check the status of a report
GET /reports/{reportId}{mediaTypeExtension}
GET /invoices/{customerOrGroupId}{mediaTypeExtension}

List available customers

List available customers for the provided API credentials.

URL

https://www.mybring.com/reports/api/generate.json
https://www.mybring.com/reports/api/generate.xml

Request params

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Response

Successful response (200)

{
  "customers":[
    {
        "id":"PARCELS_NORWAY-00012341234",
        "name":"TEST CUSTOMER",
        "fullName":"TEST CUSTOMER (00012341234)",
        "reports":"https://www.mybring.com/reports/api/generate/PARCELS_NORWAY-00012341234/"
    }

]}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CustomerList>
    <customers>
        <id>PARCELS_NORWAY-00012341234</id>
        <name>TEST CUSTOMER</name>
        <reports>https://www.mybring.com/reports/api/generate/PARCELS_NORWAY-00012341234/</reports>
    </customers>
</CustomerList>

List available reports for a customer

Each customer has a set of reports available. This endpoint lists all available reports for a given customer.

URL

https://www.mybring.com/reports/api/generate/{customerId}.json
https://www.mybring.com/reports/api/generate/{customerId}.xml

Request params

URI parameter Type Description
customerId string

Required. A customer ID from the ‘list of available customers’ call.

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Response

Successful response (200)

{
  "reports": [
    {
      "id": "PARCELS-PRE_NOTIFICATION_RECEIVED",
      "name": "Pre-notification provided",
      "description": "Overview of shipments you have sent pre-notification for.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-PRE_NOTIFICATION_RECEIVED/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-RECEIVED_BY_BRING",
      "name": "Received by Bring",
      "description": "Overview of shipments received by Bring.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-RECEIVED_BY_BRING/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-PROBABLE_DELAYS",
      "name": "Probable delays",
      "description": "Overview of shipments that are likely to be delayed delivered to the recipient in accordance to Bring's guideline freight forwarding tables.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-PROBABLE_DELAYS/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-OUT_FOR_DELIVERY",
      "name": "Out for delivery to recipient today",
      "description": "Overview of shipments currently on vehicle for delivery.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-OUT_FOR_DELIVERY/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-NOT_COLLECTED_AT_PICKUPPOINT",
      "name": "Not collected at pick-up point",
      "description": "Overview of shipments at the pick-up point which have not yet been collected by the recipient.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-NOT_COLLECTED_AT_PICKUPPOINT/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-DELIVERY-ATTEMPTED",
      "name": "Delivery attempted",
      "description": "Overview of shipments for which delivery to the recipient has been attempted.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERY-ATTEMPTED/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-MISSING_PRE_NOTIFICATION",
      "name": "Missing pre-notification",
      "description": "Overview of shipments received by Bring, but which are missing pre-notification. The shipments may be delayed.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-MISSING_PRE_NOTIFICATION/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-DELIVERED",
      "name": "Delivered to recipient",
      "description": "Overview of shipments which are delivered to the recipient.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERED/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-RETURNED",
      "name": "Returned",
      "description": "Overview of shipments that have been returned to the sender.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-RETURNED/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-ADDRESS_QUALITY_B2B",
      "name": "Address quality for commercial parcels",
      "description": "Overview of commercial parcels with wrong post code in delivery address.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDRESS_QUALITY_B2B/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-LAST_STATUS",
      "name": "Last status",
      "description": "Overview of last events Bring has for your shipments",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-LAST_STATUS/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-DELIVERY_QUALITY",
      "name": "Delivery quality",
      "description": "The report shows an overview of shipments that were not delivered in accordance with Bring's guideline freight forwarding tables.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERY_QUALITY/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-FREIGHT_STATISTICS_SUMMED",
      "name": "Freight statistics, summarized",
      "description": "Overview of shipping costs per month per product",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-FREIGHT_STATISTICS_SUMMED/",
      "parameter": [
        {
          "name": "reporttype",
          "type": "string",
          "description": "INVOICED=Invoiced year, HANDED_IN=Handed in year"
        },
        {
          "name": "year",
          "type": "int",
          "description": "Year for report"
        }
      ]
    },
    {
      "id": "PARCELS-CURRENT_CALCULATED_SHIPPING",
      "name": "Current calculated shipping",
      "description": "Overview of current shipping costs for your sent parcels.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-CURRENT_CALCULATED_SHIPPING/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-FREIGHT_STATISTICS_DETAILED",
      "name": "Freight statistics, detailed",
      "description": "Overview of shipping costs per month per article.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-FREIGHT_STATISTICS_DETAILED/",
      "parameter": [
        {
          "name": "reporttype",
          "type": "string",
          "description": "INVOICED=Invoiced year, HANDED_IN=Handed in year"
        },
        {
          "name": "year",
          "type": "int",
          "description": "Year for report"
        }
      ]
    },
    {
      "id": "PARCELS-ECONOMY_AND_STATISTICS",
      "name": "Economy and statistics",
      "description": "Overview of shipping costs for your sent shipments.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ECONOMY_AND_STATISTICS/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    },
    {
      "id": "PARCELS-SPECIFIED_INVOICE",
      "name": "Specified invoice",
      "description": "Overview of what is invoiced per shipment.",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-SPECIFIED_INVOICE/",
      "parameter": [
        {
          "name": "invoiceNumber",
          "type": "string",
          "description": "Invoice number for the report"
        }
      ]
    },
    {
      "id": "PARCELS-ADDITIONAL-COSTS",
      "name": "Statistics on extra delivery and delivery attempts",
      "description": "The report shows statistics and costs of additional delivery attempt by the recipient or by delivery location",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDITIONAL-COSTS/",
      "parameter": [
        {
          "name": "invoiceNumber",
          "type": "string",
          "description": "Invoice number for the report"
        }
      ]
    },
    {
      "id": "PARCELS-ADDITIONAL-COSTS",
      "name": "Statistics on extra delivery and delivery attempts",
      "description": "The report shows statistics and costs of additional delivery attempt by the recipient or by delivery location",
      "url": "https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDITIONAL-COSTS/",
      "parameter": [
        {
          "name": "fromDate",
          "type": "date",
          "description": "Startdate of the report. Format: DD.MM.YYYY"
        },
        {
          "name": "toDate",
          "type": "date",
          "description": "Enddate of the report. Format: DD.MM.YYYY"
        }
      ]
    }
  ]
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReportList>
    <reports>
        <id>PARCELS-PRE_NOTIFICATION_RECEIVED</id>
        <name>Pre-notification provided</name>
        <description>Overview of shipments you have sent pre-notification for.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-PRE_NOTIFICATION_RECEIVED/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-RECEIVED_BY_BRING</id>
        <name>Received by Bring</name>
        <description>Overview of shipments received by Bring.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-RECEIVED_BY_BRING/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-PROBABLE_DELAYS</id>
        <name>Probable delays</name>
        <description>Overview of shipments that are likely to be delayed delivered to the recipient in accordance to Bring's guideline freight forwarding tables.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-PROBABLE_DELAYS/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-OUT_FOR_DELIVERY</id>
        <name>Out for delivery to recipient today</name>
        <description>Overview of shipments currently on vehicle for delivery.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-OUT_FOR_DELIVERY/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-NOT_COLLECTED_AT_PICKUPPOINT</id>
        <name>Not collected at pick-up point</name>
        <description>Overview of shipments at the pick-up point which have not yet been collected by the recipient.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-NOT_COLLECTED_AT_PICKUPPOINT/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-DELIVERY-ATTEMPTED</id>
        <name>Delivery attempted</name>
        <description>Overview of shipments for which delivery to the recipient has been attempted.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERY-ATTEMPTED/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-MISSING_PRE_NOTIFICATION</id>
        <name>Missing pre-notification</name>
        <description>Overview of shipments received by Bring, but which are missing pre-notification. The shipments may be delayed.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-MISSING_PRE_NOTIFICATION/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-DELIVERED</id>
        <name>Delivered to recipient</name>
        <description>Overview of shipments which are delivered to the recipient.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERED/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-RETURNED</id>
        <name>Returned</name>
        <description>Overview of shipments that have been returned to the sender.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-RETURNED/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-ADDRESS_QUALITY_B2B</id>
        <name>Address quality for commercial parcels</name>
        <description>Overview of commercial parcels with wrong post code in delivery address.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDRESS_QUALITY_B2B/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-LAST_STATUS</id>
        <name>Last status</name>
        <description>Overview of last events Bring has for your shipments</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-LAST_STATUS/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-DELIVERY_QUALITY</id>
        <name>Delivery quality</name>
        <description>The report shows an overview of shipments that were not delivered in accordance with Bring's guideline freight forwarding tables.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-DELIVERY_QUALITY/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-FREIGHT_STATISTICS_SUMMED</id>
        <name>Freight statistics, summarized</name>
        <description>Overview of shipping costs per month per product</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-FREIGHT_STATISTICS_SUMMED/</url>
        <parameters>
            <parameter>
                <name>reporttype</name>
                <type>string</type>
                <description>INVOICED=Invoiced year, HANDED_IN=Handed in year</description>
            </parameter>
            <parameter>
                <name>year</name>
                <type>int</type>
                <description>Year for report</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-CURRENT_CALCULATED_SHIPPING</id>
        <name>Current calculated shipping</name>
        <description>Overview of current shipping costs for your sent parcels.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-CURRENT_CALCULATED_SHIPPING/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-FREIGHT_STATISTICS_DETAILED</id>
        <name>Freight statistics, detailed</name>
        <description>Overview of shipping costs per month per article.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-FREIGHT_STATISTICS_DETAILED/</url>
        <parameters>
            <parameter>
                <name>reporttype</name>
                <type>string</type>
                <description>INVOICED=Invoiced year, HANDED_IN=Handed in year</description>
            </parameter>
            <parameter>
                <name>year</name>
                <type>int</type>
                <description>Year for report</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-ECONOMY_AND_STATISTICS</id>
        <name>Economy and statistics</name>
        <description>Overview of shipping costs for your sent shipments.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ECONOMY_AND_STATISTICS/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-SPECIFIED_INVOICE</id>
        <name>Specified invoice</name>
        <description>Overview of what is invoiced per shipment.</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-SPECIFIED_INVOICE/</url>
        <parameters>
            <parameter>
                <name>invoiceNumber</name>
                <type>string</type>
                <description>Invoice number for the report</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-ADDITIONAL-COSTS</id>
        <name>Statistics on extra delivery and delivery attempts</name>
        <description>The report shows statistics and costs of additional delivery attempt by the recipient or by delivery location</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDITIONAL-COSTS/</url>
        <parameters>
            <parameter>
                <name>invoiceNumber</name>
                <type>string</type>
                <description>Invoice number for the report</description>
            </parameter>
        </parameters>
    </reports>
    <reports>
        <id>PARCELS-ADDITIONAL-COSTS</id>
        <name>Statistics on extra delivery and delivery attempts</name>
        <description>The report shows statistics and costs of additional delivery attempt by the recipient or by delivery location</description>
        <url>https://api.bring.com.com/reports/api/generate/PARCELS_NORWAY-00012341234/PARCELS-ADDITIONAL-COSTS/</url>
        <parameters>
            <parameter>
                <name>fromDate</name>
                <type>date</type>
                <description>Startdate of the report. Format: DD.MM.YYYY</description>
            </parameter>
            <parameter>
                <name>toDate</name>
                <type>date</type>
                <description>Enddate of the report. Format: DD.MM.YYYY</description>
            </parameter>
        </parameters>
    </reports>
</ReportList>

Generate a report

To generate a report do a GET to the supplied URL, and include the parameters described in the previous response. You need not invoke the two first steps for every report generation if customer id and report type are known.

This is asynchronous request. So the GET-call will return 202, telling the caller the that the request for a report is put on the queue. The URL to query to get the status for the request if provided as an HTTP header and also in the response.

The example below shows how to generate a PARCELS-DELIVERED report for PARCELS_NORWAY-00012341234 in the period 01.07.2014 to 01.08.2014.

URL

https://www.mybring.com/reports/api/generate/{customerId}/{reportTypeId}.json
https://www.mybring.com/reports/api/generate/{customerId}/{reportTypeId}.xml

Request params

URI parameter Type Description
customerId string

Required. A customer ID from the ‘list of available customers’ call.

reportTypeId string

Required. A report type ID from the ‘list of available reports’ call.

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Query parameter Type Description
parameterName string

Required. The different report types have different params. The params are doucmented in the list of available reports, for example fromDate and toDate.

Response

Successful response (202)

Header name Type Description
Location string

URL to get status of the generated report


Example: https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73/status/
{
  "statusUrl":"https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73/status/"
}
<result>
  <statusUrl>https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73/status/</statusUrl>
</result>

Check the status of a report

Since the generation of reports may take several minutes, we supply a status address to check the status of the report generation. The status page will display NOT_DONE, until the report is ready to be downloaded. When the report is ready, URLs to download the report will be in the response

URL

https://www.mybring.com/reports/api/reports/{reportId}/status.json
https://www.mybring.com/reports/api/reports/{reportId}/status.xml

Request params

URI parameter Type Description
reportId string

Required. A report ID from a ‘generate a report’ call.

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Response

Report status (200)

Examples show different statuses.

{
  "status":"NOT_DONE"
}
{
  "status":"DONE",
  "xmlUrl":"https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73.xml",
  "xlsUrl":"https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73.xls"
}
{
  "status":"FAILED"
}
<result>
  <status>NOT_DONE</status>
</result>
<result>
  <status>DONE</status>
  <xmlUrl>https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73.xml</xmlUrl>
  <xlsUrl>https://www.mybring.com/reports/api/report/db285042-6e8d-4563-94ca-eb1100706a73.xls</xlsUrl>
</result>
<result>
  <status>FAILED</status>
</result>

Get report

Returns the generated report.

URL

https://www.mybring.com/reports/api/reports/{reportId}.xls
https://www.mybring.com/reports/api/reports/{reportId}.xml

Request params

URI parameter Type Description
reportId string

Required. A report ID from a ‘generate a report’ call.

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Response

Report (200)

Examples show different statuses.

<Report xmlns="urn:bring.no/mybring/Report">
  <MetaData>
    <ReportName>Delivered to recipient</ReportName>
    <FinishedAt type="iso8601">2015-10-19T15:17:07.077+02:00</FinishedAt>
    <CustomerId>00012341234</CustomerId>
    <CustomerName>TEST CUSTOMER</CustomerName>
    <Interval>
      <Start type="iso8601">2015-01-01T00:00:00.000+01:00</Start>
      <End type="iso8601">2015-10-19T23:59:59.000+02:00</End>
    </Interval>
    <NumberOfRows>0</NumberOfRows>
  </MetaData>
  <Lines>
  </Lines>
</Report>

List invoice numbers

Get the list of invoice numbers for a customer id or a customer group.

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_.

Header name Type Description
Accept-Language string

Optional. A comma-separated list of language codes, no for Norwegian, en for English, etc.

Response

Successful response (200)

{
  "customerId": "PARCELS_NORWAY-00012341234",
  "invoiceNumbers": [
    {
      "label": "702941479 (10/18/2015)",
      "id": "702941479",
      "year": 2015,
      "month": 10,
      "day": 18
    },
    {
      "label": "702926498 (10/8/2015)",
      "id": "702926498",
      "year": 2015,
      "month": 10,
      "day": 8
    },
    {
      "label": "702916952 (10/1/2015)",
      "id": "702916952",
      "year": 2015,
      "month": 10,
      "day": 1
    }
  ]
}
<Invoice>
  <customerId>PARCELS_NORWAY-00012341234</customerId>
  <invoiceNumbers>
    <label>702941479 (10/18/2015)</label>
    <id>702941479</id>
    <year>2015</year>
    <month>10</month>
    <day>18</day>
  </invoiceNumbers>
  <invoiceNumbers>
    <label>702926498 (10/8/2015)</label>
    <id>702926498</id>
    <year>2015</year>
    <month>10</month>
    <day>8</day>
  </invoiceNumbers>
  <invoiceNumbers>
    <label>702916952 (10/1/2015)</label>
    <id>702916952</id>
    <year>2015</year>
    <month>10</month>
    <day>1</day>
  </invoiceNumbers>
</Invoice>