Getting Started

Base Url

https://api.packagex.app/v1/

Header

Key: x-api-key
Value: Available in the API section of the Web Dashboard (portal.packagex.app)

PackageX Portal

PackageX Portal

Member Expose API

Add New Member

Endpoint

POST

/entity/exposed/member

Description

This endpoint adds a new member in the specified building.

Content-Type

application/json

Query Parameters

The following parameters are accepted in the body of the request in a json format

Parameter

client_id

Type

UUID

Required

Yes

Description

Unique client id for user access verification. Available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

building_key

Type

UUID

Required

Yes

Description

Unique building id for building selection in which the recipient record has to be added. List of buildings along with their uuid are available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

recipient_name

Type

String

Required

Yes

Description

Name of the recipient.

Parameter

recipient_email

Type

String

Required

Yes

Description

Email address of the recipient.

Parameter

recipient_phone

Type

String

Required

No

Description

Phone number of the recipient.

Parameter

recipient_office_num

Type

String

Required

No

Description

Unit number of the recipient in the building.

Parameter

recipient_floor

Type

String

Required

No

Description

Floor number of the recipient in the building.

Parameter

recipient_permanent_address

Type

String

Required

No

Description

Permanent address of recipient.

Parameter

recipient_profile_picture

Type

Text Base64 encoded

Required

No

Description

Profile picture.

Parameter

recipient_note

Type

String

Required

No

Description

A specific note for recipient.

Parameter

recipient_alternate_name

Type

String Array

Required

No

Description

Alternate names / Nick names of the recipient.

Parameter

recipient_alternate_email

Type

String Array

Required

No

Description

Alternate email addresses of the recipient.

Parameter

recipient_alternate_phone

Type

String Array

Required

No

Description

Alternate phone numbers of the recipient.

Response Example

[
  {
    "recipient_key": "a45d87a3-80fb-4a5e-84aa-98c265de14c8",
    "messsage": "Recipient added successfully."
  }
]

Get All Members

Endpoint

GET

/entity/exposed/member

Description

This endpoint retrieves all members within access limits of user role.

Content-Type

application/json

Query Parameters

The following parameters are accepted in the body of the request in a json format

Parameter

client_id

Type

UUID

Required

Yes

Description

Unique client id for user access verification. Available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

building_key

Type

UUID

Required

No

Description

Unique building id for building selection. If set, the result will only contain the members of specific building. List of buildings along with their uuid are available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

group_key

Type

UUID

Required

No

Description

If set, the result will only contain the recipients of a specific group.

Parameter

recipient_key

Type

String

Required

No

Description

Should contain comma separated UUID only. UUIDs of recipients for which records to show.

Parameter

include_num_pending_items

Type

Boolean

Required

No

Description

Default: false. If true, number of pending items associated with all the recipients will also be returned. Recipients with no items in the given time window will not be returned as a result.

Parameter

item_activity_type

Type

String

Required

No

Description

Default:’SCAN-IN’.Value will be one of ‘SCAN-IN’, ‘SCAN-OUT’, ‘ALL’, return member packages based on filter.

Parameter

include_designated_recipients_only

Type

Boolean

Required

No

Description

Default: false. If true, only designated No recipients of a group will be returned. Only compatible with group_key parameter.

Parameter

include_group

Type

Boolean

Required

No

Description

Default: false. if true, the response will contain an array of json group objects.

Parameter

include_inactive

Type

Boolean

Required

No

Description

Default: false. if true, the response will contain inactive recipients, otherwise only active recipients are returned.

Parameter

pagination_limit

Type

Integer

Required

No

Description

Default/Max:50, if set, the number of records returned will be equal to this number.

Parameter

pagination_offset

Type

Integer

Required

No

Description

If set, the result records would be offset-ed by this number.

Parameter

order_by

Type

String

Required

No

Description

Default created_at. One of the “recent_notified_first”, “email”, “phone”, “created_at”. If ‘recent_notified_first’ is specified, then members who have packages will appear at top and will be sorted according to the packages which have been recently notified.

Response Example

