Skip to content

Carrier facilities

Request

This operation locates Post Offices and other facilities for a given carrier. You can use this operation, for example, to locate all USPS Post Offices near a given postal code.

Security
bearerAuth
Bodyapplication/jsonrequired
addressobject(FacilityAddress)required

Address details used as the reference point for the facility search or returned as part of a carrier facility suggestion.

carrierstringrequired

The carrier for which to locate facilities. This operation currently supports searching for USPS facilities.

Example:"USPS"
carrierFacilityOptionsArray of objects(CarrierFacilityOptions)

Filters the types of facilities returned. Each object in the array is a name-value pair that specifies a carrier facility option. Each object contains a name field (the option) and a value field (the option value). Both fields take strings.

Example:
[ { "name": "FACILITY_TYPE", "value": "POST_OFFICE" }, { "name": "FACILITY_TYPE_SERVICE", "value": "LABEL_BROKER_RETAIL" }, { "name": "FACILITY_WITHIN_RADIUS", "value": "10" }, { "name": "NUMBER_OF_FACILITIES", "value": "1" } ]
curl -i -X POST \
  https://api-dev.sendpro360.pitneycloud.com/shipping/api/v1/carrier-facility \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": {
      "addressLine1": "24182 Kathy Ave",
      "addressLine2": "near abc street",
      "addressLine3": "near xyz street",
      "company": "Pitney Bowes Inc.",
      "email": "testuser@gmail.com",
      "phone": "6502530000",
      "cityTown": "Lake Forest",
      "stateProvince": "CA",
      "postalCode": "92630",
      "countryCode": "US"
    },
    "carrier": "USPS",
    "carrierFacilityOptions": [
      {
        "name": "FACILITY_TYPE",
        "value": "POST_OFFICE"
      },
      {
        "name": "FACILITY_TYPE_SERVICE",
        "value": "LABEL_BROKER_RETAIL"
      },
      {
        "name": "FACILITY_WITHIN_RADIUS",
        "value": "10"
      },
      {
        "name": "NUMBER_OF_FACILITIES",
        "value": "1"
      }
    ]
  }'

Responses

Facilities available at the specified location have been fetched successfully.

Bodyapplication/json
addressobject(FacilityAddress)

Address details used as the reference point for the facility search or returned as part of a carrier facility suggestion.

carrierstring

The carrier used for the facility lookup.

Example:"USPS"
carrierFacilityOptionsArray of objects(CarrierFacilityOptions)

Filters the types of facilities returned. Each object in the array is a name-value pair that specifies a carrier facility option. Each object contains a name field (the option) and a value field (the option value). Both fields take strings.

carrierFacilitySuggestionsArray of objects(CarrierFacilitySuggestion)

List of facilities that match the search criteria

Response
{ "address": { "addressLine1": "24182 Kathy Ave", "cityTown": "Lake Forest", "company": "Pitney Bowes Inc.", "countryCode": "US", "email": "Kathryn@email.com", "phone": "6502530000", "postalCode": "92630", "residential": false, "stateProvince": "CA" }, "carrier": "USPS", "carrierFacilityOptions": [ { "name": "FACILITY_TYPE", "value": "POST_OFFICE" }, { "name": "FACILITY_TYPE_SERVICE", "value": "LABEL_BROKER_RETAIL" }, { "name": "FACILITY_WITHIN_RADIUS", "value": "10" }, { "name": "NUMBER_OF_FACILITIES", "value": "1" } ], "carrierFacilitySuggestions": [ { "address": {}, "facilityHours": [], "facilityParking": "LOT" } ] }