List material containers
curl --request GET \
--url https://api.demo.cula.earth/tracking/v1/material-containers \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/material-containers"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/material-containers', 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.demo.cula.earth/tracking/v1/material-containers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/material-containers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.demo.cula.earth/tracking/v1/material-containers")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/material-containers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "mcn_01kqz4g5cjzvwsnnps6q7183q3",
"config_id": "mcnc_01k102qfrwthwk6dsggr9y8evn",
"config_version_id": "mcncv_01kxs8mt2y4711mz04rqs14t0a",
"status": "available",
"data_points": [
{
"config_id": "dptc_01jxdp05c8r7dp4xf89pxcw28q",
"config_version_id": "dptcv_01kfxe6xgmw15gsf204jwj90g5",
"name": "Weight gross",
"error": null,
"type": "short_text",
"value": "<string>",
"input_value": "<string>",
"result_value": "<string>"
}
]
}
],
"pagination": {
"starting_after": null,
"limit": 10,
"has_more": false,
"next_cursor": null
}
}{
"code": "bad_request",
"message": "The field limit must not be greater than 50."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "too_many_requests",
"message": "Too many requests. Try again after the time given in the Retry-After header."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Material Containers
List material containers
GET
/
material-containers
List material containers
curl --request GET \
--url https://api.demo.cula.earth/tracking/v1/material-containers \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/material-containers"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/material-containers', 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.demo.cula.earth/tracking/v1/material-containers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/material-containers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.demo.cula.earth/tracking/v1/material-containers")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/material-containers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "mcn_01kqz4g5cjzvwsnnps6q7183q3",
"config_id": "mcnc_01k102qfrwthwk6dsggr9y8evn",
"config_version_id": "mcncv_01kxs8mt2y4711mz04rqs14t0a",
"status": "available",
"data_points": [
{
"config_id": "dptc_01jxdp05c8r7dp4xf89pxcw28q",
"config_version_id": "dptcv_01kfxe6xgmw15gsf204jwj90g5",
"name": "Weight gross",
"error": null,
"type": "short_text",
"value": "<string>",
"input_value": "<string>",
"result_value": "<string>"
}
]
}
],
"pagination": {
"starting_after": null,
"limit": 10,
"has_more": false,
"next_cursor": null
}
}{
"code": "bad_request",
"message": "The field limit must not be greater than 50."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "too_many_requests",
"message": "Too many requests. Try again after the time given in the Retry-After header."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Authorizations
OAuth 2.0 client credentials. Exchange your client_id and client_secret for an access token scoped to the organisation that provides data access.
Headers
ID of the organisation the request operates on behalf of (e.g. org_...). Must be an organisation the API client has access to.
Example:
"org_01k83mfmhgchya944v86ryvhpq"
Query Parameters
Maximum number of items to return.
Required range:
1 <= x <= 50Filter by the site currently holding the container.
Filter by container status. Whether the container is available as an input to further tracking steps, consumed by one, or deactivated.
Available options:
available, consumed, deactivated Cursor representing the item ID after which to start listing results.
Was this page helpful?