Get Fields
Returns the field definitions for a specific table. Each field includes its internal name, localized label, and display order. Use this endpoint to discover which fields are available for inserting or updating records.
Endpoint
GET /integration/tables/:table/fields
Authentication
Requires a valid API token in the Authorization header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The internal table name (from Get Tables) |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
lang | string | No | "he" | Language code for label localization |
Response
Returns the table name and an array of field objects:
| Field | Type | Description |
|---|---|---|
name | string | The internal field/column name (use this in insert/update requests) |
label | string | The localized display name for this field |
order | number | The display order of the field in forms |
Examples
Request
curl -X GET "https://api.ozari.co.il/integration/tables/tcust/fields?lang=he" \
-H "Authorization: Bearer your-api-token-here"
Response
{
"success": true,
"table": "tcust",
"fields": [
{ "name": "fname", "label": "שם לקוח", "order": 1 },
{ "name": "fphone", "label": "טלפון", "order": 2 },
{ "name": "femail", "label": "דוא\"ל", "order": 3 },
{ "name": "faddress", "label": "כתובת", "order": 4 },
{ "name": "fcity", "label": "עיר", "order": 5 },
{ "name": "fcontact", "label": "איש קשר", "order": 6 },
{ "name": "fnotes", "label": "הערות", "order": 7 }
]
}
Error Responses
Invalid table name
If the table name contains invalid characters (only alphanumeric and underscores are allowed):
{
"success": false,
"error": "Invalid table name"
}
Status: 400 Bad Request
Table not found
If the table does not exist in your tenant database:
{
"success": false,
"error": "Table not found"
}
Status: 404 Not Found
Table exists but has no visible fields
If the table exists but has no fields marked as visible in form configuration:
{
"success": true,
"table": "some_table",
"fields": []
}
Status: 200 OK
Notes
- Only fields with
show_form = 'Y'in the labels configuration are returned. Internal or hidden fields are excluded. - Fields are sorted by their
_ordervalue (ascending). - The
namevalue is what you use as keys in thefieldsobject when calling Insert Record or Update Record. - Table names must match the pattern
^[A-Za-z0-9_]+$-- only letters, numbers, and underscores.