# Query Products for Location

Check the available products for a given location using the location's UPRN.
The seller will then respond with a list of one or multiple available products (if any) along with information about the need for an appointment (yes/no/maybe).
For more information on products see [the reference](#products)
Some products such as auxiliary services could depend on other products (this is indicated via the dependsOn property).
For example ResVOIP1 can depend on CPEInst1, meaning if ResVOIP1 is ordered then CPEInst1 needs to be requested as well.

Endpoint: POST /queryProductsForLocation
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

  - `location` (object, required)

  - `location.addressKey` (string, required)
    Unique identifier of the address (UPRN)
    Example: 200004753569

## 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

  - `queryProductsForLocationAccepted` (object, required)

  - `queryProductsForLocationAccepted.locations` (array, required)
    An array of locations.

  - `queryProductsForLocationAccepted.locations.location` (object)

  - `queryProductsForLocationAccepted.locations.location.addressKey` (string, required)
    Unique identifier of the address (UPRN)
    Example: 200004753569

  - `queryProductsForLocationAccepted.locations.location.addressKeyType` (any, required)

  - `queryProductsForLocationAccepted.locations.location.addressKeyType.temporaryAddressKey` (null)

  - `queryProductsForLocationAccepted.locations.location.addressKeyType.recognisedAddressKey` (null)

  - `queryProductsForLocationAccepted.locations.location.availableProducts` (array, required)
    An array of products.

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct` (any)

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.productName` (string, required)
    The name of the product available for a given location
    Example: ftthl2r

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.appointmentRequired` (any, required)

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:nnis` (array)
    Service reference for Interconnect of ENNI
    Example: ["S123456","S123654"]

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:isComplexOrder` (null)
    Presence indicates that the product availability supports or requires a complex installation process.

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:distance` (integer)
    Distance in meters to the nearest network node
    Example: 75

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:variant` (string)
    Network variant
    Example: METRO

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:installationStatus` (string)
    Installation Status
    Example: GREEN

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:nniDetails` (object)
    NNIs that can be used to order the associated product.

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:nniDetails.cfh:nni` (array)

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:availableTerms` (object)
    Available terms that the associated product can be ordered with.

  - `queryProductsForLocationAccepted.locations.location.availableProducts.availableProduct.cfh:availableTerms.cfh:availableTerm` (array)

  - `queryAddressSearchRejected` (any, required)

  - `queryAddressSearchRejected.systemError` (object)

  - `queryAddressSearchRejected.systemError.errorCode` (string)
    Error Code
    Example: CF-123-123

  - `queryAddressSearchRejected.systemError.errorMessage` (string)
    Error Message
    Example: Some failure

  - `queryAddressSearchRejected.validationFailures` (array)

  - `queryAddressSearchRejected.validationFailures.validationFailure` (object)

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

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

  - `queryAddressSearchRejected.errorOther` (object)

  - `queryAddressSearchRejected.errorOther.errorCode` (string, required)
    Error Code
    Example: CF-123-123

  - `queryAddressSearchRejected.errorOther.errorMessage` (string, required)
    Error Message
    Example: Some failure

## 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)

