> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smartsend.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List agents within a geospatial area.

> List carrier agents in country limited by a geospatial area.



## OpenAPI

````yaml /openapi-v1.json get /v1/website/{team}/agents/carrier/{carrier}/country/{country}/area/latitude/min/{minLatitude}/max/{maxLatitude}/longitude/min/{minLongitude}/max/{maxLongitude}
openapi: 3.0.0
info:
  title: Smart Send API
  description: >-
    This online documentation describes usage of the Smart Send api. We offer
    plugins for many webshop systems all consuming the API outlined in this
    documentation. Usage of the API require an active account for the Smart Send
    system and is subject to usage restrictions such as rate limit as described
    in the terms and conditions.
     *     Shopify plugin: https://www.smartsend.io/integrations/shopify
     *     WooCommerce plugin: https://www.smartsend.io/integrations/woocommerce
     *     PrestaShop plugin: https://www.smartsend.io/integrations/prestashop
     *     Magento plugin: https://www.smartsend.io/integrations/magento
  termsOfService: https://app.smartsend.io/terms-of-service/
  contact:
    name: Support
    url: https://app.smartsend.io/support/
    email: support@smartsend.io
  version: 1.0.1
servers:
  - url: https://app.smartsend.io/api/
    description: Production
security:
  - bearerAuth: []
    apiTokenQuery: []
tags:
  - name: Account
    description: Get account information
    externalDocs:
      description: Find out more
      url: https://smartsend.io/
  - name: Agents
    description: Get filtered lists of agents
    externalDocs:
      description: Find out more
      url: https://smartsend.io/agents
  - name: Closest Agents
    description: Find closest agents
    externalDocs:
      description: Find out more
      url: https://smartsend.io/agents
  - name: Shipments
    description: Everything about Shipments
    externalDocs:
      description: Find out more
      url: https://smartsend.io/shipments
  - name: Bookings
    description: Everything about Bookings
    externalDocs:
      description: Find out more
      url: https://smartsend.io/bookings
externalDocs:
  description: Find out more about Smart Send
  url: https://smartsend.io
