# MOVE Last Location

Returns last known location of SDK user.  Context describes location source. At the moment 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, independent of user timeline (although device may need to switch location in order for app to be operational); \
  NOTE may be older than *timeline-end*, so please check timestamp

## Last location&#x20;

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

Returns a list of last location for every context

#### Query Parameters

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

{% 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/location/v1_5/{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 |
| -------------------------------------------- | ------ | ----------- |
| contractId<mark style="color:red;">\*</mark> | String |             |
| productId<mark style="color:red;">\*</mark>  | String |             |

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

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

{% endtab %}
{% endtabs %}
