Cancel a Work Order

HTTP Request

PUT /v1/work-orders/{ID}/cancel

Summary

This operation cancels a work order.

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/fulfillment/v1/work-orders/{ID}/cancel
Production: https://shipping-api.pitneybowes.com/shippingservices/fulfillment/v1/work-orders/{ID}/cancel

Path Parameter

Name

Description

ID


Required. The work order ID assigned by Pitney Bowes, as returned in the workOrderId field when the work order was created.

Request Headers

Name


Description

Authorization

Required. OAuth token generated using the Generate an OAuth Token API.

X-PB-TransactionId

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

Important: Ensure this is a unique ID.

Request Elements

Required fields are marked Required. All other fields are optional.

Name

Data Type

Description

clientId

String

Required. The client ID assigned by Pitney Bowes.

clientWorkOrderId

String

Required. The work order ID in the client’s system.

Maximum length: 35 characters

brand

String

The brand of the seller.

Maximum length: 30 characters

cancelReason

String

The reason for the cancellation.

Maximum length: 50 characters

cancelDate

String

The date and time the work order was cancelled in the client’s system, specified in the ISO 8601 format: YYYY-MM-DDThh:mm:ssZ

Response Elements

Name

Data Type

Description

clientId

String

The client ID assigned by Pitney Bowes.

clientWorkOrderId

String

The work order ID in the client’s system, up to 35 characters.

workOrderId

String

The work order ID assigned by Pitney Bowes.

brand

String

The brand of the seller, up to 30 characters.

cancelReason

String

The reason for the cancellation, up to 50 characters.

cancelDate

String

The date and time the work order was cancelled in the client’s system, specified in the ISO 8601 format: YYYY-MM-DDThh:mm:ssZ

pbCancelDate

String

The date and time the work order was cancelled in the Pitney Bowes system, specified in the ISO 8601 format: YYYY-MM-DDThh:mm:ssZ

Sample Request

curl -X PUT ".../v1/work-orders/{ID}/cancel" \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-TransactionId: <unique_identifier>" \
-d '
{
    "clientId": "1234",
    "clientWorkOrderId": "W-284238",
    "cancelDate": "2021-08-30T16:07:49Z"
}'

Sample Response

{
    "clientId": "1234",
    "clientWorkOrderId": "W-284238",
    "workOrderId": "WO1234A789117803242",
    "cancelDate": "2021-08-30T09:07:49Z",
    "pbCancelDate": "2021-08-30T09:07:49Z”
}

Error Codes

For lists of error codes returned by the Fulfillment APIs, please see 80-Prefix Error Codes (Fulfillment APIs).