DTN

DTN Producer Search API

The Producer Search API from DTN — 3 operation(s) for producer search.

Operations 3

GET /api/v1/producer/search/radius Search producers by radius #
POST /api/v1/producers/channels Find producers within a GeoJSON polygon #
POST /api/v1/producers/match Match a producer by name/address/contact #

Documentation

📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-weather-conditions-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-observation-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-precipitation-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Other%20APIs/financial-market-data/documentation
📖
Documentation
https://devportal.dtn.com/catalog/WebSocket/agency-bulletin-websocket-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-agency-bulletin-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-alerting-API/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Other%20APIs/dtn-astronomical-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-climatology-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Other%20APIs/dtn-developer-portal-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-energy-event-index-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-enhanced-flight-hazards-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-lightning-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/WebSocket/dtn-lightning-websocket/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-metars-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-map-tile-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-marine-weather-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-notams-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-pireps-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/pavement-conditions-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-probabilistic-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Refined%20Fuels/dtn-refined-fuels-demand/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-renewables-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-sigmets-airmets/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Marine%20and%20Offshore/dtn-shipping-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Agriculture/dtn-soil-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-storm-impact-analytics/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-storm-risk-analytics-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-tafs-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/dtn-tropical-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/WebSocket/dtn-websocket-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Aviation/dtn-windsaloft-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Refined%20Fuels/digital-commerce-orders/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Refined%20Fuels/energy-digital-commerce-integrations-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Agriculture/farm-intel-api/documentation
📖
Documentation
https://devportal.dtn.com/catalog/Weather/radarscope-radar-products/documentation

Specifications

Other Resources

🔗
Reference
https://devportal.dtn.com/catalog/Weather/dtn-weather-conditions-api/documentation
🔗
Portal
https://devportal.dtn.com/
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-weather-conditions-api/postman-collection/2.2.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-weather-conditions-api/release-notes/2.2.0
🔗
Portal
https://api.weather.mg/
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-observation-api/postman-collection/2.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-observation-api/release-notes/2.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-precipitation-api/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/financial-market-data/postman-collection/1.0.2
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/agency-bulletin-websocket-api/release-notes/1.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-agency-bulletin-api/release-notes/2.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-astronomical-api/postman-collection/2.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-astronomical-api/release-notes/2.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-climatology-api/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-developer-portal-api/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-energy-event-index-api/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-enhanced-flight-hazards-api/postman-collection/1.10.2
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-enhanced-flight-hazards-api/release-notes/1.10.2
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-lightning-websocket/release-notes/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-metars-api/postman-collection/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-metars-api/release-notes/1.9.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-map-tile-api/postman-collection/2.0.16
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-map-tile-api/release-notes/2.0.16
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-marine-weather-api/postman-collection/1.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-marine-weather-api/release-notes/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-notams-api/postman-collection/1.10.1
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-notams-api/release-notes/1.10.1
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-pireps-api/postman-collection/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-pireps-api/release-notes/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/pavement-conditions-api/release-notes/2.0.2
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-probabilistic-api/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-renewables-api/postman-collection/1.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-renewables-api/release-notes/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-sigmets-airmets/postman-collection/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-sigmets-airmets/release-notes/1.9.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-soil-api/postman-collection/1.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-soil-api/release-notes/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-storm-impact-analytics/postman-collection/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-storm-risk-analytics-api/postman-collection/1.0.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-storm-risk-analytics-api/release-notes/1.0.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-tafs-api/postman-collection/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-tafs-api/release-notes/1.9.0
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-tropical-api/postman-collection/1.0.6
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-tropical-api/release-notes/1.0.6
🔗
Postman
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-windsaloft-api/postman-collection/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/dtn-windsaloft-api/release-notes/1.9.0
🔗
ReleaseNotes
https://dev-portal-api.prd.coreservices.zones.dtn.com/v1/apis/digital-commerce-orders/release-notes/1.0.0

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dtn-producer-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dtn-producer-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: DTN Farm Intelligence Producer Search API
  description: 'The Farm Intelligence API provides programmatic access to DTN''s agricultural data — producer records,

    land metadata, crop history, and related datasets. It is organized into three surfaces plus shared utilities:


    - **Producer API** — Producer discovery, details, and relationship data

    - **Land API** — Land search, metadata, crop history, soil, and geospatial data

    - **Linked Data API** — Segments, portfolios, and batch operations

    - **Shared Utilities** — Crop codes, geographic areas (unmetered)


    ## Authentication


    All endpoints require OAuth 2.0 client credentials authentication. Obtain a token from the DTN DAIS gateway

    with your client_id, client_secret, and the Farm Intelligence audience.


    ## Credit Metering


    Endpoints are classified as:

    - **Metered (1 credit per record)** — Producer and Land data endpoints

    - **Unmetered (discovery class)** — Search, codes, geographic areas


    Response headers include credit usage information:

    - `X-Credit-Cost` — Credits consumed by this request

    - `X-Credits-Remaining` — Remaining balance

    - `X-Credit-Pool-Reset` — Contract reset date'
  contact:
    name: DTN Agriculture Intelligence Team
    email: agintel@dtn.com
  x-logo:
    url: https://www.dtn.com/wp-content/uploads/2019/03/dtn-logo-tag.png
    altText: DTN
