Objects and fields

Discover a workspace's objects, their field keys, field IDs and select options.

On this page

Every workspace has its own data model. Every workspace starts with the objects companies, people, opportunities, tasks and notes, whichever template it was created from, though a template may show some under other names (for example Clients, Organizations, Supporters, Deals, Applications or Proposals). Real estate, Recruiting, Agency / consulting and Nonprofit also add one object each (properties, jobs, projects and gifts); General and B2B SaaS add none. Members can change fields and add objects, and workspaces created earlier keep the objects they have. Don't hard-code IDs: they differ between workspaces.

You need metadata for three things:

ToUse
Choose an object in a paththe object's slug
Read and write valueseach field's key
Filter, sort and calculateeach field's id

List objects#

GET/objects
cURL
curl --fail-with-body "$JEMERO_URL/objects" \
  -H "Authorization: Bearer $JEMERO_API_KEY"
Node.js
const response = await fetch(`${process.env.JEMERO_URL}/objects`, {
  headers: { Authorization: `Bearer ${process.env.JEMERO_API_KEY}` },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const { objects } = await response.json();
console.log(objects.map((object) => object.slug));
Python
import os
import requests

response = requests.get(
    f"{os.environ['JEMERO_URL']}/objects",
    headers={"Authorization": f"Bearer {os.environ['JEMERO_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
print([item["slug"] for item in response.json()["objects"]])
Response 200
{
  "objects": [
    {
      "id": "67c8fb7e-065d-4071-bf26-f23e1ea2cb14",
      "slug": "companies",
      "singularName": "Company",
      "pluralName": "Companies",
      "description": "Organisations you work with.",
      "kind": "custom",
      "primaryFieldId": "215069ce-4b14-4b0d-b0f9-3d64efeee50e",
      "isVisible": true,
      "fieldCount": 13
    }
  ]
}

Objects also carry display settings, such as icon and position. The response above is shortened.

Get one object and its fields#

GET/objects/{objectSlug}
cURL
curl --fail-with-body "$JEMERO_URL/objects/companies" \
  -H "Authorization: Bearer $JEMERO_API_KEY"
Node.js
const response = await fetch(`${process.env.JEMERO_URL}/objects/companies`, {
  headers: { Authorization: `Bearer ${process.env.JEMERO_API_KEY}` },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const { fields } = await response.json();
const fieldByKey = Object.fromEntries(fields.map((field) => [field.key, field]));
console.log(fieldByKey.name.id);
console.log(fieldByKey.industry.config.options);
Python
import os
import requests

response = requests.get(
    f"{os.environ['JEMERO_URL']}/objects/companies",
    headers={"Authorization": f"Bearer {os.environ['JEMERO_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
field_by_key = {field["key"]: field for field in response.json()["fields"]}
print(field_by_key["name"]["id"])
print(field_by_key["industry"]["config"]["options"])
Response 200
{
  "object": { "id": "67c8fb7e-065d-4071-bf26-f23e1ea2cb14", "slug": "companies" },
  "fields": [
    {
      "id": "3825a193-b3bd-464b-bd45-c8e5396356dd",
      "key": "industry",
      "label": "Industry",
      "type": "select",
      "isRequired": false,
      "isUnique": false,
      "systemSource": null,
      "config": {
        "options": [
          { "id": "dae82246-2e36-455a-8a9b-a406ca34f04e", "label": "Technology", "position": 0 }
        ]
      }
    }
  ]
}

The real answer also includes views, the saved table and board views. They belong to the Jemero app and you can ignore them.

Field propertyMeaning
keyThe name used in a record's values.
idUsed by filters, sorts, aggregates and groupByFieldId.
typeOne of the types in Field values.
isRequired, isUniqueRules checked when you write.
systemSourceSet on fields Jemero fills in, such as created_at. You can't write them.
configSettings for the type: select options, relation target and cardinality, default currency and so on.

Labels can be renamed by members at any time. Match on key, not on label.

Errors#

StatusCause
404 Object not foundNo object with that slug, or it was archived.