Skip to main content
POST
/
measurement_locations
Post Measurement Locations
curl --request POST \
  --url https://api.sandbox.isometric.com/mrv/v0/measurement_locations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "latitude": 0,
  "longitude": 0,
  "project_id": "prj_1CTWZQGKE1S0VAXA",
  "supplier_reference_id": "<string>"
}
'
import requests

url = "https://api.sandbox.isometric.com/mrv/v0/measurement_locations"

payload = {
    "latitude": 0,
    "longitude": 0,
    "project_id": "prj_1CTWZQGKE1S0VAXA",
    "supplier_reference_id": "<string>"
}
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({
    latitude: 0,
    longitude: 0,
    project_id: 'prj_1CTWZQGKE1S0VAXA',
    supplier_reference_id: '<string>'
  })
};

fetch('https://api.sandbox.isometric.com/mrv/v0/measurement_locations', 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/measurement_locations",
  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([
    'latitude' => 0,
    'longitude' => 0,
    'project_id' => 'prj_1CTWZQGKE1S0VAXA',
    'supplier_reference_id' => '<string>'
  ]),
  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/measurement_locations"

	payload := strings.NewReader("{\n  \"latitude\": 0,\n  \"longitude\": 0,\n  \"project_id\": \"prj_1CTWZQGKE1S0VAXA\",\n  \"supplier_reference_id\": \"<string>\"\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/measurement_locations")
  .header("x-client-secret", "<x-client-secret>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"latitude\": 0,\n  \"longitude\": 0,\n  \"project_id\": \"prj_1CTWZQGKE1S0VAXA\",\n  \"supplier_reference_id\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.isometric.com/mrv/v0/measurement_locations")

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  \"latitude\": 0,\n  \"longitude\": 0,\n  \"project_id\": \"prj_1CTWZQGKE1S0VAXA\",\n  \"supplier_reference_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "mlc_1CCZASA6Q1S0V8T4",
  "latitude": 0,
  "longitude": 0,
  "supplier_reference_id": "<string>"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "ctx": {},
      "input": "<unknown>"
    }
  ]
}

Authorizations

Authorization
string
header
required

A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>

Headers

x-client-secret
string
required

A secret token identifying the client connecting to the API

Example:

"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"

Body

application/json
latitude
number
required
Required range: -90 <= x <= 90
longitude
number
required
Required range: -180 <= x <= 180
project_id
string
required
Required string length: 20 - 37
Examples:

"prj_1CTWZQGKE1S0VAXA"

"prj_1E0QTWB22SBX34D1"

supplier_reference_id
string
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200

Response

Successful Response

id
string
required
Required string length: 20 - 37
Examples:

"mlc_1CCZASA6Q1S0V8T4"

"mlc_1GF73PG90SBXKEX1"

latitude
number
required
Required range: -90 <= x <= 90
longitude
number
required
Required range: -180 <= x <= 180
supplier_reference_id
string | null
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200