Cancel a Pickup

HTTP Request

POST /v1/pickups/{pickupId}/cancel

Summary

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

Consideration

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

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/pickups/{pickupId}/cancel
Production: https://shipping-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.

Accept-Language

Language and country code. Default: en-US

X-PB-TransactionId

Required. A unique identifier for the transaction, up to 25 characters. The following characters are allowed: letters, numbers, hyphens (-), and underscores (_).

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 Body

Pass an empty object as the request body.

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 '
{ }'

Sample Response

{
    "status": "Success"
}

Error Codes

For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.