# Widgets

## Zenchef Booking Widget (query param)

> Returns an embeddable JavaScript widget that adds a Zenchef restaurant booking button to a webpage.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> \
> The widget displays a floating booking button that opens a Zenchef booking iframe modal,\
> along with a WhatsApp contact button. Embed using a \`\<script src="...">\` tag.\
> \
> Phone number can be provided via the phone query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/zenchef-widget":{"get":{"summary":"Zenchef Booking Widget (query param)","description":"Returns an embeddable JavaScript widget that adds a Zenchef restaurant booking button to a webpage.\n\nThis endpoint is **public** — no authentication required.\n\nThe widget displays a floating booking button that opens a Zenchef booking iframe modal,\nalong with a WhatsApp contact button. Embed using a `<script src=\"...\">` tag.\n\nPhone number can be provided via the phone query parameter.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Zenchef restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"},"description":"Widget button position on the page"},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"},"description":"Text to display on the booking button"},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#a47e1f"},"description":"Primary color for the widget (hex code)"}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string","description":"Self-executing JavaScript function that injects the booking widget"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Zenchef Booking Widget (phone in path)

> Returns an embeddable JavaScript widget with phone number provided via the URL path.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> Embed using a \`\<script src="/v1/zenchef-widget/33612345678?restaurantId=123456">\` tag.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/zenchef-widget/{phone}":{"get":{"summary":"Zenchef Booking Widget (phone in path)","description":"Returns an embeddable JavaScript widget with phone number provided via the URL path.\n\nThis endpoint is **public** — no authentication required.\nEmbed using a `<script src=\"/v1/zenchef-widget/33612345678?restaurantId=123456\">` tag.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Zenchef restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"},"description":"Widget button position on the page"},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"},"description":"Text to display on the booking button"},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#a47e1f"},"description":"Primary color for the widget (hex code)"}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Zenchef Booking Widget (phone + pre-filled message)

> Returns an embeddable JavaScript widget with phone number and pre-filled WhatsApp message in the URL path.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> The message path segment is passed as a pre-filled WhatsApp message when the user clicks the WhatsApp button.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/zenchef-widget/{phone}/{message}":{"get":{"summary":"Zenchef Booking Widget (phone + pre-filled message)","description":"Returns an embeddable JavaScript widget with phone number and pre-filled WhatsApp message in the URL path.\n\nThis endpoint is **public** — no authentication required.\nThe message path segment is passed as a pre-filled WhatsApp message when the user clicks the WhatsApp button.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"message","in":"path","required":true,"schema":{"type":"string"},"description":"Pre-filled WhatsApp message text"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Zenchef restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"}},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"}},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#a47e1f"}}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Formitable Booking Widget (query param)

> Returns an embeddable JavaScript widget that adds a Formitable restaurant booking button to a webpage.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> \
> The widget displays a floating booking button that opens a Formitable booking iframe modal,\
> along with a WhatsApp contact button. Embed using a \`\<script src="...">\` tag.\
> \
> Phone number can be provided via the phone query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/formitable-widget":{"get":{"summary":"Formitable Booking Widget (query param)","description":"Returns an embeddable JavaScript widget that adds a Formitable restaurant booking button to a webpage.\n\nThis endpoint is **public** — no authentication required.\n\nThe widget displays a floating booking button that opens a Formitable booking iframe modal,\nalong with a WhatsApp contact button. Embed using a `<script src=\"...\">` tag.\n\nPhone number can be provided via the phone query parameter.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Formitable restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"},"description":"Widget button position on the page"},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"},"description":"Text to display on the booking button"},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#FF3800"},"description":"Primary color for the widget (hex code). Default is Formitable orange."}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string","description":"Self-executing JavaScript function that injects the booking widget"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Formitable Booking Widget (phone in path)

> Returns an embeddable JavaScript widget with phone number provided via the URL path.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> Embed using a \`\<script src="/v1/formitable-widget/33612345678?restaurantId=abc123">\` tag.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/formitable-widget/{phone}":{"get":{"summary":"Formitable Booking Widget (phone in path)","description":"Returns an embeddable JavaScript widget with phone number provided via the URL path.\n\nThis endpoint is **public** — no authentication required.\nEmbed using a `<script src=\"/v1/formitable-widget/33612345678?restaurantId=abc123\">` tag.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Formitable restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"},"description":"Widget button position on the page"},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"},"description":"Text to display on the booking button"},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#FF3800"},"description":"Primary color for the widget (hex code)"}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Formitable Booking Widget (phone + pre-filled message)

> Returns an embeddable JavaScript widget with phone number and pre-filled WhatsApp message in the URL path.\
> \
> This endpoint is \*\*public\*\* — no authentication required.\
> The message path segment is passed as a pre-filled WhatsApp message when the user clicks the WhatsApp button.<br>

```json
{"openapi":"3.1.0","info":{"title":"DM Champ API","version":"1.0.0"},"servers":[{"url":"https://api.dmchamp.com/v1","description":"Production API Server"}],"security":[{"ApiKeyAuth":[]},{"UserIdAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apiKey","description":"Your DM Champ API key. Obtain from Settings → API Keys."},"UserIdAuth":{"type":"apiKey","in":"query","name":"userId","description":"Your DM Champ User ID. Alternative to apiKey authentication. Cannot be used for agency-only endpoints."}}},"paths":{"/formitable-widget/{phone}/{message}":{"get":{"summary":"Formitable Booking Widget (phone + pre-filled message)","description":"Returns an embeddable JavaScript widget with phone number and pre-filled WhatsApp message in the URL path.\n\nThis endpoint is **public** — no authentication required.\nThe message path segment is passed as a pre-filled WhatsApp message when the user clicks the WhatsApp button.\n","tags":["Widgets"],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string"},"description":"WhatsApp phone number (digits only, no + or spaces)"},{"name":"message","in":"path","required":true,"schema":{"type":"string"},"description":"Pre-filled WhatsApp message text"},{"name":"restaurantId","in":"query","required":true,"schema":{"type":"string"},"description":"Formitable restaurant ID for booking widget"},{"name":"position","in":"query","required":false,"schema":{"type":"string","enum":["header","footer"],"default":"footer"}},{"name":"buttonText","in":"query","required":false,"schema":{"type":"string","default":"Book a Table"}},{"name":"primaryColor","in":"query","required":false,"schema":{"type":"string","default":"#FF3800"}}],"responses":{"200":{"description":"JavaScript widget code","content":{"application/javascript":{"schema":{"type":"string"}}}},"400":{"description":"Missing required parameters","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```
