Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cula.tech/llms.txt

Use this file to discover all available pages before exploring further.

Create a material sourcing record with the Cula Tracking API. Base URL: https://api.cula.tech/tracking/v1 All requests require an Authorization: Bearer <api-key> header.
1

Get your API key

API keys are issued by the Cula team. Each key is scoped to your organisation and one or more sites. Contact your Cula representative to obtain credentials.Once you have your key, export it for the examples below:
export CULA_API_KEY="your-api-key"
2

Discover your config

Configs define which data points a resource expects. List your available material sourcing configs:
curl -s https://api.cula.tech/tracking/v1/material-sourcing-configs \
  -H "Authorization: Bearer $CULA_API_KEY"
Pick the config relevant to your process and inspect a specific version to see the expected data points:
curl -s https://api.cula.tech/tracking/v1/material-sourcing-configs/stc_01kqzcjrpyf27tgeeekpvvx0zt/versions/scv_01kqzcjrpyf27tgeeekpvvx1ab \
  -H "Authorization: Bearer $CULA_API_KEY"
The response includes data_point_configs, which lists each field you can submit: ID, type, unit, and constraints.
3

Create a material sourcing step

Submit a new material sourcing record with your data points:
curl -s -X POST https://api.cula.tech/tracking/v1/material-sourcing \
  -H "Authorization: Bearer $CULA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "GC-HARVEST-2026-001",
    "config_id": "stc_01kqzcjrpyf27tgeeekpvvx0zt",
    "site": { "external_id": "GC-SITE-REFINERY" },
    "executed_at": "2026-05-01T14:30:00-05:00",
    "data_points": [
      {
        "config_id": "dpc_01kqzcjrpyf27tgeq6a84z0yhy",
        "input_value": { "value": 25000, "unit": "kg" }
      }
    ],
    "output": [
      {
        "data_points": [
          {
            "config_id": "dpc_01kqzcjrpyf27tgeq844x9cbr0",
            "input_value": { "value": 24500, "unit": "kg" }
          }
        ]
      }
    ],
    "file_ids": []
  }'
A successful response returns 201 Created with the full resource including a server-generated id.
4

Read back the resource

Retrieve the resource by server ID or by external ID prefixed with ext-:
curl -s https://api.cula.tech/tracking/v1/material-sourcing/ext-GC-HARVEST-2026-001 \
  -H "Authorization: Bearer $CULA_API_KEY"
In the response, each data point includes:
  • input_value — the value you submitted.
  • value — the server-normalized value after unit conversion and validation.
The output[].contents[] array shows material contents computed from your output data points.
5

Update a data point

Correct a single data point on an existing resource without resubmitting the entire record:
curl -s -X PUT https://api.cula.tech/tracking/v1/material-sourcing/ms_01jv1abc2def3ghi4jkl5mno6p/data-points/dpc_01kqzcjrpyf27tgeq6a84z0yhy \
  -H "Authorization: Bearer $CULA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_value": { "value": 24800, "unit": "kg" }
  }'
The response returns the updated resource with the recalculated value for the affected data point.

Next steps