> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/api-reference/api-reference-pt-br/api-de-localizacao/sim-location/locate-a-sim.md).

# Locate a SIM

Interrogates the network for current location information. If the device is offline, or the current location is not available, returns the last recorded value.

Identify the SIM using either `iccid` or `msisdn`.

**Optional fields**

Send `null` without quotes for any object you do not want to set. The value remains as previously set. To set a new value, replace `null` with the value in quotes. To remove an existing value, send an empty string.

```json
{"openapi":"3.1.0","info":{"title":"Location API","version":"1.0"},"tags":[{"name":"SIM location"}],"servers":[{"url":"https://location.eseye.com","description":"Production"}],"security":[{"sessionCookie":[]}],"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"PHPSESSID","description":"The session cookie established when the user logs in. Sent as\n`Cookie: PHPSESSID=<CookieNumber>`.\n\nThe Location API username and password are sent separately, in the request\nbody of each call.\n"}},"schemas":{"LocateDeviceRequest":{"allOf":[{"$ref":"#/components/schemas/Credentials"},{"type":"object","properties":{"request_id":{"type":"string","description":"A request identifier for tracking responses."},"iccid":{"type":"string","description":"The unique Integrated Circuit Card Identifier of the SIM you want to\nlocate. Use either this parameter or `msisdn`.\n"},"msisdn":{"type":"string","description":"The unique primary SIM phone number (Mobile Station International ISDN\nNumber) of the SIM you want to locate. Use either this parameter or\n`iccid`.\n"}},"anyOf":[{"required":["iccid"]},{"required":["msisdn"]}]}]},"Credentials":{"type":"object","properties":{"username":{"type":"string","description":"The Eseye-assigned Location API username."},"password":{"type":"string","format":"password","description":"The Eseye-assigned Location API password."}},"required":["username","password"]},"LocateDeviceResponse":{"type":"object","properties":{"iccid":{"type":"string","description":"The unique Integrated Circuit Card Identifier for the located SIM."},"msisdn":{"type":"string","description":"The unique primary SIM phone number (Mobile Station International ISDN\nNumber).\n"},"lat":{"type":"number","format":"double","description":"Latitude value of the last cell mast that the SIM used."},"lon":{"type":"number","format":"double","description":"Longitude value of the last cell mast that the SIM used."},"countryname":{"type":"string","description":"The last recorded country the SIM was in."},"countrycode":{"type":"string","description":"The ISO 3166 Alpha-2 code of the last recorded country the SIM was in.\n"},"timezone":{"type":"string","description":"The TZ database name of the last recorded time zone the SIM was in.\n"},"status":{"$ref":"#/components/schemas/Status"},"request_id":{"type":"string","description":"The returned request identifier, for tracking responses."}}},"Status":{"type":"object","description":"Details about the request status.","properties":{"status":{"type":"string","description":"`OK` when the request processed successfully, `ERR` when the request failed.\n","enum":["OK","ERR"]},"errorCode":{"type":"string","description":"Empty when the request processed successfully. Otherwise the specific error\ncode.\n"},"errorMessage":{"type":"string","description":"Empty when the request processed successfully. Otherwise an explanation of\nthe error.\n"}}}}},"paths":{"/index/locatedevice":{"post":{"operationId":"locateDevice","tags":["SIM location"],"summary":"Locate a SIM","description":"Interrogates the network for current location information. If the device is\noffline, or the current location is not available, returns the last recorded\nvalue.\n\nIdentify the SIM using either `iccid` or `msisdn`.\n\n**Optional fields**\n\nSend `null` without quotes for any object you do not want to set. The value\nremains as previously set. To set a new value, replace `null` with the value in\nquotes. To remove an existing value, send an empty string.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateDeviceRequest"}}}},"responses":{"200":{"description":"The request was processed. Check `status.status` to determine whether the\nlookup succeeded.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateDeviceResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eseye.com/api-reference/api-reference-pt-br/api-de-localizacao/sim-location/locate-a-sim.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
