SalesOS.

Custom Fields

Custom field definitions

Get all custom field definitions

GET
/api/custom-fields

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Query Parameters

entitystring
Value in: "LEAD" | "CONTACT" | "ACCOUNT" | "OPPORTUNITY" | "PRODUCT" | "QUOTE"
fieldTypestring
Value in: "TEXT" | "TEXTAREA" | "NUMBER" | "CURRENCY" | "DATE" | "DATETIME" | "CHECKBOX" | "PICKLIST" | "MULTI_PICKLIST" | "EMAIL" | "PHONE" | "URL" | "LOOKUP"
isActiveboolean
curl -X GET "https://www.salesos.org/api/api/custom-fields?entity=LEAD&fieldType=TEXT&isActive=true" \
  -H "Authorization: Bearer <token>"

Create a new custom field definition

POST
/api/custom-fields

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Request Body

application/jsonRequired
namestring

API name (auto-generated if not provided)

labelRequiredstring

Display label

descriptionstring

Field description

entityRequiredstring

Entity this field belongs to

Value in: "LEAD" | "CONTACT" | "ACCOUNT" | "OPPORTUNITY" | "PRODUCT" | "QUOTE"
fieldTypeRequiredstring

Field type

Value in: "TEXT" | "TEXTAREA" | "NUMBER" | "CURRENCY" | "DATE" | "DATETIME" | "CHECKBOX" | "PICKLIST" | "MULTI_PICKLIST" | "EMAIL" | "PHONE" | "URL" | "LOOKUP"
isRequiredboolean

Is field required

isUniqueboolean

Is field value unique

defaultValuestring

Default value

picklistValuesarray<string>

Picklist values for PICKLIST or MULTI_PICKLIST types

lookupEntitystring

Target entity for LOOKUP type

Value in: "LEAD" | "CONTACT" | "ACCOUNT" | "OPPORTUNITY" | "PRODUCT" | "QUOTE"
precisionnumber

Decimal precision for NUMBER/CURRENCY types

minValuenumber

Minimum value for NUMBER/CURRENCY types

maxValuenumber

Maximum value for NUMBER/CURRENCY types

maxLengthnumber

Maximum length for TEXT types

patternstring

Regex validation pattern

curl -X POST "https://www.salesos.org/api/api/custom-fields" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "label": "string",
    "description": "string",
    "entity": "LEAD",
    "fieldType": "TEXT",
    "isRequired": true,
    "isUnique": true,
    "defaultValue": "string",
    "picklistValues": [
      "string"
    ],
    "lookupEntity": "LEAD",
    "precision": 0,
    "minValue": 0,
    "maxValue": 0,
    "maxLength": 0,
    "pattern": "string"
  }'

Get custom fields statistics

GET
/api/custom-fields/stats

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

curl -X GET "https://www.salesos.org/api/api/custom-fields/stats" \
  -H "Authorization: Bearer <token>"

Get a custom field definition by ID

GET
/api/custom-fields/{id}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

idRequiredstring
curl -X GET "https://www.salesos.org/api/api/custom-fields/<string>" \
  -H "Authorization: Bearer <token>"

Update a custom field definition

PATCH
/api/custom-fields/{id}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Request Body

application/jsonRequired
labelstring

Display label

descriptionstring

Field description

fieldTypestring

Field type (cannot be changed after creation)

Value in: "TEXT" | "TEXTAREA" | "NUMBER" | "CURRENCY" | "DATE" | "DATETIME" | "CHECKBOX" | "PICKLIST" | "MULTI_PICKLIST" | "EMAIL" | "PHONE" | "URL" | "LOOKUP"
isRequiredboolean

Is field required

isUniqueboolean

Is field value unique

isActiveboolean

Is field active

defaultValuestring

Default value

picklistValuesobject

Picklist values

precisionnumber

Decimal precision

minValuenumber

Minimum value

maxValuenumber

Maximum value

maxLengthnumber

Maximum length

patternstring

Regex validation pattern

Path Parameters

idRequiredstring
curl -X PATCH "https://www.salesos.org/api/api/custom-fields/<string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "string",
    "description": "string",
    "fieldType": "TEXT",
    "isRequired": true,
    "isUnique": true,
    "isActive": true,
    "defaultValue": "string",
    "picklistValues": {},
    "precision": 0,
    "minValue": 0,
    "maxValue": 0,
    "maxLength": 0,
    "pattern": "string"
  }'

Delete a custom field definition

DELETE
/api/custom-fields/{id}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

idRequiredstring
curl -X DELETE "https://www.salesos.org/api/api/custom-fields/<string>" \
  -H "Authorization: Bearer <token>"

Reorder custom fields

POST
/api/custom-fields/reorder

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

curl -X POST "https://www.salesos.org/api/api/custom-fields/reorder" \
  -H "Authorization: Bearer <token>"

Add a picklist value

POST
/api/custom-fields/{id}/picklist-values

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

idRequiredstring
curl -X POST "https://www.salesos.org/api/api/custom-fields/<string>/picklist-values" \
  -H "Authorization: Bearer <token>"

Update a picklist value

PATCH
/api/custom-fields/{id}/picklist-values/{valueId}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

idRequiredstring
valueIdRequiredstring
curl -X PATCH "https://www.salesos.org/api/api/custom-fields/<string>/picklist-values/<string>" \
  -H "Authorization: Bearer <token>"

Reorder picklist values

POST
/api/custom-fields/{id}/picklist-values/reorder

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

idRequiredstring
curl -X POST "https://www.salesos.org/api/api/custom-fields/<string>/picklist-values/reorder" \
  -H "Authorization: Bearer <token>"

Set a custom field value for a record

POST
/api/custom-fields/values

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Request Body

application/jsonRequired
fieldIdRequiredstring

Custom field ID

entityTypeRequiredstring

Entity type

Value in: "LEAD" | "CONTACT" | "ACCOUNT" | "OPPORTUNITY" | "PRODUCT" | "QUOTE"
entityIdRequiredstring

Entity record ID

valueRequiredobject

Field value

curl -X POST "https://www.salesos.org/api/api/custom-fields/values" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "fieldId": "string",
    "entityType": "LEAD",
    "entityId": "string",
    "value": {}
  }'

Get all custom field values for a record

GET
/api/custom-fields/values/{entityType}/{entityId}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

entityTypeRequiredstring
entityIdRequiredstring
curl -X GET "https://www.salesos.org/api/api/custom-fields/values/<string>/<string>" \
  -H "Authorization: Bearer <token>"

Delete a custom field value

DELETE
/api/custom-fields/values/{fieldId}/{entityType}/{entityId}

Authorization

AuthorizationRequiredBearer <token>

Enter your JWT token

In: header

Path Parameters

fieldIdRequiredstring
entityTypeRequiredstring
entityIdRequiredstring
curl -X DELETE "https://www.salesos.org/api/api/custom-fields/values/<string>/<string>/<string>" \
  -H "Authorization: Bearer <token>"