APICustom field

List custom field definitions

GET
/public/v1/custom-fields

List every custom field definition owned by the authenticated company.

A custom field is a user-defined attribute attached to one entity type (its parent_object) — for example an extra Batch # text field on orders or a Lab dropdown on packages. Once defined, the field becomes available on every record of that entity type, and callers populate it per-record through that entity's custom_data map on its own create/update endpoint (the numeric id returned here is the key used inside custom_data).

Pass parent_object to return only the fields for one entity type; omit it to return the company's fields across all entity types. Fields come sorted by id, oldest first. This is a read-only settings lookup and changes nothing in inventory or compliance.

Required permission: settings_permissions_custom_fields.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

parent_object?string

Return only the fields attached to this entity type. Exact match against the parent object identifier; an unknown value returns an empty list. One of: assembly, batch, company, contact, invoice, order, package, product, purchase, request, return, shipment, stock_transfer, task. Omit to return the company's custom fields across all entity types. Example: ?parent_object=order

Response Body

List of custom field definitions

*/*
  1. response

A collection of custom field definitions

data?array<>

CustomFieldDefinitions

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/custom-fields'
Example Response
{  "data": [    {      "description": null,      "disabled_field_options": [],      "field_options": [],      "field_type": "text",      "filterable": false,      "id": 1,      "name": "Field 1",      "parent_object": "product",      "required": false    },    {      "description": null,      "disabled_field_options": [        "A"      ],      "field_options": [        "A",        "B"      ],      "field_type": "dropdown",      "filterable": true,      "id": 2,      "name": "Field 2",      "parent_object": "product",      "required": false    }  ]}