# Download BPOD Files

This API operation is used to download bulk of ERR (*Electronic Return Receipt*) - POD (*Proof of Delivery*) files, which are specific to USPS carrier. <br />
User can download BPOD (*Bulk Proof of Delivery*) files either using *Shipment IDs* or *Date Range*. <br/>
- To get the records based on dates and download BPOD files accordingly, *Start Date* and *End Date* need to be passed in the request body as a query filter.<br/>
**Note:** To get a downloadable link of BPOD files on the basis of date range provided, an empty JSON body {} must be passed in the request body.  <br/>
- When both the **date range** and  **Shipment IDs** are provided in the request, *Shipment IDs* will take precedance. <br/>
- User is restricted to download 1000 BPOD files as max limit.

Endpoint: POST /api/v1/err/shipments/bpod
Version: 1.0.0
Security: bearerAuth

## Query parameters:

  - `startDate` (string)
    The BPOD files to be downloaded from which Date is the startDate in the Date Range filter. This field is not required if the Shipment IDs provided in the request body. Format: YYYY-MM-DD.

  - `endDate` (string)
    The BPOD files to be downloaded till which Date is the endDate in the Date Range filter. This field is not required if the Shipment IDs provided in the request body. Format: YYYY-MM-DD.

## Header parameters:

  - `X-PB-Developer-Partner-ID` (string)
    The Developer Partner ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field is not required.

## Request fields (application/json):

  - `shipmentIds` (array)
    > - This shows the list of Shipment IDs. If this is present, then user does not need to provide `Date Range` filter. Else `startDate` and `endDate` need to be passed in the Query Parameters.

## Response 200 fields (application/json):

  - `fileURL` (string)
    This is the URL for the BPOD (Bulk Proof of Delivery) ZIP file.
    Example: https://api-sandbox.pitneybowes.com/shippingservices/v1/bpod/210000000000000000/bpod-WodOGmplw0W3kR5.zip

## Response 400 fields (application/json):

  - `errorCode` (string)
    Error code(s) that appear due to HTTP  400- Invalid or Bad Request, e.g., validation-error.
    Example: validation_error

  - `errorDescription` (string)
    The HTTP 400 Bad Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
    Example: string

  - `additionalCode` (string)
    A unique identifier for the error, for example 1101055, 0100008, or 1021126.

  - `additionalInfo` (string)
    This is an additional information about the error. This error 'Invalid Request' might appear due to invalid dimension, weight, or serviceID, or if the information is missing.

  - `additionalParameters` (array)

## Response 401 fields (application/json):

  - `message` (string, required)
    This is HTTP 401 Unauthorized response status code, which indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

## Response 500 fields (application/json):

  - `message` (string, required)
    This is HTTP 500 Internal Server Error response status code, which indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

