# Create FX quote

Lock the FX rate for a specific currency pairing. For Account Payouts customers only.

Endpoint: POST /foreignExchange/quote
Version: 1
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Header parameters:

  - `Accept` (string, required)

  - `WP-CorrelationId` (string)
    Optional ID to trace requests, if not provided, it is generated.

## Request fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `entity` (string, required)
    6-digit reference given to you by your Worldpay Implementation Manager during the onboarding process
    Example: 100001

  - `intent` (string, required)
    Transaction type (intention) for which rates should be retrieved.
    Enum: "PAYOUT", "FX DEAL", "MULTI-CURRENCY PRICING", "CONSUMER RATES", "PAYOUT LIVE RATE"

  - `sourceCurrency` (string, required)
    The debit currency.
    Example: USD

  - `targetCurrency` (string, required)
    The credit currency.
    Example: EUR

## Request examples:

  - `Create a new quote` (unknown)

## Response 200:

  - `200` (unknown)
    OK response if the request is valid

## Response 200 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `entity` (string)
    6-digit reference given to you by your Worldpay Implementation Manager during the onboarding process.
    Example: 100001

  - `intent` (string)
    Transaction type (intention) for which rates should be retrieved.
    Example: PAYOUT

  - `quote` (object)
    A collection of account statement items.

  - `quote.quoteId` (string)
    Unique quote id.
    Example: Q000000001

  - `quote.sourceCurrency` (string)
    The debit currency.
    Example: EUR

  - `quote.targetCurrency` (string)
    The credit currency.
    Example: GBP

  - `quote.rateId` (string)
    Unique rate id.
    Example: 12345678

  - `quote.rate` (string)
    Rate amount.
    Example: 1.2345

  - `quote.quoteExpiryTime` (string)
    Quote expiry time.
    Example: 2025-01-10T12:00:00.000Z

## Response 400:

  - `400` (unknown)
    BAD REQUEST response if the request is not valid

## Response 400 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `validationErrors` (array, required)
    Object containing details of validation errors occurred

  - `validationErrors.jsonPath` (string, required)
    Parameter for which the error occurred

  - `validationErrors.errorName` (string, required)
    Unique name of the validation error

  - `validationErrors.message` (string, required)
    Error description message

  - `errorName` (string, required)
    The unique error name

  - `message` (string, required)
    Error description message

## Response 401:

  - `401` (unknown)
    UNAUTHORIZED response if credentials are invalid

## Response 401 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `errorName` (string, required)
    The unique error name

  - `message` (string, required)
    Error description message

## Response 403:

  - `403` (unknown)
    FORBIDDEN response if Entitlements are not valid

## Response 403 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `errorName` (string, required)
    The unique error name

  - `message` (string, required)
    Error description message

## Response 404:

  - `404` (unknown)
    NOT FOUND response

## Response 404 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `errorName` (string, required)
    The unique error name

  - `message` (string, required)
    Error description message

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 500 fields (application/vnd.worldpay.foreignexchange-v1+json):

  - `errorName` (string, required)
    The unique error name

  - `message` (string, required)
    Error description message

## Response 400 examples:

  - `intent is not valid` (unknown)

  - `source currency is not valid` (unknown)

  - `target currency is not valid` (unknown)

## Response 401 examples:

  - `Unauthorized` (unknown)

## Response 403 examples:

  - `forbidden` (unknown)

## Response 404 examples:

  - `pageNotFound` (unknown)

