Returns

Code Samples for Returns: Java (.zip) | PHP (.zip) | C# (.zip)

Delete Open Return Template – SOAP

Summary

Name: Delete Open Return Template
Reason to Call: To delete an existing open return template.
Input: template-id
Output: None
Typical Next Call: Create Open Return Template
Version history: Release notes
Delete Open Return Template – Summary of Service

Delete Open Return Template – Summary of Service

Call Details

WSDL: openreturn.wsdl
Endpoint (Development): https://ct.soa-gw.canadapost.ca/rs/soap/return
Endpoint (Production): https://soa-gw.canadapost.ca/rs/soap/return
Namespace: http://www.canadapost.ca/ws/soap/return
Operation: DeleteOpenReturnTemplate

SOAP Body

This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.

Delete Open Return Template – Request Elements
Element Name Type Required / Optional Description

delete-open-return-template-request

complex

required

The top level element for the request.

mailed-by

simple

required

(1-10 digit numeric)

The 10-digit customer number of the mailed-by customer.

If the number provided has fewer than 10 digits, the system will add leading zeros.

mobo

simple

optional

(1-10 digit numeric)

The 10-digit customer number of the mailed-on-behalf-of customer.

If this element is missing, it will default to the mailed-by customer number.

If the number provided has fewer than 10 digits, the system will add leading zeros.

locale

simple

optional

Indicates your language preference for receiving error messages.

EN = English
FR = French

If no value is provided, the default language is English.

template-id

simple

required

The identifier of the previously created template that is to be deleted.

Request – XML Diagram

Delete Open Return Template – Structure of the XML Request

Delete Open Return Template – Structure of the XML Request

Response Details

Response – Elements

The following table describes the XML elements in the response to Delete Open Return Template. For the hierarchy of the response, see the XML diagram.

Delete Open Return Template – Response Elements
Element Name Type Description

delete-open-return-template-response

complex

The top level XML structure for the response.

It will either contain the results of a successful completion, or the error message structure.

delete-template-success

simple

{true, false}

A simple flag to indicate success of the Delete Open Return Template.

Response – XML Diagram

Delete Open Return Template – Structure of the XML Response

Delete Open Return Template – Structure of the XML Response

Response – Possible Error Responses

The response to error conditions for this web service follows the standard SOAP error response approach used for all Canada Post web services. For more information, see SOAP Fundamentals of Canada Post Web Services.

Examples

Sample SOAP XML Request – Delete Open Return Template

<delete-open-return-template-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<template-id>349641323786705649</template-id>
</delete-open-return-template-request>

Sample SOAP XML Response – Delete Open Return Template

<delete-open-return-template-response>
<delete-template-success>true</delete-template-success>
</delete-open-return-template-response>