Pickup

Cancel Pickup Request – REST

Summary

Name: Cancel Pickup Request
Reason to Call:

To cancel an existing pickup request

Important: To modify a pickup request, ensure you use the Update Pickup Request web service. If you accidentally cancel an on-demand pickup request at your default business address, you will not be able to recreate another request in that same timeslot again.

Input: Request ID
Output: Success flag
Typical Prior Call: Get Pickup Requests
Version history: Release notes
Cancel Pickup Request – Summary of Service

Cancel Pickup Request – Summary of Service

Request Details

Request – Structure for Cancel Pickup Request

Endpoint

Invoke the link returned from a prior call to Get Pickup Requests where rel= “self” (see Provided endpoints)

HTTP Headers

HTTP Header Variable

Value

Accept

application/vnd.cpc.pickuprequest+xml (Note: */* in place of the header value will return an error)

Authorization

Basic {Base64 encoding of userid:password}

Accept-language

en-CA or fr-CA

Body

None

Request – Elements

The Cancel Pickup Request service does not require any input XML data. See the XML diagram.

Request – XML Diagram

Cancel Pickup Request – Structure of the XML Request
Cancel Pickup Request – Structure of the XML Request

Response Details

Response – Elements

The Cancel Pickup Request service does not respond with any XML data, but a successful operation is indicated through an HTTP response code of 204. A 400 series HTTP response code indicates an error.

Response – Possible Error Responses

You will receive a 404 error if the request-id is not valid (for example, if the pickup request has been cancelled).

Possible error messages for this service may include the following:

Code Description

11004

Pickup cannot be cancelled as time has already past.

See also HTTP status codes and Error messages and mitigation strategies.

Examples

Sample REST XML Request – Cancel Pickup Request

DELETE https://ENV/enab/001102159/pickuprequest/0074698052
Accept  application/vnd.cpc.pickuprequest+xml
Authorization:Basic s7HD7gwsennesc==

Sample REST XML Response – Cancel Pickup Request

The service does not respond with any XML elements (unless an error occurs in which case the standard error response is provided).

XML Response – Sandbox (Development) Environment

The response is stubbed (static) in the development environment; you will always receive a successful response if you use one of the test request-ids (00110215 or 0074698052), and an error otherwise.