# Get Pickups

Get Pickups

Endpoint: GET /api/v1/pickups
Version: 1.0.0
Security: bearerAuth

## Query parameters:

  - `carrier` (string)
    Name of the carrier to retrieve pickups for.

  - `startDate` (string)
    The start date for filtering pickups. Format: YYYY-MM-DD.

  - `endDate` (string)
    The end date for filtering pickups. Format: YYYY-MM-DD.

  - `status` (string)
    The status of the pickups to retrieve (scheduled or cancelled).

## Header parameters:

  - `X-PB-Developer-Partner-Id` (string)
    This is the Developer Partner ID. When the developer is the only partner, this field is not required.

## Response 200 fields (application/json):

  - `pageInfo` (object)

  - `pageInfo.total` (integer)
    Total number of records for pickups.
    Example: 78

  - `pageInfo.pages` (integer)
    Total number of pages available.
    Example: 8

  - `pageInfo.page` (integer)
    Current page number.
    Example: 1

  - `data` (object)

  - `data.packageLocation` (string)
    The location where the parcel will be available for pickup.
    Example: None

  - `data.confirmationNumber` (string)
    The confirmation number generated when the pickup request is successfully processed.
    Example: 2929602E9CP

  - `data.pickupId` (string)
    Unique identifiers for scheduled pickups.
    Example: UPS10191697701340901

  - `data.carrier` (string)
    The carrier is beng used for the pickup.
    Example: ups

  - `data.carrierAccountId` (string)
    The unique identifier of the carrier account being used to process the pickup.
    Example: j4pqLKjQ5dn

  - `data.pickupAddress` (object)

  - `data.pickupAddress.name` (string)
    The name of the person or entity at the pickup address.
    Example: Test

  - `data.pickupAddress.addressLine1` (string)
    First line of the address where the pickup will occur.
    Example: 27 Waterview Dr

  - `data.pickupAddress.cityTown` (string)
    The city or town where the pickup address is located.
    Example: Shelton

  - `data.pickupAddress.stateProvince` (string)
    The state or province of the pickup address. For a US or Canadian address, it is the 2-letter state or province code.
    Example: CT

  - `data.pickupAddress.postalCode` (string)
    The postal or ZIP code for the pickup address. For US addresses, use either the 5-digit or 9-digit ZIP Code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.
    Example: 06484-4301

  - `data.pickupAddress.countryCode` (string)
    The two-letter country code for the pickup address.
    Example: US

  - `data.pickupAddress.phone` (string)
    The contact phone number for the pickup location.
    Example: 1234567890

  - `data.pickupAddress.company` (string)
    The name of the company at the pickup address, if the recipient address is not residential.
    Example: PB

  - `data.pickupAddress.email` (string)
    The email address associated with the pickup location.
    Example: ankita.chaurasia@pb.com

  - `data.pickupSummary` (array)
    An array of the pickup details, including the number of packages, total weight, and carrier service information.

  - `data.pickupSummary.serviceId` (string)
    The abbreviated name of the carrier-specific service.
    Example: NDA

  - `data.pickupSummary.packageCount` (number)
    The total number of packages being picked up.
    Example: 2

  - `data.pickupSummary.totalWeight` (number)
    The total weight of all packages to be picked up, measured in units supported by the carrier in the origin country. The value is a decimal with up to 2 decimal places.
    Example: 15

  - `data.pickupSummary.weightUnit` (string)
    The unit of measurement for the total package weight.
    Example: OZ

  - `data.pickupSummary.currencyCode` (string)
    The currency code in which the rates are calculated.  This field is supported for FEDEX carrier only.
    Example: USD

  - `data.pickupSummary.parcelType` (string)
    The type of parcel used for the shipment, as defined by the carrier. Supported for UPS and FedEx carriers.
    Example: PKG

  - `data.pickupSummary.packageDetails` (array)
    Details of each package in the parcel being picked up. Supported for DHLEXP carrier only.

  - `data.pickupSummary.packageDetails.width` (number)
    The width of the package in the unit specified by dimUnit.
    Example: 1

  - `data.pickupSummary.packageDetails.height` (number)
    The height of the package in the unit specified by dimUnit.
    Example: 15

  - `data.pickupSummary.packageDetails.length` (number)
    The length of the package in the unit specified by dimUnit.
    Example: 10

  - `data.pickupSummary.packageDetails.dimUnit` (string)
    The unit of measurement for the package dimensions.
    Example: IN

  - `data.pickupSummary.packageDetails.weightUnit` (string)
    The unit of measurement for the package weight.
    Example: OZ

  - `data.pickupSummary.packageDetails.weight` (number)
    The weight of the package in the unit specified by weightUnit.
    Example: 1

  - `data.specialInstructions` (string)
    Any special instructions or notes for the carrier regarding the pickup.
    Example: Call befor pickup

  - `data.totalWeight` (number)
    The total weight of all packages being picked up.
    Example: 16

  - `data.pickupTotalWeightUnit` (string)
    The unit of measurement for the total package weight.
    Example: OZ

  - `data.totalCount` (integer)
    The total number of packages being picked up.
    Example: 2

  - `data.status` (string)
    The current status of the pickup request. Values are `scheduled`and `cancelled`.
    Example: scheduled

  - `data.reference` (string)
    An optional Reference related to the pickup.
    Example: zscsdc

  - `data.pickupDateTime` (string)
    The date and time of the pickup.
    Example: 2024-10-10T17:05:05Z

  - `data.pickupOptions` (object)

  - `data.pickupOptions.pickupStartDateTime` (string)
    The start date and time for the pickup in ISO 8601 format. This indicates when the pickup window begins.
    Example: 2024-10-10T17:03:05Z

  - `data.pickupOptions.pickupEndDateTime` (string)
    The end date and time for the pickup in ISO 8601 format. This indicates when the pickup window closes.
    Example: 2024-10-10T17:05:05Z

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

