> 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.

# Test Provider Connection

POST https://api.etera.dev/experience/booking/providers/{restaurantId}/test/{providerType}
Content-Type: application/json


        **🧪 Provider Connection Testing**

        Test the connection and functionality of a specific booking provider for a restaurant. This endpoint helps diagnose issues and verify provider configurations.

        ## 🔍 **Test Types**

        ### **Connection Test**
        - Basic connectivity to provider API
        - Network latency and response time
        - SSL certificate validation

        ### **Authentication Test**
        - API key or credential validation
        - Permission level verification
        - Rate limit status check

        ### **Availability Test**
        - Query availability endpoints
        - Data format validation
        - Response time measurement

        ### **Booking Test**
        - Complete booking flow simulation
        - End-to-end functionality test
        - Error handling verification

        ## 🎯 **Use Cases**

        - **Troubleshooting**: Diagnose provider connection issues
        - **Setup Validation**: Verify new provider configurations
        - **Performance Testing**: Measure provider response times
        - **Maintenance**: Regular health checks and monitoring

        ## 📊 **Test Results**

        Each test provides detailed results including pass/fail status, performance metrics, and specific diagnostic information.
      

Reference: https://docs.etera.dev/experience/booking/experience-booking-api/providers/post-providers-by-restaurant-id-test-by-provider-type

## Authentication

- `Authorization` header (bearer token, required) — JWT token from @etera-ai/auth package (auth.etera.dev) - Format: Bearer \<token>

## Servers

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

## Request

### Path parameters

- `restaurantId` (string, required) — Restaurant identifier
- `providerType` (ProvidersRestaurantIdTestProviderTypePostParametersProviderType, required) — Provider type to test

### Body (application/json)

This endpoint expects an object.

- `testType` (ProvidersRestaurantIdTestProviderTypePostRequestBodyContentApplicationJsonSchemaTestType, optional) — Type of test to perform
- `timeout` (double, optional, default: 10000) — Test timeout in milliseconds

## Response

### 200

Provider test completed

- `success` (boolean, optional)
- `restaurantId` (string, optional)
- `providerType` (string, optional)
- `testResult` (ProvidersRestaurantIdTestProviderTypePostResponsesContentApplicationJsonSchemaTestResult, optional)
- `recommendations` (list of string, optional)

## Types

### ProvidersRestaurantIdTestProviderTypePostRequestBodyContentApplicationJsonSchemaTestType

Type of test to perform

- "connection"
- "authentication"
- "availability"
- "booking"

### ProvidersRestaurantIdTestProviderTypePostParametersProviderType

- "opentable"
- "vapi"
- "tablecheck"

### ProvidersRestaurantIdTestProviderTypePostResponsesContentApplicationJsonSchemaTestResult

- `provider` (string, optional)
- `testType` (string, optional)
- `passed` (boolean, optional)
- `responseTime` (double, optional)
- `details` (ProvidersRestaurantIdTestProviderTypePostResponsesContentApplicationJsonSchemaTestResultDetails, optional)
- `executionTime` (double, optional)
- `timestamp` (datetime, optional)

### ProvidersRestaurantIdTestProviderTypePostResponsesContentApplicationJsonSchemaTestResultDetails

- `connectionEstablished` (boolean, optional)
- `authenticationValid` (boolean, optional)
- `endpointAccessible` (boolean, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "success": true,
  "restaurantId": "rest_abc123",
  "providerType": "opentable",
  "testResult": {
    "provider": "opentable",
    "testType": "connection",
    "passed": true,
    "responseTime": 450,
    "details": {
      "connectionEstablished": true,
      "authenticationValid": true,
      "endpointAccessible": true
    },
    "executionTime": 234,
    "timestamp": "2024-01-15T09:30:00Z"
  },
  "recommendations": [
    "Provider is operational and ready for bookings"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/experience/booking/providers/rest_abc123/test/opentable")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.post("https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.etera.dev/experience/booking/providers/rest_abc123/test/opentable")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```