paths:
  /v1/website/{team}/agents/carrier/{carrier}/country/{country}/area/latitude/min/{minLatitude}/max/{maxLatitude}/longitude/min/{minLongitude}/max/{maxLongitude}:
    get:
      tags:
        - Agents
      summary: List agents within a geospatial area.
      description: List carrier agents in country limited by a geospatial area.
      operationId: ListAgentsCarrierCountryGeoArea
      parameters:
        - $ref: '#/components/parameters/team'
        - $ref: '#/components/parameters/carrier'
        - $ref: '#/components/parameters/country'
        - name: minLatitude
          in: path
          description: The minimum latitude of the geospatial area
          required: true
          schema:
            type: number
          example: 55.64698120881716
        - name: maxLatitude
          in: path
          description: The maximum latitude of the geospatial area
          required: true
          schema:
            type: number
          example: 55.70887018918949
        - name: minLongitude
          in: path
          description: The minimum longitude of the geospatial area
          required: true
          schema:
            type: number
          example: 12.46642666088032
        - name: maxLongitude
          in: path
          description: The maximum longitude of the geospatial area
          required: true
          schema:
            type: number
          example: 12.64463856494562
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                properties:
                  data:
                    description: Data container
                    type: array
                    items:
                      $ref: '#/components/schemas/AgentResource'
                  meta:
                    $ref: '#/components/schemas/LegthAwarePaginationResource'
                type: object
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
components:
  parameters:
    team:
      name: team
      in: path
      description: The domain of the website making the agent lookup request
      required: true
      schema:
        type: string
      example: example.com
    carrier:
      name: carrier
      in: path
      description: The carrier code
      required: true
      schema:
        type: string
        enum:
          - postnord
          - gls
          - dao
          - bifrost
          - bring
      example: postnord
    country:
      name: country
      in: path
      description: ISO3166 Alpha2 country code
      required: true
      schema:
        type: string
        maxLength: 2
        minLength: 2
      example: DK
  schemas:
    AgentResource:
      description: Agent resource
      required:
        - id
        - agent_no
        - carrier
        - company
        - address_line1
        - postal_code
        - city
        - country
      properties:
        id:
          description: Unique ID
          type: string
          format: uuid
          example: c5540f2b-3eea-45c4-957a-9d7b53f899e7
        type:
          description: The resource type
          type: string
          enum:
            - agent
          example: agent
        agent_no:
          description: The carriers own number for the agent
          type: string
          example: '2134'
        carrier:
          description: The carrier code
          type: string
          example: postnord
        distance:
          description: The calculated distance to the agent in kilometers
          type: number
          minimum: 0
          example: 1.22
        company:
          description: The company name
          type: string
          example: Kiosk 88
        name_line1:
          description: The first name line
          type: string
          example: John
        name_line2:
          description: The second name line
          type: string
          example: Doe
        address_line1:
          description: The first address line
          type: string
          example: Nordre Frihavnsgade
        address_line2:
          description: The second address line
          type: string
          example: '88'
        postal_code:
          description: The postal code
          type: string
          example: '2100'
        city:
          description: The city
          type: string
          example: Copenhagen
        country:
          description: ISO3166 Alpha2 country code
          type: string
          example: DK
        coordinates:
          $ref: '#/components/schemas/CoordinatesResource'
        opening_hours:
          description: Opening hours
          type: array
          items:
            $ref: '#/components/schemas/OpeningHourResource'
      type: object
    LegthAwarePaginationResource:
      description: Legth Aware Pagination Resource
      required:
        - last_page
        - total
      allOf:
        - $ref: '#/components/schemas/PaginationResource'
        - properties:
            last_page:
              description: The last page
              type: integer
              example: '10'
            total:
              description: Total number of results
              type: integer
              example: '140'
          type: object
    CoordinatesResource:
      description: Coordinates resource
      required:
        - latitude
        - longitude
      properties:
        latitude:
          description: The GPS latitude
          type: number
          example: 55.702632904052734
        longitude:
          description: The GPS latitude
          type: number
          example: 12.58386516571045
      type: object
    OpeningHourResource:
      description: Opening Hour resource
      required:
        - day
        - opens
        - closes
      properties:
        day:
          description: The weekday
          type: string
          enum:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
            - sunday
        opens:
          description: >-
            The time in the format HH:MM:SS also known as partial-time accoridng
            to RFC 3339, section 5.6.
          type: string
          example: '07:30:00'
        closes:
          description: >-
            The time in the format HH:MM:SS also known as partial-time accoridng
            to RFC 3339, section 5.6.
          type: string
          example: '17:30:00'
      type: object
    PaginationResource:
      description: Pagination resource
      required:
        - current_page
        - from
        - path
        - per_page
        - to
      properties:
        current_page:
          description: The page of the current request
          type: integer
          example: '1'
        from:
          description: Results from number
          type: integer
          example: '1'
        path:
          description: >-
            Path of the api request used when modifying the pagination
            parameters
          type: string
          example: https://example.com/api/example
        per_page:
          description: The number of results per page
          type: integer
          example: '15'
        to:
          description: Results to number
          type: integer
          example: '15'
      type: object
    DetailedError:
      description: Detailed Error response
      required:
        - message
        - code
      allOf:
        - $ref: '#/components/schemas/Error'
        - properties:
            id:
              description: Unique ID of the error
              type: string
              example: ''
              nullable: true
            code:
              description: Code describing the type of error
              type: string
              example: ValidationException
            errors:
              description: >-
                Object with keys corresponding to the fields and each key
                containing an array of errors. OpenAPI does not allow for
                dynamic keys until version 3.1 is released
              type: object
            links:
              description: >-
                Object with dynamic keys, each with a URL string value. Dynamic
                keys are not part of OpenAPI until version 3.1 is released
              type: object
          type: object
    Error:
      description: Error response
      required:
        - message
      properties:
        message:
          description: Description of the message
          type: string
          example: Description of the error will be inserted here.
      type: object
  responses:
    '401':
      description: Unauthenticated request. Please provide correct authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DetailedError'
    '403':
      description: >-
        Forbidden request. User is authenticated but not authorized to perform
        the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DetailedError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Provide API Token as Bearer authentication
    apiTokenQuery:
      type: apiKey
      description: Query API Token
      name: api_token
      in: query

````