> This page is for Developer.

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

# Validate Connection Options

POST https://your_app.example.com/check_connection_options
Content-Type: application/json

Validate connection options. BigCommerce sends a request to the shipping provider URL to check a merchantʼs connection credentials. The shipping provider sends a response indicating whether a merchant has valid credentials. 

> #### Note
> * Substitute the host and path specific to the shipping provider for `your_app.example.com` and `check_connection_options`.  
> * The Send a Test Request feature is not currently supported for this endpoint.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/integrations/shipping-provider/validate-connection-options

## Request

### Body (application/json)

This endpoint expects a CheckConnectionOptionsRequestPayload.

- `connection_options` (ConnectionOptionsInstance, required) — Any global request options declared by the carrier and configured by the merchant to retrieve rates. Optional.

## Response

### 200

Check connection options response.

- `valid` (boolean, optional) — Indicates whether or not the connection options are valid.
- `messages` (list of CheckConnectionOptionsResponsePayloadMessagesItems, optional)

## Types

### ConnectionOptionsInstance

Any global request options declared by the carrier and configured by the merchant to retrieve rates. Optional.

### CheckConnectionOptionsResponsePayloadMessagesItems

A simple string/type response for returning information.

- `text` (string, required)
- `type` (enum, required)
  - Allowed values: `INFO`, `WARNING`, `ERROR`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "valid": true,
  "messages": [
    {
      "text": "adipi",
      "type": "WARNING"
    },
    {
      "text": "nu",
      "type": "WARNING"
    },
    {
      "text": "an",
      "type": "INFO"
    }
  ]
}
```

**SDK Code**

```python response
import requests

url = "https://your_app.example.com/check_connection_options"

payload = {}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript response
const url = 'https://your_app.example.com/check_connection_options';
const options = {method: 'POST', headers: {'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 response
package main

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

func main() {

	url := "https://your_app.example.com/check_connection_options"

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

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

	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 response
require 'uri'
require 'net/http'

url = URI("https://your_app.example.com/check_connection_options")

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

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

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

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

HttpResponse<String> response = Unirest.post("https://your_app.example.com/check_connection_options")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your_app.example.com/check_connection_options', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp response
using RestSharp;

var client = new RestClient("https://your_app.example.com/check_connection_options");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://your_app.example.com/check_connection_options")! 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()
```