servers:
- description: Development
  url: https://api-farm-intelligence.dev.ag.zones.dtn.com
- description: Staging
  url: https://api-farm-intelligence.stg.ag.zones.dtn.com
- description: Production
  url: https://api-farm-intelligence.prd.ag.zones.dtn.com
security:
- clientCredentials: []
tags:
- name: Producer Search
paths:
  /api/v1/producer/search/radius:
    get:
      operationId: searchProducersByRadius
      summary: Search producers by radius
      description: 'Find producers whose registered address falls within a radius of a geographic point.

        Returns the full producer record for each match. Results are sorted by proximity.


        **Billing:** Metered — 1 credit per producer returned.

        '
      tags:
      - Producer Search
      parameters:
      - in: query
        name: lat
        required: true
        schema:
          type: number
          format: float
          example: 41.6
        description: Latitude of the center point (decimal degrees, WGS84).
      - in: query
        name: lon
        required: true
        schema:
          type: number
          format: float
          example: -93.6
        description: Longitude of the center point (decimal degrees, WGS84).
      - in: query
        name: radius
        required: true
        schema:
          type: number
          example: 16000
        description: Search radius in meters. Maximum approximately 16,093m (10 miles).
      - in: query
        name: limit
        required: false
        schema:
          type: integer
          default: 10
          minimum: 1
          maximum: 500
        description: Maximum number of results to return.
      - in: query
        name: offset
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
        description: Number of results to skip (for pagination).
      responses:
        '200':
          description: Producers found within the radius.
          headers:
            X-Credit-Cost:
              schema:
                type: integer
              description: Number of credits consumed by this request.
            X-Credits-Remaining:
              schema:
                type: integer
              description: Credits remaining in your account.
            X-Credit-Pool-Reset:
              schema:
                type: string
                format: date-time
              description: Contract reset date.
          content:
            application/json:
              schema:
                type: object
                properties:
                  producers:
                    type: array
                    items:
                      $ref: '#/components/schemas/Producer'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
              example:
                producers:
                - producerId: 5091294
                  firstName: John
                  lastName: Smith
                  companyName: Smith Farms LLC
                  address: 123 Farm Rd
                  city: Des Moines
                  state: IA
                  postalCode: 50316-2921
                  fipsCode: '19153'
                  county: Polk
                  lat: 41.601
                  lon: -93.609
                  locationAccuracy: Address was DPV confirmed for the primary number only, and secondary number information was missing.
                  role: operator
                  status: customer
                  externalID: CRM-12345
                  phones:
                  - 515-555-0100
                  emails:
                  - john@smithfarms.com
                - producerId: 8890647
                  firstName: Jane
                  lastName: Doe
                  companyName: null
                  address: 456 County Line Rd
                  city: Des Moines
                  state: IA
                  postalCode: 50316-3413
                  fipsCode: '19153'
                  county: Polk
                  lat: 41.598
                  lon: -93.612
                  locationAccuracy: Address was DPV confirmed for the primary number only, and secondary number information was missing.
                  role: owner-operator
                  status: prospect
                  externalID: null
                  phones: []
                  emails: []
                pagination:
                  total: 15
                  hasMore: true
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: bad-request
                title: Invalid Request
                status: 400
                detail: Validation failed.
                instance: urn:dtn:farm-intel-external-api:/api/v1/producer/search/radius:requestId:abc123
                errors:
                - message: Required query parameter lat is invalid or missing.
                  parameter: lat
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: unauthorized
                title: Error while authenticating the user
                status: 401
                detail: Bearer Token is malformed.
                instance: urn:dtn:farm-intel-external-api:requestId:example-id
        '429':
          description: Insufficient credits remaining.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: insufficient-credits
                title: Insufficient Credits
                status: 429
                detail: This request requires 15 producer credits, but only 10 remain.
  /api/v1/producers/channels:
    post:
      operationId: searchProducersByPolygon
      summary: Find producers within a GeoJSON polygon
      description: 'Find producers whose registered address falls within a GeoJSON polygon boundary.

        Accepts a GeoJSON Polygon geometry in the request body and returns matching producers.


        **Billing:** Metered — 1 credit per producer returned.

        '
      tags:
      - Producer Search
      parameters:
      - in: query
        name: limit
        required: false
        schema:
          type: integer
          default: 10
          minimum: 1
          maximum: 500
        description: Maximum number of results to return.
      - in: query
        name: offset
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
        description: Number of results to skip (for pagination).
      requestBody:
        required: true
        description: GeoJSON Polygon geometry defining the search area.
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              - coordinates
              properties:
                type:
                  type: string
                  enum:
                  - Polygon
                  description: Must be "Polygon".
                  example: Polygon
                coordinates:
                  type: array
                  items:
                    type: array
                    items:
                      type: array
                      items:
                        type: number
                      minItems: 2
                      maxItems: 2
                  description: 'Array of linear rings. The first ring is the exterior boundary.

                    Each position is [longitude, latitude] in WGS84.

                    '
            example:
              type: Polygon
              coordinates:
              - - - -93.7
                  - 41.5
                - - -93.5
                  - 41.5
                - - -93.5
                  - 41.7
                - - -93.7
                  - 41.7
                - - -93.7
                  - 41.5
      responses:
        '200':
          description: Producers found within the polygon.
          headers:
            X-Credit-Cost:
              schema:
                type: integer
              description: Number of credits consumed by this request.
            X-Credits-Remaining:
              schema:
                type: integer
              description: Credits remaining in your account.
            X-Credit-Pool-Reset:
              schema:
                type: string
                format: date-time
              description: Contract reset date.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        partyId:
                          type: integer
                          example: 5091294
                        firstName:
                          type:
                          - string
                          - 'null'
                          example: JOHN
                        middleName:
                          type:
                          - string
                          - 'null'
                        lastName:
                          type:
                          - string
                          - 'null'
                          example: SMITH
                        companyName:
                          type:
                          - string
                          - 'null'
                          example: SMITH FARMS LLC
                        addressLine:
                          type:
                          - string
                          - 'null'
                          example: 123 FARM RD
                        city:
                          type:
                          - string
                          - 'null'
                          example: DES MOINES
                        stateCode:
                          type:
                          - string
                          - 'null'
                          example: IA
                        postalCode:
                          type:
                          - string
                          - 'null'
                          example: '50316'
                        fipsCode:
                          type:
                          - string
                          - 'null'
                          example: '19153'
                        countyName:
                          type:
                          - string
                          - 'null'
                          example: POLK
                        lat:
                          type:
                          - number
                          - 'null'
                          example: 41.601
                        lon:
                          type:
                          - number
                          - 'null'
                          example: -93.609
                        email:
                          type:
                          - string
                          - 'null'
                        phoneNumber:
                          type:
                          - string
                          - 'null'
                        mobileNumber:
                          type:
                          - string
                          - 'null'
                        producerCode:
                          type:
                          - string
                          - 'null'
                        linkType:
                          type:
                          - string
                          - 'null'
                        personaDescription:
                          type:
                          - string
                          - 'null'
                  links:
                    type: object
                    properties:
                      next:
                        type:
                        - string
                        - 'null'
                      previous:
                        type:
                        - string
                        - 'null'
                  count:
                    type: integer
                    example: 15
              example:
                results:
                - partyId: 5091294
                  firstName: JOHN
                  lastName: SMITH
                  companyName: SMITH FARMS LLC
                  addressLine: 123 FARM RD
                  city: DES MOINES
                  stateCode: IA
                  postalCode: '50316'
                  fipsCode: '19153'
                  countyName: POLK
                  lat: 41.601
                  lon: -93.609
                  email: null
                  phoneNumber: '5155550100'
                  mobileNumber: null
                  producerCode: '1'
                  linkType: O
                links:
                  next: /api/v1/party/channels?limit=10&offset=10
                  previous: null
                count: 15
        '400':
          description: Invalid request body or parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: bad-request
                title: Invalid Request
                status: 400
                detail: Validation failed.
                instance: urn:dtn:farm-intel-external-api:/api/v1/producers/channels:requestId:abc123
                errors:
                - message: Request body must be a valid GeoJSON Polygon.
                  parameter: body
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: unauthorized
                title: Error while authenticating the user
                status: 401
                detail: Bearer Token is malformed.
                instance: urn:dtn:farm-intel-external-api:requestId:example-id
        '429':
          description: Insufficient credits remaining.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: insufficient-credits
                title: Insufficient Credits
                status: 429
                detail: This request requires 25 producer credits, but only 10 remain.
  /api/v1/producers/match:
    post:
      operationId: matchProducer
      summary: Match a producer by name/address/contact
      description: 'Match a producer record by providing partial identifying information (name, address,

        phone, or email). Returns the best-matching producer record if found. Useful for

        deduplication and CRM integration workflows.


        **Billing:** Metered — 1 credit per successful match.

        '
      tags:
      - Producer Search
      requestBody:
        required: true
        description: 'Match criteria. Either `firstName` or `companyName` (or both) must be provided.

          Additional fields improve match accuracy.

          '
        content:
          application/json:
            schema:
              type: object
              anyOf:
              - required:
                - firstName
              - required:
                - companyName
              properties:
                companyName:
                  type:
                  - string
                  - 'null'
                  description: Company or farm name to match.
                  example: Smith Farms LLC
                fullName:
                  type:
                  - string
                  - 'null'
                  description: Full name (alternative to firstName/lastName split).
                  example: John Smith
                firstName:
                  type:
                  - string
                  - 'null'
                  description: First name.
                  example: John
                middleInitial:
                  type:
                  - string
                  - 'null'
                  description: Middle initial.
                  example: A
                lastName:
                  type:
                  - string
                  - 'null'
                  description: Last name.
                  example: Smith
                nameSuffix:
                  type:
                  - string
                  - 'null'
                  description: Name suffix (Jr., Sr., III, etc.).
                  example: Jr.
                address:
                  type:
                  - string
                  - 'null'
                  description: Street address line 1.
                  example: 123 Farm Rd
                address2:
                  type:
                  - string
                  - 'null'
                  description: Street address line 2.
                  example: null
                city:
                  type:
                  - string
                  - 'null'
                  description: City name.
                  example: Des Moines
                stateCode:
                  type:
                  - string
                  - 'null'
                  description: Two-letter state code.
                  example: IA
                zipCode:
                  type:
                  - string
                  - 'null'
                  description: ZIP code.
                  example: '50316'
                phone:
                  type:
                  - string
                  - 'null'
                  description: Phone number.
                  example: 515-555-0100
                email:
                  type:
                  - string
                  - 'null'
                  description: Email address.
                  example: john@smithfarms.com
            example:
              firstName: John
              lastName: Smith
              stateCode: IA
              zipCode: '50316'
      responses:
        '200':
          description: Best matching producer found.
          headers:
            X-Credit-Cost:
              schema:
                type: integer
              description: Number of credits consumed by this request.
            X-Credits-Remaining:
              schema:
                type: integer
              description: Credits remaining in your account.
            X-Credit-Pool-Reset:
              schema:
                type: string
                format: date-time
              description: Contract reset date.
          content:
            application/json:
              schema:
                type: object
                properties:
                  partyId:
                    type: integer
                    description: Matched producer identifier.
                    example: 5091294
                  primaryContact:
                    type: boolean
                    description: Whether this is the primary contact for the party.
                    example: true
                  companyName:
                    type:
                    - string
                    - 'null'
                    example: Smith Farms LLC
                  firstName:
                    type:
                    - string
                    - 'null'
                    example: John
                  middleInitial:
                    type:
                    - string
                    - 'null'
                    example: A
                  lastName:
                    type:
                    - string
                    - 'null'
                    example: Smith
                  suffix:
                    type:
                    - string
                    - 'null'
                    example: Jr.
                  role:
                    type:
                    - string
                    - 'null'
                    description: Human-readable role description.
                    example: operator
              example:
                partyId: 5091294
                primaryContact: true
                companyName: Smith Farms LLC
                firstName: John
                middleInitial: A
                lastName: Smith
                suffix: null
                role: operator
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: bad-request
                title: Invalid Request
                status: 400
                detail: Validation failed.
                instance: urn:dtn:farm-intel-external-api:/api/v1/producers/match:requestId:abc123
                errors:
                - message: Either firstName or companyName must be provided.
                  parameter: body
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: unauthorized
                title: Error while authenticating the user
                status: 401
                detail: Bearer Token is malformed.
                instance: urn:dtn:farm-intel-external-api:requestId:example-id
        '429':
          description: Insufficient credits remaining.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: insufficient-credits
                title: Insufficient Credits
                status: 429
                detail: This request requires 1 producer credit, but only 0 remain.
