# Get Package

This operation retrive detailed information or activities of a specific package using its unique packageId.  The packageId is generated when a package is added to the system

Endpoint: GET /api/v1/packages/{packageId}
Version: 1.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer

## Path parameters:

  - `packageId` (string, required)
    The unique identifier of the package to retrieve.

## Query parameters:

  - `type` (string, required)
    The type of the package details to retrive.

## Response 200:

  - `200` (unknown)
    Requested package has been retrived successfully.

## Response 200 fields (application/json):

  - `package` (object)

  - `package.trackingNumber` (string)
    Tracking number of the package.
    Example: PBYV4PVRBYLAAW

  - `package.carrier` (object)

  - `package.carrier.carrierId` (string)
    The unique identifier of the carrier being used.
    Example: FedEx

  - `package.carrier.name` (string)
    Name of the carrier used.
    Example: FedEx

  - `package.damaged` (boolean)
    Whether the package is damaged
    Example: false

  - `package.comment` (string)
    Comment on the package
    Example: user_comment

  - `package.currentLocation` (object)

  - `package.currentLocation.inboundSiteId` (string)
    Unique identifier of the inbound site where the package is currently located.
    Example: zy0a23Bo4Gn0

  - `package.currentLocation.name` (string)
    Name of the current location of the package.
    Example: Site 1CD1001RMF

  - `package.currentLocation.parent` (string)
    The parent location, indicating the immediate hierarchical parent.
    Example: Site

  - `package.currentLocation.type` (string)
    Type of the current location (e.g., site, building, floor, mailstop).
    Example: site

  - `package.currentLocation.locationHierarchy` (string)
    Hierarchy path of the current location of the package in standard format, e.g., Site > Building > Floor > Mailstop.
    Example: Noida, Office of CG| Noida,Bldg| Noida,Floor| Noida,MS

  - `package.currentLocation.ancestorlist` (array)
    A list of ancestors in the location hierarchy, providing a traceable path to the current location.For example, [Site, Building, Floor].
    Example: ["k5OrZWe0ly6dg1v","gKP4RNbMzrPO","XbyR9zpPDneY"]

  - `package.currentLocation.topTier` (object)
    Details of the top-tier location in the hierarchy.

  - `package.currentLocation.topTier.inboundSiteId` (string)
    The unique Inbound Site ID of the top-tier location.
    Example: EMPTY_SITE

  - `package.currentLocation.topTier.name` (string)
    The name of the top-tier location.
    Example: EMPTY_SITE

  - `package.currentStatus` (string)
    Current status of the package.
    Example: RECEIVED

  - `package.confirmationType` (string)
    The type of confirmation captured during the delivery of the package. Indicates proof of delivery, such as PHONE.
    Example: PHONE

  - `package.additionalConfirmationType` (string)
    An additional type of confirmation captured during the delivery.          Like `confirmationType`, it can include values like SIGNATURE.
    Example: SIGNATURE

  - `package.timezone` (integer)
    Timezone offset of the package location in minutes.
    Example: -330

  - `package.customFields` (array)
    List of custom fields associated with the package.Custom fields are additional package fields that can be added to display on PitneyTrack workflow pages.These fields can be defined from the 'My Settings' page in platform settings.

  - `package.customFields.name` (string)
    Name of the custom field as defined by the user in the 'My Settings' page of platform settings.
    Example: End User

  - `package.customFields.status` (string)
    Status of the custom field. Supported values are:
- ACTIVE: The custom field is currently in use.
- INACTIVE: The custom field is not in use.
    Example: ACTIVE

  - `package.customFields.customFieldId` (string)
    Unique identifier for the custom field.
    Example: o1axRY2NKxq

  - `package.customFields.value` (string)
    Value associated with the custom field, as set by the user.
    Example: end user

  - `activities` (array)
    List of activities with details of each activity.

  - `activities.activityId` (string)
    The unique identifier for the activity.
    Example: NWZ7lnJgOMLl

  - `activities.status` (string)
    The current status of the activity.
    Example: CREATED

  - `activities.location` (object)

  - `activities.location.inboundSiteId` (string)
    Unique identifier of the inbound site where the package is currently located.
    Example: zy0a23Bo4Gn0

  - `activities.location.name` (string)
    Name of the current location of the package.
    Example: Site 1CD1001RMF

  - `activities.location.type` (string)
    Type of the current location (e.g., site, building, floor, mailstop).
    Example: site

  - `activities.location.locationHierarchy` (string)
    Hierarchy path of the current location of the package, e.g., Site > Building > Floor > Mailstop.
    Example: Site 1CD1001RMF

  - `activities.route` (object)
    Details of the route associated with the activity.
    Example: {}

  - `activities.username` (string)
    The username associated with the activity.
    Example: API-SP360-8BZWymklRPj5-DEV

  - `activities.currentState` (object)
    Current state details of the asset associated with the activity.
    Example: {}

  - `images` (array)
    List of images related to the package.

  - `images.imageId` (string)
    The unique identifier for the image.
    Example: 7NNO1R3e1455

  - `images.url` (string)
    The signed URL to access the image. The URL is valid for a limited time.
    Example: https://225934331380-receiving-service-artifacts-qa.s3.amazonaws.com/images/sac11be/Vlyx3zyQNr8omx6VzoR8Q/7NNO1R3e1455?X-Amz-Algorithm=AWS4-HMAC-SHA256&..........

  - `images.contentType` (string)
    The MIME type of the image.
    Example: image/gif

## Response 400:

  - `400` (unknown)
    Invalid request.

## Response 400 fields (application/json):

  - `errors` (array)
    List of errors.

  - `errors.errorCode` (string)
    This error can be validation_error or internal_error or not_found or already_exists
    Example: validation_error

  - `errors.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: Asset not found.

  - `errors.additionalCode` (string)
    A unique identifier for the error
    Example: 020005

  - `errors.additionalInfo` (string)
    additional information of the error.
    Example: additional information

  - `errors.additionalParameters` (string)
    The field(s) that might be incorrect in the request.
    Example: additional parameters

  - `errors.correlationID` (string)
    Example: correlationId

## Response 401:

  - `401` (unknown)
    The request could not be authorized.

## Response 401 fields (application/json):

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

## Response 500:

  - `500` (unknown)
    The request could not be completed due to an internal error.