[
  {
    "pagination": {
      "offset": 0,
      "limit": 50,
      "max_limit": 50
    },
    "data": [
      {
        "recipient_count": "312914",
        "recipient_key": null,
        "business_id": "8b3872b0-b4ea-aaa8-88e2-9b49432cd4ed",
        "recipient_name": "John Smith",
        "recipient_email": "john@packagex.xyz",
        "recipient_phone": "7777777777",
        "recipient_office_num": null,
        "recipient_floor": null,
        "recipient_permanent_address": null,
        "recipient_note": null,
        "building_key": "919c9872-6b7a-2f49-91f3-a09ea74cb123",
        "building_name": "PackageX",
        "recipient_is_hot_desk": false,
        "recipient_is_active": true,
        "recipient_is_manually_updated": true,
        "recipient_is_signed_up": false,
        "recipient_alternate_name": null,
        "recipient_alternate_phone": null,
        "recipient_updated_by": "db079995-978d-9993-9f25-acf5ef450123",
        "current_timestamp_updated_at": "2018-11-06T17:46:29.000Z"
      }
    ]
  }
]

Package Expose API

Get All Packages

Endpoint

GET

/entity/exposed/package

Description

This endpoint retrieves all item records within access limits of user role.

Content-Type

application/json

Query Parameters

The following parameters are accepted in the body of the request in a json format

Parameter

client_id

Type

UUID

Required

Yes

Description

Unique client id for user access verification. Available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

building_key

Type

String

Required

No

Description

Should contain comma separated UUID only. UUIDs of buildings for which items to show. List of buildings along with their uuid are available in the API section of the web dashboard (link: portal.packagex.app).

Parameter

recipient_key

Type

String

Required

No

Description

Should contain comma separated UUID only. UUIDs of recipients for which items to show.

Parameter

group_key

Type

String

Required

No

Description

Should contain comma separated UUID only. UUIDs of groups for which items to show.

Parameter

include_image_links

Type

Boolean

Required

No

Description

Default: false. If true, will include item image URLs and item thumbnail image URLs.

Parameter

include_group_recipient_items

Type

Boolean

Required

No

Description

Default: false. If true, will include group recipients items.

Parameter

include_recipient_groups

Type

Boolean

Required

No

Description

Default: false. If true, will include group of recipients.

Parameter

graph_type_filter

Type

Boolean

Required

No

Description

Default: false. If true, will return items based on graph filter dates.

Parameter

from_date

Type

Date

Required

No

Description

Date in iso 8601 format.

Parameter

to_date

Type

Date

Required

No

Description

Date in iso 8601 format.

Parameter

pagination_offset

Type

Integer

Required

No

Description

Default: 0. The pagination offset.

Parameter

pagination_limit

Type

Integer

Required

No

Description

Default/Max: 50. The pagination limit.

Parameter

order_by

Type

String

Required

No

Description

Default: created_at. One of the “created_at”, “updated_at”.

Parameter

order_asc

Type

Boolean

Required

No

Description

Default: false. true to sort packages in ascending order.

Parameter

filter_option

Type

String

Required

No

Description

Should contain comma separated strings only.One or Multiple the value 'outstanding', 'scanned', 'overdue', 'collected', 'deleted', 'hold', 'discarded', 'snapsend', 'destroy', 'request_forward', 'request_hold', 'forward', 'legacy'.

Parameter

date_filtering

Type

Boolean

Required

No

Description

Default: false. If true, will return packages based on filter dates.

Parameter

filter_type

Type

String

Required

No

Description

Default: SCAN-IN.One of the filter “SCAN_OUT”,”ALL”. returns packages based on filter.

Response Example

