curl --request PUT \
--url https://api.emidat.com/v2/composites/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "11111111-1111-1111-1111-111111111111",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "22222222-2222-2222-2222-222222222222",
"percentage": 55
},
{
"elementary_id": "55555555-5555-5555-5555-555555555555",
"percentage": 35
},
{
"elementary_id": "66666666-6666-6666-6666-666666666666",
"percentage": 10
}
]
}
'import requests
url = "https://api.emidat.com/v2/composites/{id}"
payload = {
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "11111111-1111-1111-1111-111111111111",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "22222222-2222-2222-2222-222222222222",
"percentage": 55
},
{
"elementary_id": "55555555-5555-5555-5555-555555555555",
"percentage": 35
},
{
"elementary_id": "66666666-6666-6666-6666-666666666666",
"percentage": 10
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'BLENDED_CEMENT_MIX_A',
plant_id: '11111111-1111-1111-1111-111111111111',
name: 'Blended Cement Mix A',
composite_type: 'chemicals',
items: [
{elementary_id: '22222222-2222-2222-2222-222222222222', percentage: 55},
{elementary_id: '55555555-5555-5555-5555-555555555555', percentage: 35},
{elementary_id: '66666666-6666-6666-6666-666666666666', percentage: 10}
]
})
};
fetch('https://api.emidat.com/v2/composites/{id}', 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.emidat.com/v2/composites/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'BLENDED_CEMENT_MIX_A',
'plant_id' => '11111111-1111-1111-1111-111111111111',
'name' => 'Blended Cement Mix A',
'composite_type' => 'chemicals',
'items' => [
[
'elementary_id' => '22222222-2222-2222-2222-222222222222',
'percentage' => 55
],
[
'elementary_id' => '55555555-5555-5555-5555-555555555555',
'percentage' => 35
],
[
'elementary_id' => '66666666-6666-6666-6666-666666666666',
'percentage' => 10
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.emidat.com/v2/composites/{id}"
payload := strings.NewReader("{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.emidat.com/v2/composites/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emidat.com/v2/composites/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentage": 60
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}Update composite
Full replacement of editable fields. external_id is replaced: re-sending
this composite’s own code succeeds unchanged, while a code held by another
active composite returns 409. See External IDs.
plant_id and composite_type are immutable. They may be omitted or echoed
from the current resource; a different value returns 422.
The impacts of every supplier product made of this composite are recomputed.
curl --request PUT \
--url https://api.emidat.com/v2/composites/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "11111111-1111-1111-1111-111111111111",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "22222222-2222-2222-2222-222222222222",
"percentage": 55
},
{
"elementary_id": "55555555-5555-5555-5555-555555555555",
"percentage": 35
},
{
"elementary_id": "66666666-6666-6666-6666-666666666666",
"percentage": 10
}
]
}
'import requests
url = "https://api.emidat.com/v2/composites/{id}"
payload = {
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "11111111-1111-1111-1111-111111111111",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "22222222-2222-2222-2222-222222222222",
"percentage": 55
},
{
"elementary_id": "55555555-5555-5555-5555-555555555555",
"percentage": 35
},
{
"elementary_id": "66666666-6666-6666-6666-666666666666",
"percentage": 10
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'BLENDED_CEMENT_MIX_A',
plant_id: '11111111-1111-1111-1111-111111111111',
name: 'Blended Cement Mix A',
composite_type: 'chemicals',
items: [
{elementary_id: '22222222-2222-2222-2222-222222222222', percentage: 55},
{elementary_id: '55555555-5555-5555-5555-555555555555', percentage: 35},
{elementary_id: '66666666-6666-6666-6666-666666666666', percentage: 10}
]
})
};
fetch('https://api.emidat.com/v2/composites/{id}', 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.emidat.com/v2/composites/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'BLENDED_CEMENT_MIX_A',
'plant_id' => '11111111-1111-1111-1111-111111111111',
'name' => 'Blended Cement Mix A',
'composite_type' => 'chemicals',
'items' => [
[
'elementary_id' => '22222222-2222-2222-2222-222222222222',
'percentage' => 55
],
[
'elementary_id' => '55555555-5555-5555-5555-555555555555',
'percentage' => 35
],
[
'elementary_id' => '66666666-6666-6666-6666-666666666666',
'percentage' => 10
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.emidat.com/v2/composites/{id}"
payload := strings.NewReader("{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.emidat.com/v2/composites/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emidat.com/v2/composites/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"BLENDED_CEMENT_MIX_A\",\n \"plant_id\": \"11111111-1111-1111-1111-111111111111\",\n \"name\": \"Blended Cement Mix A\",\n \"composite_type\": \"chemicals\",\n \"items\": [\n {\n \"elementary_id\": \"22222222-2222-2222-2222-222222222222\",\n \"percentage\": 55\n },\n {\n \"elementary_id\": \"55555555-5555-5555-5555-555555555555\",\n \"percentage\": 35\n },\n {\n \"elementary_id\": \"66666666-6666-6666-6666-666666666666\",\n \"percentage\": 10\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "BLENDED_CEMENT_MIX_A",
"plant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Blended Cement Mix A",
"composite_type": "chemicals",
"items": [
{
"elementary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentage": 60
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}{
"msg": "supplier product requires a supplier plant",
"err_code": "err_supplier_product_missing_supplier_plant",
"entitlement_limit": {
"dimension": "users",
"usage": 123,
"limit": 123
}
}Authorizations
Per-manufacturer API key in the X-API-Key header, format
emidat-{key_id}-{secret} where key_id is a random public handle.
Issued by an owner in the Emidat
dashboard; carries its own permission scopes, optional plant
restrictions, and optional expiry. A revoked, expired, or unknown key
returns 401. See the Authentication guide for details.
Path Parameters
The composite's Emidat UUID.
Body
Full replacement of editable fields. Every editable field is required. The immutable plant and category may be omitted or echoed from the current resource.
Your own composite code. Overwrites the stored code; pass null to clear
it. Must stay unique among your active composites — a code held by another
returns 409 (see External IDs).
"BLENDED_CEMENT_MIX_A"
Updated composite name. Must stay unique among your active
composites at this plant; a duplicate returns 409.
Replaces the full items list — at least 2 items, all allowed for the
composite_type. Percentages must still sum to exactly 100.
2Show child attributes
Show child attributes
Optional assertion of the resource ID. It must match the path id.
Optional assertion of the current category. A different value returns
422.
chemicals, plastics, electronics, facing_layers, glass, fittings, resins, plastics_metal, mechanical_composites, glass_chemicals, glass_carbon_reinforced_polymers, masterbatches, processed_plastics, fabrics, furniture_component Optional assertion of the current plant. A different value returns
422.
Response
Updated composite.
Emidat-assigned composite UUID.
Your own code for this composite, null when none is set. Supplier
products reference the composite by its Emidat id; BOM entries
reference those supplier products, not the composite directly.
"BLENDED_CEMENT_MIX_A"
The plant's Emidat UUID.
Human-readable composite name.
"Blended Cement Mix A"
Composite category. Every material in the composite must belong to a material type allowed for this category.
chemicals, plastics, electronics, facing_layers, glass, fittings, resins, plastics_metal, mechanical_composites, glass_chemicals, glass_carbon_reinforced_polymers, masterbatches, processed_plastics, fabrics, furniture_component Ingredients constituting this composite, with percentages summing to 100.
Show child attributes
Show child attributes