> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Rules

> Fetch document requirements for a given market and product itinerary.

## Method

`POST` `/v1/verify/document-rules`

## Body Parameters

<ParamField name="marketId" type="string" required>Market identifier (e.g. `market_eu`).</ParamField>
<ParamField name="productCountries" type="string[]">ISO country codes for the product itinerary.</ParamField>
<ParamField name="productId" type="uuid">Product ID. When provided, the API derives countries from the product if <code>productCountries</code> is omitted.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/verify/document-rules \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "marketId": "market_eu",
      "productCountries": ["RO", "BG"]
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/verify/document-rules", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      marketId: "market_eu",
      productId: "d0a6b9c0-5e4f-4f29-93c9-5f55bd6d2a20",
    }),
  })
  const requirements = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "marketId": "market_us",
    "productCountries": ["US"],
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/verify/document-rules",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  rules = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "requirements": [
      {
        "id": "6f9f1848-72d9-46f4-9e63-2f92f3736c55",
        "appliesTo": { "travellerType": "adult" },
        "documentType": { "code": "passport" },
        "requireFields": ["number", "issueDate", "expiryDate"],
        "label": "Passport",
        "description": "Collect valid passport details for adult travellers"
      },
      {
        "id": "9507f64a-1d0b-4013-9d5b-89794c3dcb30",
        "appliesTo": { "travellerType": "child" },
        "documentType": { "code": "birth_certificate" },
        "requireFields": ["number"],
        "label": null,
        "description": null
      }
    ]
  }
  ```

  ```json 400 Bad Request theme={null}
  { "error": "Invalid request" }
  ```
</ResponseExample>

<Tip>Rules are filtered by effective date and country conditions. Send both market and itinerary details to ensure travellers see accurate document requirements during checkout.</Tip>
