Skip to main content
POST
/
feedstock_batches
Post Feedstock Batch
curl --request POST \
  --url https://api.sandbox.isometric.com/mrv/v0/feedstock_batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "delivery_date": "2023-12-25",
  "display_name": "<string>",
  "feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
  "mass": {
    "magnitude": 123,
    "unit": "<string>",
    "standard_deviation": 123
  },
  "supplier_reference_id": "<string>"
}
'
import requests

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

payload = {
"delivery_date": "2023-12-25",
"display_name": "<string>",
"feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
"mass": {
"magnitude": 123,
"unit": "<string>",
"standard_deviation": 123
},
"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({
delivery_date: '2023-12-25',
display_name: '<string>',
feedstock_type_id: 'ftt_1D7KZ1P761S0G7BN',
mass: {magnitude: 123, unit: '<string>', standard_deviation: 123},
supplier_reference_id: '<string>'
})
};

fetch('https://api.sandbox.isometric.com/mrv/v0/feedstock_batches', 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/feedstock_batches",
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([
'delivery_date' => '2023-12-25',
'display_name' => '<string>',
'feedstock_type_id' => 'ftt_1D7KZ1P761S0G7BN',
'mass' => [
'magnitude' => 123,
'unit' => '<string>',
'standard_deviation' => 123
],
'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/feedstock_batches"

payload := strings.NewReader("{\n \"delivery_date\": \"2023-12-25\",\n \"display_name\": \"<string>\",\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"mass\": {\n \"magnitude\": 123,\n \"unit\": \"<string>\",\n \"standard_deviation\": 123\n },\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/feedstock_batches")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_date\": \"2023-12-25\",\n \"display_name\": \"<string>\",\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"mass\": {\n \"magnitude\": 123,\n \"unit\": \"<string>\",\n \"standard_deviation\": 123\n },\n \"supplier_reference_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"delivery_date\": \"2023-12-25\",\n \"display_name\": \"<string>\",\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"mass\": {\n \"magnitude\": 123,\n \"unit\": \"<string>\",\n \"standard_deviation\": 123\n },\n \"supplier_reference_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2023-11-07T05:31:56Z",
  "delivery_date": "2023-12-25",
  "display_name": "<string>",
  "feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
  "id": "ftb_1DYYDB3C91S0ZHPX",
  "mass": {
    "magnitude": 123,
    "unit": "<string>",
    "standard_deviation": 123
  },
  "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
delivery_date
string<date>
required

The date the feedstock batch was delivered to a field / to a site etc

display_name
string
required

The display name for this feedstock batch

Required string length: 1 - 150
feedstock_type_id
string
required

The kind of feedstock used to create this feedstock batch

Required string length: 20 - 37
Examples:

"ftt_1D7KZ1P761S0G7BN"

"ftt_1CSRJN4HHSBXZ3TK"

mass
ScalarQuantity · object
required
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

created_at
string<date-time>
required
delivery_date
string<date>
required
display_name
string
required
feedstock_type_id
string
required
Required string length: 20 - 37
Examples:

"ftt_1D7KZ1P761S0G7BN"

"ftt_1CSRJN4HHSBXZ3TK"

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

"ftb_1DYYDB3C91S0ZHPX"

"ftb_1G59XDK6HSBXCZ9B"

mass
ScalarQuantity · object | null
required
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