components:
  schemas:
    Error:
      type: object
      description: RFC 7807 Problem Detail error response.
      properties:
        type:
          type: string
          description: Error type identifier.
          example: bad-request
        title:
          type: string
          description: Human-readable error title.
          example: Invalid Request
        status:
          type: integer
          description: HTTP status code.
          example: 400
        detail:
          type: string
          description: Human-readable error description.
          example: Validation failed.
        instance:
          type: string
          description: URI identifying the specific request that failed (includes request ID for tracing).
          example: urn:dtn:farm-intel-external-api:/api/v1/producer/search/radius:requestId:abc123
        errors:
          type: array
          description: Detailed validation errors (present for 400 responses).
          items:
            type: object
            properties:
              message:
                type: string
                description: Description of what's wrong.
                example: Required query parameter lat is invalid or missing.
              parameter:
                type: string
                description: The parameter that failed validation.
                example: lat
    Producer:
      type: object
      description: A producer record representing an agricultural entity (farmer, company, cooperative).
      properties:
        producerId:
          type: integer
          description: Unique identifier for the producer.
          example: 5091294
        firstName:
          type:
          - string
          - 'null'
          description: Producer's first name (null for company-only records).
          example: John
        lastName:
          type:
          - string
          - 'null'
          description: Producer's last name (null for company-only records).
          example: Smith
        companyName:
          type:
          - string
          - 'null'
          description: Company or farm name (null for individual-only records).
          example: Smith Farms LLC
        address:
          type:
          - string
          - 'null'
          description: Street address line.
          example: 123 Farm Rd
        city:
          type:
          - string
          - 'null'
          description: City name.
          example: Des Moines
        state:
          type:
          - string
          - 'null'
          description: Two-letter state code.
          example: IA
        postalCode:
          type:
          - string
          - 'null'
          description: ZIP code, optionally with +4 extension (e.g., "50316-2921").
          example: 50316-2921
        fipsCode:
          type:
          - string
          - 'null'
          description: 5-digit county FIPS code. Use /geographic-areas/counties to look up county names.
          example: '19153'
        county:
          type:
          - string
          - 'null'
          description: County name.
          example: Polk
        lat:
          type:
          - number
          - 'null'
          format: float
          description: Latitude of the producer's address (decimal degrees, WGS84).
          example: 41.601
        lon:
          type:
          - number
          - 'null'
          format: float
          description: Longitude of the producer's address (decimal degrees, WGS84).
          example: -93.609
        locationAccuracy:
          type:
          - string
          - 'null'
          description: 'Human-readable description of the geocoding accuracy for the lat/lon coordinates.

            Values include: "Address was DPV confirmed...", "PO Box", "Zip 5 Centroid",

            "Zip 7 Centroid", "Zip 9 Centroid", "Approximate", "Range Interpolation",

            "Geometric Center", "Intersection", "Failure".

            '
          example: Address was DPV confirmed for the primary number only, and secondary number information was missing.
        role:
          type:
          - string
          - 'null'
          description: 'Producer''s role/relationship to the land.

            Values: "operator", "owner-operator", "owner", "other"

            '
          enum:
          - operator
          - owner-operator
          - owner
          - other
          example: operator
        status:
          type:
          - string
          - 'null'
          description: 'Customer relationship status (if tracked).

            Values: "lead", "prospect", "customer", "former-customer", "other"

            '
          enum:
          - lead
          - prospect
          - customer
          - former-customer
          - other
          example: customer
        externalID:
          type:
          - string
          - 'null'
          description: Customer's external CRM/ERP identifier for this producer (if synced).
          example: CRM-12345
        phones:
          type: array
          items:
            type: string
          description: 'Up to 3 phone numbers, ordered by priority. Empty array if do-not-contact is flagged

            or no phone numbers are available.

            '
          example:
          - 515-555-0100
          - 515-555-0101
        emails:
          type: array
          items:
            type: string
          description: 'Up to 3 email addresses, ordered by priority. Empty array if do-not-contact is flagged

            or no emails are available.

            '
          example:
          - john@smithfarms.com
    Pagination:
      type: object
      description: Pagination metadata for list responses.
      properties:
        total:
          type: integer
          description: Total number of records matching the query (across all pages).
          example: 150
        hasMore:
          type: boolean
          description: Whether there are more results beyond the current page.
          example: true
  securitySchemes:
    clientCredentials:
      type: oauth2
      x-receive-token-in: request-body
      flows:
        clientCredentials:
          tokenUrl: https://api.auth.dtn.com/v1/tokens/authorize
      description: "# Using DAIS for M2M/API Auth\nYou have been given a Client ID and a Client Secret, which are used to request a DTN Access Token. DTN Access Tokens are required when making calls to each and every DTN API endpoint. The following information provides additional details on these tokens and how they are generated.\n## What is an Access Token and how is it different from an API Key?\nAn API Key is a random string of characters that an API uses to authorize whether or not a calling client has approved access to an endpoint. These keys are a non-standard approach to API authorization and are generally issued on a per-API basis.\n\nAn Access Token is also a string of characters but is a base-64 encoded JavaScript Object Notation Web Token, or JWT. JWTs are a widely accepted standard that use OAuth concepts and approaches. \n\nBoth API Keys and Access Tokens are used in an Authorization Request Header as a Bearer, meaning there is no difference in where you put this string of characters when you make calls to DTN APIs.\n## How to generate an Access Token?\nWhen requested, an Access Token is generated for your specific Client (ID/Secret) and for a specific API. The DTN Auth and Identity Service (DAIS) generates new Access Tokens for your client. The DAIS endpoint is `POST https://api.auth.dtn.com/v1/tokens/authorize`.\n\nThis endpoint takes two Header parameters:\n  * `Content-Type: application/json`\n  * `Accept: application/json`\n\nThis endpoint takes four parameters in the Request Body:\n  * `grant_type`: this should always be client_credentials for generating machine-to-machine tokens.\n  * `client_id`: this is the Client ID or Application ID using the token and is given to you by DTN's Identity Team. This ID will never change for your client/application.\n  * `client_secret`: this is the Client Secret that is associated with the Application ID and is given to you by DTN's Identity Team. This key is subject to rotation for security purposes but always with the client's knowledge.\n  * `audience`: this is the API for which this Access Token will be used. For the Farm Intel API, you need to use the following audience: https://api-farm-intelligence.dev.ag.zones.dtn.com\n\nYou can use this CURL command template as a reference for obtaining an access token:\n  ```\n  curl --location --request POST 'https://api.auth.dtn.com/v1/tokens/authorize' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"grant_type\": \"client_credentials\",\n\"client_id\": \"insert your client id here\",\n\"client_secret\": \"insert your client secret here\",\n\"audience\": \"insert your audience here\"\n}' \n  ```\n\n*This document, for demonstration purposes, supplies a client_id and client_secret in all code examples. This client/application is for a fictitious API and cann

# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/dtn/refs/heads/main/openapi/dtn-producer-search-api-openapi.yml