Skip to content

Quickstart

Use cart validation as the first integration proof. It exercises authentication, jurisdiction lookup, product matching, and the response shape your checkout needs.

Terminal window
curl https://api.cordite.dev/v1/carts/validate \
-H "Authorization: Bearer ck_test_..." \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"id": "pmag-30",
"quantity": 1,
"product": {
"category": "magazine",
"attributes": { "capacity": 30 }
}
}
],
"destination": { "zip": "90210" }
}'

The API returns an order verdict, per-item verdicts, any blocking restrictions, and any compliance steps the vendor must complete before fulfillment.

{
"can_fulfill": false,
"order_verdict": "prohibited",
"items": [
{
"id": "pmag-30",
"verdict": "prohibited",
"restrictions": [
{
"id": "CA-MAG-CAP-001",
"category": "magazine_capacity",
"description": "Prohibits sale, import, manufacture, and possession of magazines capable of accepting more than 10 rounds",
"source_law": "CA Penal Code 32310",
"source_bill": "SB 23 (1999), Proposition 63 (2016)",
"restriction_type": "prohibited",
"effective_date": "2000-01-01"
}
],
"compliance_steps": [
{
"kind": "prohibited",
"description": "This product cannot be sold, shipped to, or possessed in California",
"required": true,
"action": "block_sale"
}
],
"suggestion": {
"type": "alternative_product",
"message": "Consider offering a 10-round variant for this jurisdiction"
}
}
],
"blocked": [
{
"id": "pmag-30",
"reason": "Prohibits sale, import, manufacture, and possession of magazines capable of accepting more than 10 rounds",
"suggestion": "Consider offering a 10-round variant for this jurisdiction"
}
],
"action_required": [],
"request_id": "req_..."
}

For local integration testing, follow Run locally and use http://127.0.0.1:3000 as the API base URL.