Post Site
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"name": "<string>",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>",
"additional_metadata": {},
"address": "123 Example Street, London",
"description": "<string>",
"geography": {
"latitude": 51.5074,
"longitude": -0.1278
},
"metadata": {},
"parent_site_ids": [
"ste_1G5775S5R1S0MGA9"
]
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites"
payload = {
"name": "<string>",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>",
"additional_metadata": {},
"address": "123 Example Street, London",
"description": "<string>",
"geography": {
"latitude": 51.5074,
"longitude": -0.1278
},
"metadata": {},
"parent_site_ids": ["ste_1G5775S5R1S0MGA9"]
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
site_type: 'enhanced_weathering_field',
supplier_reference_id: '<string>',
additional_metadata: {},
address: '123 Example Street, London',
description: '<string>',
geography: {latitude: 51.5074, longitude: -0.1278},
metadata: {},
parent_site_ids: ['ste_1G5775S5R1S0MGA9']
})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'site_type' => 'enhanced_weathering_field',
'supplier_reference_id' => '<string>',
'additional_metadata' => [
],
'address' => '123 Example Street, London',
'description' => '<string>',
'geography' => [
'latitude' => 51.5074,
'longitude' => -0.1278
],
'metadata' => [
],
'parent_site_ids' => [
'ste_1G5775S5R1S0MGA9'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"additional_metadata": {},
"address": "123 Example Street, London",
"deprecation": {
"deprecated_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"description": "<string>",
"geography": {
"id": "ara_1G6J276GV1S0KJ7C",
"vertices": {}
},
"id": "ste_1G5775S5R1S0MGA9",
"metadata": {},
"name": "<string>",
"project_id": "prj_1CTWZQGKE1S0VAXA",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Sites
Post Site
Create a new site.
POST
/
projects
/
{project_id}
/
sites
Post Site
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"name": "<string>",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>",
"additional_metadata": {},
"address": "123 Example Street, London",
"description": "<string>",
"geography": {
"latitude": 51.5074,
"longitude": -0.1278
},
"metadata": {},
"parent_site_ids": [
"ste_1G5775S5R1S0MGA9"
]
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites"
payload = {
"name": "<string>",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>",
"additional_metadata": {},
"address": "123 Example Street, London",
"description": "<string>",
"geography": {
"latitude": 51.5074,
"longitude": -0.1278
},
"metadata": {},
"parent_site_ids": ["ste_1G5775S5R1S0MGA9"]
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
site_type: 'enhanced_weathering_field',
supplier_reference_id: '<string>',
additional_metadata: {},
address: '123 Example Street, London',
description: '<string>',
geography: {latitude: 51.5074, longitude: -0.1278},
metadata: {},
parent_site_ids: ['ste_1G5775S5R1S0MGA9']
})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'site_type' => 'enhanced_weathering_field',
'supplier_reference_id' => '<string>',
'additional_metadata' => [
],
'address' => '123 Example Street, London',
'description' => '<string>',
'geography' => [
'latitude' => 51.5074,
'longitude' => -0.1278
],
'metadata' => [
],
'parent_site_ids' => [
'ste_1G5775S5R1S0MGA9'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/projects/{project_id}/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"site_type\": \"enhanced_weathering_field\",\n \"supplier_reference_id\": \"<string>\",\n \"additional_metadata\": {},\n \"address\": \"123 Example Street, London\",\n \"description\": \"<string>\",\n \"geography\": {\n \"latitude\": 51.5074,\n \"longitude\": -0.1278\n },\n \"metadata\": {},\n \"parent_site_ids\": [\n \"ste_1G5775S5R1S0MGA9\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"additional_metadata": {},
"address": "123 Example Street, London",
"deprecation": {
"deprecated_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"description": "<string>",
"geography": {
"id": "ara_1G6J276GV1S0KJ7C",
"vertices": {}
},
"id": "ste_1G5775S5R1S0MGA9",
"metadata": {},
"name": "<string>",
"project_id": "prj_1CTWZQGKE1S0VAXA",
"site_type": "enhanced_weathering_field",
"supplier_reference_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Headers
Path Parameters
Body
application/json
Response
Successful Response
Was this page helpful?