---
title: "Execute location retrieval for a user equipment"
method: POST
path: "/location-retrieval/v0/retrieve"
tags: ["Location Retrieval v0.2.0"]
---

# Execute location retrieval for a user equipment

`POST /location-retrieval/v0/retrieve`

Retrieve the area where a certain user device is localized.

## Headers

- `x-rapidapi-host` string, required

## Request body

- object
  - `device` object, required — 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` NOTE: 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.
    - `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, optionally 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).
  - `maxAge` integer — Maximum age of the location information which is accepted for the location retrieval (in seconds)

## Response `200`

- object — Device location
  - `lastLocationTime` string, date-time, required — Last date and time when the device was localized. 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)
  - `area` object, required
    - `areaType` 'CIRCLE' | 'POLYGON', required — Type of this area. CIRCLE - The area is defined as a circle. POLYGON - The area is defined as a polygon.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `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)
