API v0.0.11

Agricultural Intelligence API

Remote Sensing Verification for Prevented Planting Claims.

Submit GeoJSON feature collections, verify PP claims, and stream signed TALV PDF decisions.

Aerial agricultural field parcel monitored for prevented planting determination

RMA FCIC-25370 Integration Architecture

From Policy GeoJSON to Signed TALV Audit Dossier

A lightweight async API gateway designed for Approved Insurance Providers: fast edge validation, Cloud Tasks remote sensing orchestration, and deterministic JSON + PDF deliverables.

Live sg_live_... Sandbox sg_test_...
01

Submit & Validate FeatureCollection

POST /claims/pp enforces Turf.js geodesic acreage (≤ 2,000 ac), non-intersecting rings, canonical 50-state & RMA cause-of-loss enums, HTTPS photo URLs, and 24h Idempotency-Key replay.

02

Async TALV & Signed Webhooks

Returns 202 Accepted immediately while the satellite worker resolves Sentinel-2 NDVI/NDWI & PRISM telemetry, delivering X-SpectaGIS-Signature HMAC webhooks across 32 retries.

03

Poll Determination & Stream PDF

Fetch GET /claims/{claim_id} for eligible_acres & pass_p21_flag, stream the compiled FCIC-25370 PDF via /dossier.pdf, or trigger /second-crop compliance checks.

Quickstart Guide

Step-by-Step Getting Started

Integrate Prevented Planting claim verification in four concrete steps using the isolated sandbox environment before switching to live keys.

  1. Step 01

    Authenticate Requests with Bearer Key

    Pass your AIP API key in the Authorization header. Sandbox keys prefixed with sg_test_ isolate all writes to sandbox_* collections and trigger deterministic fixtures (POL-TEST-PASS, POL-TEST-PARTIAL, POL-TEST-FAIL).

    HTTP Headers
    Authorization: Bearer sg_test_demo
    Content-Type: application/geo+json
    Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
  2. Step 02

    Validate GeoJSON FeatureCollection & RMA Enums

    All submissions must use top-level FeatureCollection geometry (never a bare Feature) with closed polygons, non-crossing rings, ≤ 2,000 geodesic acres per field, valid 50-state values, and HTTPS photo URLs.

    Required Claim Properties
    {
      "type": "FeatureCollection",
      "properties": {
        "policyholder_name": "Prairie View Farms Inc.",
        "policy_number": "POL-TEST-PASS",
        "primary_cause_of_loss": "Excess Moisture",
        "loss_event_date": "2026-05-18"
      },
      "features": [ /* Polygon <= 2,000 ac + crop_type + state */ ]
    }
  3. Step 03

    Submit Claim & Receive 202 Accepted

    Post your FeatureCollection to /v1/claims/pp. The API validates topology and immediately enqueues an asynchronous Cloud Task returning your claim_id, queue status, and credit balance headers.

    cURL Example (Sandbox)
    curl -X POST https://sandbox.api.spectagis.com/v1/claims/pp   -H "Authorization: Bearer sg_test_demo"   -H "Content-Type: application/geo+json"   -H "Idempotency-Key: claim-demo-001"   -d @sample_field_story_county.geojson
  4. Step 04

    Webhook Delivery, TALV JSON & PDF Dossier

    Listen for HMAC-signed claim.analysis.completed webhooks (verify X-SpectaGIS-Signature) or poll GET /v1/claims/{claim_id}. When status is completed, download the signed audit dossier PDF.

    Poll Result & Stream PDF
    curl -H "Authorization: Bearer sg_test_demo"   https://sandbox.api.spectagis.com/v1/claims/clm_123456
    
    curl -H "Authorization: Bearer sg_test_demo" -o dossier.pdf   https://sandbox.api.spectagis.com/v1/claims/clm_123456/dossier.pdf

Pre-Submission Verification & Sample Data

Geospatial File Validator & Certified Samples

Test and validate your .geojson or .json FeatureCollection boundaries prior to submitting claims to POST /claims/pp. Inspect certified agricultural parcels or test edge cases in real time.

Pre-Submission File Validator GeoJSON RFC 7946 · Turf-Equivalent Topology & Acreage Checks

Supported: GeoJSON FeatureCollection (.geojson, .json) Max 2,000 Acres / Non-Crossing Rings

    Certified Samples & Edge-Case Fixtures

    Click to inspect in validator or download for API testing