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

# Resolve Coordinates to Area

> Accepts lat/lng coordinates and returns the nearest internal area if within 2km, otherwise null.



## OpenAPI

````yaml /api-reference/schema.yaml post /resolve-coordinates/
openapi: 3.0.3
info:
  title: ''
  version: 0.0.0
servers:
  - url: https://api.parceltracer.com/v1/external/
    description: Parcel Tracer api endpoint
security: []
paths:
  /resolve-coordinates/:
    post:
      tags:
        - Areas
      summary: Resolve Coordinates to Area
      description: >-
        Accepts lat/lng coordinates and returns the nearest internal area if
        within 2km, otherwise null.
      operationId: resolve_coordinates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveCoordinatesRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ResolveCoordinatesRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ResolveCoordinatesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveCoordinatesResponse'
              examples:
                ResolvedArea:
                  value:
                    resolved_area:
                      id: 55
                      name_en: Balde
                      district: Akkar
                      distance_km: 1.3
                      lat: 34.56076
                      lng: 36.14491
                      delivery_fee_delta: null
                  summary: Nearest area within 2km
                NoMatch:
                  value:
                    resolved_area: null
                  summary: No area within 2km
          description: ''
      security:
        - MerchantAPIKey: []
components:
  schemas:
    ResolveCoordinatesRequest:
      type: object
      properties:
        lat:
          type: number
          format: double
        lng:
          type: number
          format: double
      required:
        - lat
        - lng
    ResolveCoordinatesResponse:
      type: object
      properties:
        resolved_area:
          allOf:
            - $ref: '#/components/schemas/ResolvedArea'
          nullable: true
      required:
        - resolved_area
    ResolvedArea:
      type: object
      properties:
        id:
          type: integer
        name_en:
          type: string
        district:
          type: string
        distance_km:
          type: number
          format: double
          description: Distance in km from the given coordinates to the area centre.
        lat:
          type: number
          format: double
          description: Latitude of the matched area.
        lng:
          type: number
          format: double
          description: Longitude of the matched area.
        delivery_fee_delta:
          type: string
          nullable: true
          description: >-
            Extra delivery fee (in USD) applied for this area by the merchant's
            delivery fee rules, or null if no rule applies.
      required:
        - delivery_fee_delta
        - distance_km
        - district
        - id
        - lat
        - lng
        - name_en
  securitySchemes:
    MerchantAPIKey:
      type: apiKey
      in: header
      name: X-Api-Key

````