Cancel a Pickup

HTTP Request

POST /v1/pickups/{pickupId}/cancel

Summary

This API call allows a merchant to cancel a previously scheduled package pickup.

Things to Consider

  • The cancellation must be submitted before 3:00 AM EST on the day the pickup is scheduled.

Request URIs

Sandbox: https://api-sandbox.pitneybowes.com/shippingservices/v1/pickups/{pickupId}/cancel
Production: https://api.pitneybowes.com/shippingservices/v1/pickups/{pickupId}/cancel

Path Parameters

Name Description
pickupId Required. The value of the pickupId, as returned by the Schedule Pickup API call.

Request Headers

Name Description
Authorization Required. OAuth token generated using the Generate an OAuth Token API.
Content-Type Required. The media type of the request entity. Set this to application/json.
X-PB-TransactionId

Required. A unique identifier for the transaction, up to 25 characters.

Important: You must ensure this is a unique id.

X-PB-UnifiedErrorStructure
Recommended. Set this to true to use the standard error object if an error occurs.

Request Element

Name Data Type Description
status String Required. Set this to: Success

Response Element

Name Data Type Description
status String The cancellation has succeeded if this returns the following value:Success

Sample Request

curl -X POST .../v1/pickups/USPSS10L6F5Y08XE/cancel \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-H "X-PB-UnifiedErrorStructure: true" \
-d '
{
    "status": "Success"
}'

Sample Response

{
    "status": "Success"
}

Error Codes

For a list of all PB Complete Shipping APIs error codes, see Error Codes.