> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.etera.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.etera.dev/_mcp/server.

# Get Provider Priority Configuration

GET https://api.etera.dev/restaurant/booking/providers/{restaurantId}/priority


        **🎯 Provider Priority & Routing Configuration**

        Retrieve the current provider priority configuration for a restaurant, including fallback strategies, conditional routing, and provider-specific settings.

        ## 📋 **Configuration Elements**

        ### **Provider Priority**
        - **Priority Ranking**: 1 = highest priority, higher numbers = lower priority
        - **Enabled Status**: Whether each provider is active for this restaurant
        - **Fallback Mode**: Whether provider is used only as fallback or primary option
        - **Conditional Routing**: Time-based or situation-based provider selection

        ### **Routing Strategies**
        - **Priority**: Always try highest priority provider first
        - **Round Robin**: Distribute load evenly across providers
        - **Least Busy**: Route to provider with lowest current load
        - **Performance**: Choose based on recent success rates

        ## 🎯 **Use Cases**

        - **Load Balancing**: Distribute bookings across multiple providers
        - **Cost Optimization**: Prioritize cheaper providers when possible
        - **Reliability**: Ensure backup providers are available
        - **Performance Tuning**: Optimize based on provider response times
      

Reference: https://docs.etera.dev/restaurant/booking/restaurant-booking-api/providers/get-providers-by-restaurant-id-priority

## Servers

- `https://api.etera.dev/restaurant/booking` (Production, default)
- `https://api-stage.etera.dev/restaurant/booking` (Staging)
- `https://api-dev.etera.dev/restaurant/booking` (Development)

## Request

### Path parameters

- `restaurantId` (string, required) — Unique identifier for the restaurant

## Response

### 200

Priority configuration retrieved successfully

- `success` (boolean, optional)
- `restaurantId` (string, optional)
- `priorityConfig` (ProvidersRestaurantIdPriorityGetResponsesContentApplicationJsonSchemaPriorityConfig, optional)
- `lastUpdated` (datetime, optional)

## Types

### ProvidersRestaurantIdPriorityGetResponsesContentApplicationJsonSchemaPriorityConfig

- `restaurantId` (string, optional)
- `providers` (list of ProvidersRestaurantIdPriorityGetResponsesContentApplicationJsonSchemaPriorityConfigProvidersItems, optional)
- `defaultProvider` (string, optional)
- `fallbackStrategy` (enum, optional)
  - Allowed values: `priority`, `round_robin`, `least_busy`

### ProvidersRestaurantIdPriorityGetResponsesContentApplicationJsonSchemaPriorityConfigProvidersItems

- `type` (enum, optional)
  - Allowed values: `opentable`, `vapi`, `tablecheck`
- `priority` (double, optional)
- `enabled` (boolean, optional)
- `fallbackOnly` (boolean, optional)
- `timeSlots` (list of string, optional)
- `maxPartySize` (double, optional)

## Examples

**Response**

```json
{
  "success": true,
  "restaurantId": "rest_abc123",
  "priorityConfig": {
    "restaurantId": "rest_abc123",
    "providers": [
      {
        "type": "opentable",
        "priority": 1,
        "enabled": true,
        "fallbackOnly": false,
        "timeSlots": [
          "18:00-22:00"
        ],
        "maxPartySize": 12
      }
    ],
    "defaultProvider": "opentable",
    "fallbackStrategy": "priority"
  },
  "lastUpdated": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.etera.dev/restaurant/booking/providers/rest_abc123/priority")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```