Update part of the space's name, subtitle and type
const url = 'https://example.com/v1/example/data';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/example/data \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'A JSON Merge Patch of the space’s name, subtitle and type: fields left out are unchanged, and a field set to null is removed. The result must be a valid SpaceMetadata. Only name, subtitle and type can be given.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The project ID of the space
Request Bodyrequired
Section titled “Request Bodyrequired”A merge patch of SpaceMetadata
object
Example generated
{}Responses
Section titled “Responses”The updated space’s name, subtitle and type
A space’s name, subtitle, type, address and georeference.
object
The space’s name, shown to visitors as its heading.
object
The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.
The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.
Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.
object
A second line shown under the name.
object
The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.
The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.
Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.
object
What kind of space it is. Decides which built-in landmark categories are suggested to editors.
The space’s postal address.
object
The street address, without any unit or suite.
The unit or suite, if any.
The town or city.
The state, province or region, as an ISO 3166-2 code. Should be given wherever the country has them.
The country, as an ISO 3166-1 alpha-2 code.
The postal code.
Where the space is in the world. Needed to export the space in other formats, such as IMDF.
object
The WGS 84 latitude, in degrees, of the space’s origin [0, 0, 0].
The WGS 84 longitude, in degrees, of the space’s origin [0, 0, 0].
The compass bearing that the space’s -z axis points along, in degrees clockwise from true north. At 0, -z points north and +x points east.
The height of the space’s origin above the WGS 84 ellipsoid, in metres.
Example
{ "name": "Reception", "subtitle": "Reception", "type": "residential", "address": { "address": "1 Example Street", "unit": "Suite 400", "locality": "London", "province": "GB-ENG", "country": "GB", "postalCode": "SW1A 1AA" }, "georeference": { "latitude": 51.5072, "longitude": -0.1276, "heading": 90 }}The body is invalid. issues describes what was wrong.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The token is missing or invalid.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The token has no access to this space.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The body isn’t in a format this operation accepts.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Too many requests. Retry after Retry-After seconds.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Headers
Section titled “Headers”Seconds to wait before retrying
Something upstream failed.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The space is moving between servers. Retry after Retry-After seconds.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Headers
Section titled “Headers”Seconds to wait before retrying
Something upstream timed out.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}