Glossary Item Box

Government Gateway 2.2.0 (MR-01) ISV Developer Help (Doc Version 06/03/08) | Send comments on this topic.

# DELETE_REQUEST

# Message Source/Destination

Portal/Client application to Gateway

#

# Processing

This message should be sent by the client to the Gateway:

- To signify it has processed a Business response message it obtained (by polling) from the Gateway. If the DELETE_REQUEST message is not sent the Gateway will automatically delete the resources related to the CorrelationID within 60 days.
- To signify it has processed a Business Error response message it obtained (by polling) from the Gateway. If the DELETE_REQUEST message is not sent the Gateway will automatically delete the resources related to the CorrelationID within 30 days.

The CorrelationID specifies the message to be deleted from the Gateway. The Class must match the Class value that was obtained in the Business/Business Error response (or SUBMISSION_ERROR that returned the CorrelationID). When performing a DELETE_REQUEST the Gateway checks if the given Class matches that stored in the Gateway for that particular correlationID – if no match is found an error will be returned.

In response to the DELETE_REQUEST message, the Gateway can return either a DELETE_RESPONSE or a SUBMISSION_ERROR message. If the client receives a SUBMISSION_ERROR message it must process any standard errors in the normal way and then reissue the DELETE_REQUEST message. If the error indicates the CorrelationID cannot be found (typically error code 2000) then the client can cease sending the DELETE_REQUEST message.

Note: If the client issues a DELETE_REQUEST message before a Business/Business Error response or SUBMISSION_RESPONSE has been returned from the Gateway the resources associated with the transaction on the Gateway will be removed. This will not prevent the original submission from being sent to the back-end system – there are no associated recall semantics. If the client issues this request the implication is that the client no longer wishes to progress the submission via the Gateway and will reconcile the transaction through some other means.

# Message Structure

GovTalkMessage | MANDATORY. A default namespace specified as “http://www.govtalk.gov.uk/CM/envelope”.
EnvelopeVersion | MANDATORY. Set to 2.0, or to 1.0 for backward compatibility.
Header | MANDATORY.
MessageDetails | MANDATORY.
Class | MANDATORY. Identifies the class of XML document to be deleted from Gateway.
Qualifier | MANDATORY. Set to request.
Function | MANDATORY. Set to delete.
TransactionID | OPTIONAL. Must conform to the XSD pattern defined in the GovTalk envelope specification ([0-9A-F]{0,32}). It is recommended that it should be set to the value present in the SUBMISSION_RESPONSE. This value will be returned in the subsequent DELETE_RESPONSE.
CorrelationID | MANDATORY. Must be set to the value returned by the associated SUBMISSION_RESPONSE.
Transformation | MANDATORY. Set to XML.
GatewayTest | OPTIONAL. For live submissions, where element is present, it must be set to 0. For ISV Test Service, where element is present it must be set to 1.
GatewayTimestamp | OPTIONAL. Element should be empty.
SenderDetails | OPTIONAL. Element should be empty.
GovTalkDetails | MANDATORY.
Keys | MANDATORY. If Key elements are present they will be ignored.
Body | OPTIONAL. Element should be empty.

# Samples

The mandatory elements within the following sample delete request are shown in bold while optional elements appear in normal type.
<?xml version="1.0"?> <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope"> <EnvelopeVersion>2.0</EnvelopeVersion> <Header> <MessageDetails> <Class>MOSWTSC2</Class> <Qualifier>request</Qualifier> <Function>delete</Function> <CorrelationID>B07B9ED3176193DDC4EC39063848A927</CorrelationID> <Transformation>XML</Transformation> <GatewayTimestamp/> </MessageDetails> <SenderDetails/> </Header> <GovTalkDetails> <Keys/> </GovTalkDetails> <Body> </Body> </GovTalkMessage>

© Crown Copyright 2008. All rights reserved