> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/backend/move-backend/move-last-location-api.md).

# MOVE Last Location API

Returns the last known location of an SDK user.  The `context` describes the location source. At the moment the following contexts exist:

* TIMELINE-END: last timeline location
* CAR-END: last car trip location
* TRIP-POSITION: live updates during a trip
* USERPOS: user position - reported about once per day (if OS wakes up app at all), independent of user timeline; NOTE may be older than e.g. *timeline-end*, so please check timestamp
* TAG: Trip position can be tagged the context name is&#x20;

  ```
  TAG:TAG_NAME
  ```

## Last location&#x20;

<mark style="color:blue;">`GET`</mark> `https://sdk.dolph.in/v20/location`

Returns last position of each context

#### Query Parameters

| Name                                         | Type    | Description |
| -------------------------------------------- | ------- | ----------- |
| projectId <mark style="color:red;">\*</mark> | integer |             |
| userId<mark style="color:red;">\*</mark>     | String  |             |

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | **Basic \<ProjectId>:\<API-Key>** |

{% tabs %}
{% tab title="200: OK " %}

```json
[
  {
    "context": "string",
    "lat": 0,
    "lon": 0,
    "accuracy": 0,
    "timestamp": "2022-08-08T09:51:44.109Z"
  }
]
```

{% endtab %}
{% endtabs %}

## Last context location

<mark style="color:blue;">`GET`</mark> `https://sdk.dolph.in/v20/location/{context}`

Returns last location of specific context

#### Path Parameters

| Name                                      | Type   | Description                                   |
| ----------------------------------------- | ------ | --------------------------------------------- |
| context<mark style="color:red;">\*</mark> | String | timeline-end, car-end, userpos, trip-position |

#### Query Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| userId<mark style="color:red;">\*</mark>    | String |             |
| projectId<mark style="color:red;">\*</mark> | String |             |

#### Headers

| Name          | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| Authorization | String | **Basic \<ProjectId>:\<API-Key>** |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "context": "string",
  "lat": 0,
  "lon": 0,
  "accuracy": 0,
  "timestamp": "2022-08-08T09:37:46.648Z"
}
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.movesdk.com/move-platform/backend/move-backend/move-last-location-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
