---
title: "Verify the location of a device"
method: POST
path: "/location-verification/v1/verify"
tags: ["Location Verification v1.0.0"]
---

# Verify the location of a device

`POST /location-verification/v1/verify`

Verify whether the location of a device is within a requested area. The operation returns a verification result and, optionally, a match rate estimation for the location verification in percent.

## Headers

- `x-correlator` string
- `x-rapidapi-host` string, required

## Request body

- object — Request to verify the location of a device. Device is not required when using a 3-legged access token, following the rules in the description.
  - `device` object — End-user equipment able to connect to a mobile network. Examples of devices include smartphones or IoT sensors/actuators. The developer can choose to provide the below specified device identifiers: * `ipv4Address` * `ipv6Address` * `phoneNumber` * `networkAccessIdentifier` NOTE1: the MNO might support only a subset of these options. The API invoker can provide multiple identifiers to be compatible across different MNOs. In this case the identifiers MUST belong to the same device NOTE2: for the Commonalities release v0.4, we are enforcing that the networkAccessIdentifier is only part of the schema for future-proofing, and CAMARA does not currently allow its use. After the CAMARA meta-release work is concluded and the relevant issues are resolved, its use will need to be explicitly documented in the guidelines.
    - `phoneNumber` string — A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'.
    - `networkAccessIdentifier` string — A public identifier addressing a subscription in a mobile network. In 3GPP terminology, it corresponds to the GPSI formatted with the External Identifier ({Local Identifier}@{Domain Identifier}). Unlike the telephone number, the network access identifier is not subjected to portability ruling in force, and is individually managed by each operator.
    - `ipv4Address` union — The device should be identified by either the public (observed) IP address and port as seen by the application server, or the private (local) and any public (observed) IP addresses in use by the device (this information can be obtained by various means, for example from some DNS servers). If the allocated and observed IP addresses are the same (i.e. NAT is not in use) then the same address should be specified for both publicAddress and privateAddress. If NAT64 is in use, the device should be identified by its publicAddress and publicPort, or separately by its allocated IPv6 address (field ipv6Address of the Device object) In all cases, publicAddress must be specified, along with at least one of either privateAddress or publicPort, dependent upon which is known. In general, mobile devices cannot be identified by their public IPv4 address alone.
      - object
        - `publicAddress` string, ipv4, required — A single IPv4 address with no subnet mask
        - `privateAddress` string, ipv4, required — A single IPv4 address with no subnet mask
        - `publicPort` integer — TCP or UDP port number
      - object
        - `publicAddress` string, ipv4, required — A single IPv4 address with no subnet mask
        - `privateAddress` string, ipv4 — A single IPv4 address with no subnet mask
        - `publicPort` integer, required — TCP or UDP port number
    - `ipv6Address` string, ipv6 — The device should be identified by the observed IPv6 address, or by any single IPv6 address from within the subnet allocated to the device (e.g. adding ::0 to the /64 prefix).
  - `area` object, required — Base schema for all areas
    - `areaType` 'CIRCLE', required — Type of this area. CIRCLE - The area is defined as a circle.
  - `maxAge` integer — The maximum age (in seconds) for the location known by the implementation, which is accepted for the verification. Absence of maxAge means "any age" and maxAge=0 means a fresh calculation.

## Response `200`

- object — Response to a location verification request
  - `lastLocationTime` string, date-time — Timestamp of the last location information. It must follow RFC 3339 and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z)
  - `verificationResult` 'TRUE' | 'FALSE' | 'UNKNOWN' | 'PARTIAL', required — Result of a verification request: - `TRUE`: when the network locates the device within the requested area, - `FALSE`: when the requested area does not match the area where the network locates the device, - `UNKNOWN`: when the network cannot locate the device, - `PARTIAL`: when the requested area partially match the area where the network locates the device. A `match_rate` is included in the response.
  - `matchRate` integer — Estimation of the match rate between the area in the request (R), and area where the network locates the device (N), calculated as the percent value of the intersection of both areas divided by the network area, that is (R ∩ N) / N * 100. Included only if VerificationResult is PARTIAL.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `422`
- `429`
- `500`
- `503`

---

[API](https://skmtc.dev/nokia/apis/network-as-code.md) · [All operations](https://skmtc.dev/nokia/apis/network-as-code/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nokia/network-as-code/revisions/fdd5f5a56b88/schema)
