Skip to content

API reference/address

Read the account's shipping policy

GET/api/v1/address/policy

authentication
Secret API key as a bearer token
billing
Free.

The rules behind ok_to_ship on every address lookup this account runs: the signals that block, the risk-score ceiling, and whether a register must have confirmed the building. The policy belongs to the account, so every member reads and changes the same one. An address that cannot stand as written is always blocked whatever the policy says.

Example request

curl https://spaw.co/api/v1/address/policy \
  -H "Authorization: Bearer sk_live_…"
const response = await fetch('https://spaw.co/api/v1/address/policy', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk_live_…',
  },
});
const result = await response.json();
import requests

response = requests.get(
    'https://spaw.co/api/v1/address/policy',
    headers={'Authorization': 'Bearer sk_live_…'},
)
result = response.json()
$ch = curl_init('https://spaw.co/api/v1/address/policy');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_…'],
]);
$result = json_decode(curl_exec($ch), true);
from spaw import Client

client = Client('sk_live_…')
result = client.get_address_policy()
import Spaw from 'spaw';

const spaw = new Spaw({ apiKey: 'sk_live_…' });
const result = await spaw.getAddressPolicy();
use Spaw\Client;

$spaw = new Client('sk_live_…');
$result = $spaw->getAddressPolicy();

This endpoint has no console on its page. It answers with records from your own account, often by an id only you have, rather than about a value you can type here. The dashboard lists the same rows.

Responses

200The policy in force.

{
    "success": true,
    "data": {
        "max_risk_score": 60,
        "block_signals": [
            "undeliverable",
            "placeholder",
            "vacant"
        ],
        "require_exists": false,
        "is_default": true,
        "updated_at": null
    }
}

Error codes

Failures answer { success: false, error: { code, message, request_id } }. Each code has its own page.

markdown version·openapi.json