Proxy SettingsClient - Settings

Test Proxy Connection

Test the connectivity to the SII using the user's configured proxy.

POST /api/v1/settings/proxy/test
import requests
 
headers = {
    "X-API-Token": "sk_live_replace_with_your_token",
}
 
response = requests.post(
    "https://api.fiscalbridge.cl/api/v1/settings/proxy/test",
    headers=headers,
)
response.raise_for_status()
print(response.json())

Test the connectivity to the SII using the user's configured proxy.

Performs a connection test that:

  1. Retrieves the user's current proxy configuration
  2. Attempts to connect to the SII through the configured proxy
  3. Measures connection latency
  4. Verifies SII is accessible

The test result is stored for future reference and the proxy health status is updated in the user's configuration.

Authentication: Required (any authenticated user)

Rate Limiting: Not rate-limited (but should be used sparingly)

Test Process:

  • For centralized mode: Tests connection through ChileVenta's proxy pool
  • For individual mode: Tests connection through user's configured proxy

Example Response (Success):

{
    "success": true,
    "data": {
        "success": true,
        "latency_ms": 245,
        "error": null,
        "sii_accessible": true
    }
}

Example Response (Failure):

{
    "success": true,
    "data": {
        "success": false,
        "latency_ms": null,
        "error": "Connection timeout after 30 seconds",
        "sii_accessible": false
    }
}

Respuestas

200Successful Response

Forma de la respuesta

Código 200. Estructura del JSON devuelto.

{
  "data": {
    "circuit_breaker_state": "closed",
    "latency_ms": 150,
    "sii_accessible": true,
    "success": true
  },
  "message": "string",
  "success": true
}

On this page