Create a note
Creates a new threaded note on an entity (shipment, equipment, waybill, etc.). The caller’s verified identity (from JWT or assumed user) becomes the note author. Reference tokens (<<ref:type:id:displayText>>) embedded in content should also be supplied as structured references for reverse-lookup.
curl --request POST \
--url https://api.linda.cedarai.com/v1/notes/create \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"content": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"uploads": [
{
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": "<string>"
}
]
}
'import requests
url = "https://api.linda.cedarai.com/v1/notes/create"
payload = {
"content": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": True,
"url": "<string>"
}
],
"uploads": [
{
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": "<string>"
}
]
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: '<string>',
entity_id: '<string>',
entity_type: '<string>',
references: [
{
display_text: '<string>',
entity_id: '<string>',
entity_type: '<string>',
is_stale: true,
url: '<string>'
}
],
uploads: [{file_name: '<string>', media_type: '<string>', size_bytes: '<string>'}]
})
};
fetch('https://api.linda.cedarai.com/v1/notes/create', 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.linda.cedarai.com/v1/notes/create",
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([
'content' => '<string>',
'entity_id' => '<string>',
'entity_type' => '<string>',
'references' => [
[
'display_text' => '<string>',
'entity_id' => '<string>',
'entity_type' => '<string>',
'is_stale' => true,
'url' => '<string>'
]
],
'uploads' => [
[
'file_name' => '<string>',
'media_type' => '<string>',
'size_bytes' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <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.linda.cedarai.com/v1/notes/create"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<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.post("https://api.linda.cedarai.com/v1/notes/create")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linda.cedarai.com/v1/notes/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"note": {
"attachments": [
{
"attachment_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_name": "<string>",
"media_type": "<string>",
"note_id": "<string>",
"size_bytes": "<string>",
"url": "<string>"
}
],
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by_uuid": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"note_id": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Headers
Carrier ID the request is scoped to. Notes are isolated per carrier.
Body
Markdown body. Embed @-mentions as inline reference tokens of the
form <<ref:{entity_type}:{entity_id}:{display_text}>> and pass a
matching entry in references for each one.
Example:
"Held at <<ref:equipment:54321:BNSF 54321>> waiting on clearance."
Entity ID as a string. UUID for shipment/work_order/etc., or a
stringified int64 for equipment/waybill/invoice/charge.
Entity type to attach the note to. Must be a registered type (e.g.
shipment, equipment, waybill, work_order, invoice, charge).
Sidecar reference rows for every <<ref:...>> token in content.
Used for reverse-lookup queries and stale-entity detection. Maximum
100 references per note. Use SearchReferences to look up the
entity_type/entity_id/display_text triples to insert here.
Example for the content above:
[
{ "entity_type": "equipment", "entity_id": "54321",
"display_text": "BNSF 54321" }
]
Show child attributes
Show child attributes
Reserved for future inline upload support; currently a no-op. Use
UploadNoteAttachment after the note is created to attach files.
Show child attributes
Show child attributes
Response
A successful response.
A single note in a thread. Threaded notes are anchored to an
(entity_type, entity_id) pair and ordered by created_at.
Show child attributes
Show child attributes
Related topics
API IntroductionUpdate a noteSearch referenceable entities for mentionsNotesCreate a class listWas this page helpful?
curl --request POST \
--url https://api.linda.cedarai.com/v1/notes/create \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"content": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"uploads": [
{
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": "<string>"
}
]
}
'import requests
url = "https://api.linda.cedarai.com/v1/notes/create"
payload = {
"content": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": True,
"url": "<string>"
}
],
"uploads": [
{
"file_name": "<string>",
"media_type": "<string>",
"size_bytes": "<string>"
}
]
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: '<string>',
entity_id: '<string>',
entity_type: '<string>',
references: [
{
display_text: '<string>',
entity_id: '<string>',
entity_type: '<string>',
is_stale: true,
url: '<string>'
}
],
uploads: [{file_name: '<string>', media_type: '<string>', size_bytes: '<string>'}]
})
};
fetch('https://api.linda.cedarai.com/v1/notes/create', 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.linda.cedarai.com/v1/notes/create",
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([
'content' => '<string>',
'entity_id' => '<string>',
'entity_type' => '<string>',
'references' => [
[
'display_text' => '<string>',
'entity_id' => '<string>',
'entity_type' => '<string>',
'is_stale' => true,
'url' => '<string>'
]
],
'uploads' => [
[
'file_name' => '<string>',
'media_type' => '<string>',
'size_bytes' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <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.linda.cedarai.com/v1/notes/create"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<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.post("https://api.linda.cedarai.com/v1/notes/create")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linda.cedarai.com/v1/notes/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"references\": [\n {\n \"display_text\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"is_stale\": true,\n \"url\": \"<string>\"\n }\n ],\n \"uploads\": [\n {\n \"file_name\": \"<string>\",\n \"media_type\": \"<string>\",\n \"size_bytes\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"note": {
"attachments": [
{
"attachment_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_name": "<string>",
"media_type": "<string>",
"note_id": "<string>",
"size_bytes": "<string>",
"url": "<string>"
}
],
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by_uuid": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"note_id": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}