Restore a deleted place at its former order. Identical retries are safe if a response is lost, while an ID that was reused with different details cannot overwrite the current place (#828, DESIGN §47).
POST
/api/v1/location/places/{id}/restore
const url = 'https://example.com/api/v1/location/places/example/restore';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"index":1,"latitude":1,"longitude":1,"name":"example","radius_m":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/location/places/example/restore \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "index": 1, "latitude": 1, "longitude": 1, "name": "example", "radius_m": 1 }'Route: /api/v1/location/places/{id}/restore. Inputs: id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Stable Saved place UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Exact Saved-place content and prior order sent by the Undo action (#828, DESIGN §47).
object
index
required
Previous zero-based place position. Concurrent additions clamp it to the end of the current list.
integer
latitude
required
number format: double
longitude
required
number format: double
name
required
string
radius_m
required
integer format: int32
Examplegenerated
{ "index": 1, "latitude": 1, "longitude": 1, "name": "example", "radius_m": 1}Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string
latitude
required
number format: double
longitude
required
number format: double
name
required
string
radius_m
required
integer format: int32
Examplegenerated
{ "id": "example", "latitude": 1, "longitude": 1, "name": "example", "radius_m": 1}Media typeapplication/json
object
id
required
string
latitude
required
number format: double
longitude
required
number format: double
name
required
string
radius_m
required
integer format: int32
Examplegenerated
{ "id": "example", "latitude": 1, "longitude": 1, "name": "example", "radius_m": 1}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}