[
  {
    "pagination": {
      "offset": 0,
      "limit": 50,
      "total": 22227,
      "max_limit": 50
    },
    "data": [
      {
        "items_count": "22227",
        "item_key": 1,
        "item_recipient_key": null,
        "item_uuid": "f933ea59-898b-425d-abcd-ef0f05e4aedc",
        "item_act_type": "SCAN-IN",
        "recipient_name": null,
        "picked_by": 0,
        "item_action_status": "FORWARD",
        "item_to_address": {
          "address": "testing",
          "name": "testing",
          "shipping_method": "Standard",
          "action_label_id": 26,
          "label_type": "cta_fwd"
        },
        "item_images": null,
        "item_status_updated_at": "2020-11-04T04:37:52.000Z",
        "is_designated": null,
        "building_key": 1,
        "building_country": "AF",
        "item_status": "SCANNED",
        "created_at": "2020-10-23T06:41:26.000Z",
        "recipient_email": null,
        "recipient_phone": null,
        "recipient_office": null,
        "group_name": null,
        "item_group_key": null,
        "mailroom_name": "Front Desk",
        "item_ml_key": 1,
        "building_name": "PackageX Mailroom",
        "item_courier": "usps",
        "item_tracking_no": "9101026837331000001016",
        "item_category": null,
        "scanned_by": "2fd9be8f-b412-4222-a197-1000067a3ed0",
        "item_note": null,
        "item_discard_reason": null,
        "item_picked_reason": null,
        "updated_at": null,
        "item_image": "https://",
        "item_image_thumbnail": "https://"
      }
    ]
  }
]

Notes

updated_at indicates the picked timestamp of the item. In case of notified items, this field will be NULL.


Notification Webhooks

Notification Webhooks

Description

Mailroom by PackageX provides a capability to receive real-time triggers for all the events from the app and dashboard. The supported events include:

  • Inbound:
    • Notify (single and multiple)
    • Pickup (single and multiple)
    • Reminders (single and multiple)
    • Reroute (single)
    • Discard (single and multiple)
  • Outbound:
    • Accepted (single and multiple)
    • Dispatched (single and multiple)
  • Actions on items:
    • Scanned & Sent
    • Forwarded
    • Held
    • Destroyed

Webhook Security

Webhook can be secured using basic authentication. The client can choose to provide an x - api - key to secure their webhooks and all triggers to the webhook will contain this x-api-key in the header.

The payload pushed to the webhook is sent in the body of an HTTPS request. As a prevention against man-in-the-middle attacks, HTTP webhooks are NOT supported.

Webhook Registration

Webhooks can be registered in the system by initiating a request to support@packagex.io and providing the required details. You can request to use the same or different webhook URL for all types of notifications. You can also choose to turn ON triggers for only the selected notification types (e.g. Notify and Pickup, etc.) instead of all.

Details required for webhook registration:

  1. Webhook URL (required)
  2. api_key (optional – default is without basic authentication)
  3. Notification types (optional – default is ON for all types of notifications)

Response Example

[
  {
    "action": "NOTIFY, // NOTIFY, PICKED, REMIND, DISCARD, REROUTE",
    "item_detail": [
      {
        "item_courier": "fedex",
        "item_tracking_no": "70702030023",
        "building_name": "City Hall",
        "building_address": "123 Market Street",
        "building_city": "New York",
        "building_state": "NY",
        "building_country": "US",
        "building_key": "3f6c33eb-7bec-092c-9d9c-8c8857887e95",
        "mailroom_code": "FD01",
        "mailroom_name": "Front Desk",
        "item_uuid": "33333333-7777-092c-abac-8c8b57af7115",
        "item_act_type": "SCAN-IN, // SCAN-IN or SCAN-OUT",
        "recipient_name": "John Smith",
        "recipient_email": "john@email.com",
        "sender_name": " // for outbound items",
        "sender_email": "jane@email.com // for outbound items",
        "item_picked_by": "Brad Stanley",
        "picked_by_email": "brad@email.com",
        "item_discard_reason": "XYZ",
        "item_pickup_reason": "XYZ",
        "item_image": "https://",
        "picked_by_signature": "https://",
        "item_note": "XYZ",
        "item_forward_details": null,
        "labels": [
          "CONFIDENTIAL",
          "FRAGILE"
        ],
        "locations": [
          "SHELF A",
          "GROUND FLOOR"
        ],
        "shipping_method": null
      }
    ]
  }
]
package tracking application

© 2021 PackageX, Inc. All rights reserved.