# Cancel an Order

Request to cancel an in flight order

The ALA Provider can either respond that the cancellation is pending or reject it up front.

Endpoint: POST /cancelOrder
Version: 2.31
Security: Certificate

## Request fields (application/xml):

  - `message` (object, required)
    The meta-data of the request. It includes information regarding the message UUID, transaction ID and the sent timestamp

  - `message.messageId` (string, required)
    A unique ID to identify the message
    Example: b68b2cf4-475e-11e1-a92e-fb2ff6467c99

  - `message.correlationId` (string, required)
    A Correlation ID, also known as a Transit ID, is a unique identifier value that is attached to requests and messages that allow reference to a particular transaction or event chain
    Example: bac72cfa-475e-11e1-a92e-fb2ff6467c99

  - `message.sentAt` (string, required)
    The timestamp when the message has been sent
    Example: 2012-01-20T18:30:43Z

  - `buyer` (object, required)
    The Service Provider who consumes the service is the buyer

  - `buyer.buyerIdentifier` (string, required)
    Unique identifier of the buyer
    Example: SPDEV1

  - `buyer.cfh:resellerId` (string)
    Unique identifier of the reseller. Sourced from the Ofcom Reseller Identification List
    Example: BAQ

  - `seller` (object, required)
    the Active Network Operator who provides the service is the seller

  - `seller.sellerIdentifier` (string, required)
    Unique identifier of the seller
    Example: CITYFIBRE

  - `orderReferences` (object, required)
    Reference for the order for this buyer

  - `orderReferences.buyerOrderReference` (string, required)
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `targetSellerOrderReference` (string, required)

  - `cancellationReason` (object, required)

  - `cancellationReason.cancellationReasonCode` (string, required)
    Example: 300

  - `cancellationReason.cancellationReasonMessage` (string, required)
    Cancellation reason message
    Example: No longer needed

## Response 200 fields (application/xml):

  - `message` (object, required)
    The meta-data of the request. It includes information regarding the message UUID, transaction ID and the sent timestamp

  - `message.messageId` (string, required)
    A unique ID to identify the message
    Example: b68b2cf4-475e-11e1-a92e-fb2ff6467c99

  - `message.correlationId` (string, required)
    A Correlation ID, also known as a Transit ID, is a unique identifier value that is attached to requests and messages that allow reference to a particular transaction or event chain
    Example: bac72cfa-475e-11e1-a92e-fb2ff6467c99

  - `message.sentAt` (string, required)
    The timestamp when the message has been sent
    Example: 2012-01-20T18:30:43Z

  - `buyer` (object, required)
    The Service Provider who consumes the service is the buyer

  - `buyer.buyerIdentifier` (string, required)
    Unique identifier of the buyer
    Example: SPDEV1

  - `buyer.cfh:resellerId` (string)
    Unique identifier of the reseller. Sourced from the Ofcom Reseller Identification List
    Example: BAQ

  - `seller` (object, required)
    the Active Network Operator who provides the service is the seller

  - `seller.sellerIdentifier` (string, required)
    Unique identifier of the seller
    Example: CITYFIBRE

  - `orderReferences` (object, required)
    Reference for the order for this buyer

  - `orderReferences.buyerOrderReference` (string, required)
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `orderReferences.sellerOrderReference` (string)
    Example: PROD00000001

  - `cancellationPending` (null, required)

  - `cancellationRejected` (any, required)

  - `cancellationRejected.cancellationError` (any, required)

  - `cancellationRejected.cancellationError.tooLateToCancel` (null)

  - `cancellationRejected.cancellationError.invalidOrderReference` (null)

  - `cancellationRejected.cancellationError.cfh:unauthorized` (null)

  - `cancellationRejected.cancellationError.invalidBuyer` (null)

  - `cancellationRejected.cancellationError.orderCompletedOrFailed` (null)

  - `cancellationRejected.validationFailures` (array, required)

  - `cancellationRejected.validationFailures.validationFailure` (object)

  - `cancellationRejected.validationFailures.validationFailure.validationFailureField` (string, required)
    Validation Failure Field
    Example: postcode

  - `cancellationRejected.validationFailures.validationFailure.validationFailureMessage` (string, required)
    Validation Failure message
    Example: Invalid Postcode

## Response 400 fields (application/xml):

  - `fault` (object)

  - `fault.faultcode` (string, required)

  - `fault.faultmessage` (string, required)

  - `fault.detail` (string)

## Response 401 fields (application/xml):

  - `fault` (object)

  - `fault.faultcode` (string, required)

  - `fault.faultmessage` (string, required)

  - `fault.detail` (string)

## Response 403 fields (application/xml):

  - `fault` (object)

  - `fault.faultcode` (string, required)

  - `fault.faultmessage` (string, required)

  - `fault.detail` (string)

