curl --request PATCH \
--url https://api.ionworks.com/cell_specifications/{cell_spec_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"properties": {},
"source": {},
"anode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"cathode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"electrolyte": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"separator": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"case": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"notes": "<string>"
}
'import requests
url = "https://api.ionworks.com/cell_specifications/{cell_spec_id}"
payload = {
"name": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"properties": {},
"source": {},
"anode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"cathode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"electrolyte": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"separator": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"case": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"notes": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
form_factor: '<string>',
manufacturer: '<string>',
ratings: {
capacity: {value: 123, unit: '<string>'},
voltage_min: {value: 123, unit: '<string>'},
voltage_max: {value: 123, unit: '<string>'},
nominal_voltage: {value: 123, unit: '<string>'},
energy: {value: 123, unit: '<string>'},
energy_density_gravimetric: {value: 123, unit: '<string>'},
energy_density_volumetric: {value: 123, unit: '<string>'},
max_discharge_rate: {value: 123, unit: '<string>'},
max_charge_rate: {value: 123, unit: '<string>'}
},
properties: {},
source: {},
anode: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
cathode: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
electrolyte: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
separator: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
case: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
notes: '<string>'
})
};
fetch('https://api.ionworks.com/cell_specifications/{cell_spec_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.ionworks.com/cell_specifications/{cell_spec_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'form_factor' => '<string>',
'manufacturer' => '<string>',
'ratings' => [
'capacity' => [
'value' => 123,
'unit' => '<string>'
],
'voltage_min' => [
'value' => 123,
'unit' => '<string>'
],
'voltage_max' => [
'value' => 123,
'unit' => '<string>'
],
'nominal_voltage' => [
'value' => 123,
'unit' => '<string>'
],
'energy' => [
'value' => 123,
'unit' => '<string>'
],
'energy_density_gravimetric' => [
'value' => 123,
'unit' => '<string>'
],
'energy_density_volumetric' => [
'value' => 123,
'unit' => '<string>'
],
'max_discharge_rate' => [
'value' => 123,
'unit' => '<string>'
],
'max_charge_rate' => [
'value' => 123,
'unit' => '<string>'
]
],
'properties' => [
],
'source' => [
],
'anode' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'cathode' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'electrolyte' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'separator' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'case' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.ionworks.com/cell_specifications/{cell_spec_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.ionworks.com/cell_specifications/{cell_spec_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/cell_specifications/{cell_spec_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"id": "<string>",
"organization_id": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"anode_id": "<string>",
"cathode_id": "<string>",
"electrolyte_id": "<string>",
"separator_id": "<string>",
"case_id": "<string>",
"properties": {},
"source": {},
"notes": "<string>",
"project_id": "<string>",
"created_by": "<string>",
"created_by_email": "<string>",
"instance_ids": [
{}
],
"anode": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"cathode": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"electrolyte": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"separator": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"case": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update a cell specification with nested component/material data
Update an existing cell specification with nested component and material data.
Materials and components are automatically upserted based on uniqueness. Only provided fields will be updated.
Example request body:
{
"capacity": 0.003,
"anode": {
"properties": {"diameter_mm": 16, "thickness_um": 25},
"material": {"name": "Graphite", "manufacturer": "NewSupplier"}
}
}
curl --request PATCH \
--url https://api.ionworks.com/cell_specifications/{cell_spec_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"properties": {},
"source": {},
"anode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"cathode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"electrolyte": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"separator": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"case": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"notes": "<string>"
}
'import requests
url = "https://api.ionworks.com/cell_specifications/{cell_spec_id}"
payload = {
"name": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"properties": {},
"source": {},
"anode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"cathode": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"electrolyte": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"separator": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"case": {
"material": {
"name": "<string>",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>"
},
"properties": {}
},
"notes": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
form_factor: '<string>',
manufacturer: '<string>',
ratings: {
capacity: {value: 123, unit: '<string>'},
voltage_min: {value: 123, unit: '<string>'},
voltage_max: {value: 123, unit: '<string>'},
nominal_voltage: {value: 123, unit: '<string>'},
energy: {value: 123, unit: '<string>'},
energy_density_gravimetric: {value: 123, unit: '<string>'},
energy_density_volumetric: {value: 123, unit: '<string>'},
max_discharge_rate: {value: 123, unit: '<string>'},
max_charge_rate: {value: 123, unit: '<string>'}
},
properties: {},
source: {},
anode: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
cathode: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
electrolyte: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
separator: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
case: {
material: {
name: '<string>',
definition: {},
manufacturer: '<string>',
product_id: '<string>'
},
properties: {}
},
notes: '<string>'
})
};
fetch('https://api.ionworks.com/cell_specifications/{cell_spec_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.ionworks.com/cell_specifications/{cell_spec_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'form_factor' => '<string>',
'manufacturer' => '<string>',
'ratings' => [
'capacity' => [
'value' => 123,
'unit' => '<string>'
],
'voltage_min' => [
'value' => 123,
'unit' => '<string>'
],
'voltage_max' => [
'value' => 123,
'unit' => '<string>'
],
'nominal_voltage' => [
'value' => 123,
'unit' => '<string>'
],
'energy' => [
'value' => 123,
'unit' => '<string>'
],
'energy_density_gravimetric' => [
'value' => 123,
'unit' => '<string>'
],
'energy_density_volumetric' => [
'value' => 123,
'unit' => '<string>'
],
'max_discharge_rate' => [
'value' => 123,
'unit' => '<string>'
],
'max_charge_rate' => [
'value' => 123,
'unit' => '<string>'
]
],
'properties' => [
],
'source' => [
],
'anode' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'cathode' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'electrolyte' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'separator' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'case' => [
'material' => [
'name' => '<string>',
'definition' => [
],
'manufacturer' => '<string>',
'product_id' => '<string>'
],
'properties' => [
]
],
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.ionworks.com/cell_specifications/{cell_spec_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.ionworks.com/cell_specifications/{cell_spec_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/cell_specifications/{cell_spec_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"form_factor\": \"<string>\",\n \"manufacturer\": \"<string>\",\n \"ratings\": {\n \"capacity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_min\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"voltage_max\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"nominal_voltage\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_gravimetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"energy_density_volumetric\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_discharge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"max_charge_rate\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n },\n \"properties\": {},\n \"source\": {},\n \"anode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"cathode\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"electrolyte\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"separator\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"case\": {\n \"material\": {\n \"name\": \"<string>\",\n \"definition\": {},\n \"manufacturer\": \"<string>\",\n \"product_id\": \"<string>\"\n },\n \"properties\": {}\n },\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"ratings": {
"capacity": {
"value": 123,
"unit": "<string>"
},
"voltage_min": {
"value": 123,
"unit": "<string>"
},
"voltage_max": {
"value": 123,
"unit": "<string>"
},
"nominal_voltage": {
"value": 123,
"unit": "<string>"
},
"energy": {
"value": 123,
"unit": "<string>"
},
"energy_density_gravimetric": {
"value": 123,
"unit": "<string>"
},
"energy_density_volumetric": {
"value": 123,
"unit": "<string>"
},
"max_discharge_rate": {
"value": 123,
"unit": "<string>"
},
"max_charge_rate": {
"value": 123,
"unit": "<string>"
}
},
"id": "<string>",
"organization_id": "<string>",
"form_factor": "<string>",
"manufacturer": "<string>",
"anode_id": "<string>",
"cathode_id": "<string>",
"electrolyte_id": "<string>",
"separator_id": "<string>",
"case_id": "<string>",
"properties": {},
"source": {},
"notes": "<string>",
"project_id": "<string>",
"created_by": "<string>",
"created_by_email": "<string>",
"instance_ids": [
{}
],
"anode": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"cathode": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"electrolyte": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"separator": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
},
"case": {
"material_id": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"properties": {},
"project_id": "<string>",
"material": {
"name": "<string>",
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"definition": {},
"manufacturer": "<string>",
"product_id": "<string>",
"project_id": "<string>",
"property_count": 0
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
Model for updating a cell specification with nested component/material data.
Components and materials are upserted based on uniqueness constraints. All fields are optional for partial updates.
New name of the cell specification
New form factor
New manufacturer
New electrical ratings
Show child attributes
Show child attributes
New cell-level properties
New source/provenance info
Anode component with material
Show child attributes
Show child attributes
Cathode component with material
Show child attributes
Show child attributes
Electrolyte component with material
Show child attributes
Show child attributes
Separator component with material
Show child attributes
Show child attributes
Case component with material
Show child attributes
Show child attributes
Notes
Response
Successful Response
Cell specification with nested component information.
Name of the cell specification
Electrical ratings from the spec sheet / design targets (rated capacity, voltage min/max, optional nominal voltage, energy, energy densities, max charge/discharge C-rates). See :class:Ratings.
Show child attributes
Show child attributes
Unique identifier for the cell specification
Organization ID of the cell specification
Physical form factor. Common values: '18650', '21700', 'R2032' (coin cell), 'pouch', 'prismatic', 'cylindrical'.
Who assembled/manufactured the cell
ID of the anode component
ID of the cathode component
ID of the electrolyte component
ID of the separator component
ID of the case component
Other design-level properties that are not electrical ratings and not tied to a specific component — e.g. assembly method, overall cell dimensions, mass, target thickness. Numeric values must use the Quantity format ({'value': ..., 'unit': ...}).
Provenance of the design. Typical keys: 'doi', 'citation', 'publication_date' (ISO 8601), 'license', 'creator_name', 'creator_orcid'. Lives on the specification (not the instance) because it describes the published design.
Free-text notes about the cell specification
Project this cell specification belongs to
User ID of the user who created this specification
Email of the user who created this specification
List of instance IDs associated with the cell specification
Anode component with material
Show child attributes
Show child attributes
Cathode component with material
Show child attributes
Show child attributes
Electrolyte component with material
Show child attributes
Show child attributes
Separator component with material
Show child attributes
Show child attributes
Case component with material
Show child attributes
Show child attributes
Was this page helpful?