# Shop quote preview

`POST /quotes/{id}/preview` · Rivier · shop

The mail that sending the quote would produce, the PDF size and the checks that would stop it; nothing is sent.

- Scope: shop:write
- Mcp: rivier_quotes_preview
- Graphql: Mutation.shopQuotePreview
- Sdk: shop.quote.preview
- Cli: quotes preview

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "enum": [
        "email",
        "link"
      ],
      "default": "email"
    },
    "to": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "default": ""
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "maxItems": 5
    },
    "cc": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "default": ""
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "maxItems": 10
    },
    "subject": {
      "type": "string",
      "maxLength": 300
    },
    "message": {
      "type": "string",
      "maxLength": 5000
    },
    "attachPdf": {
      "type": "boolean",
      "default": true
    },
    "linkDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365,
      "default": 30
    },
    "validDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365,
      "default": 30
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/quotes/{id}/preview' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "channel": "email",
  "to": [
    {
      "email": "name@example.com"
    }
  ],
  "cc": [
    {
      "email": "name@example.com"
    }
  ],
  "subject": "string",
  "message": "string",
  "attachPdf": true,
  "linkDays": 30,
  "validDays": 30
}'
```
