Sirportly

Toggle Menu

Custom Fields

This method will list custom fields which have been configured for your account with an optional filter to restrict results based on department.

URL

/api/v2/objects/custom_fields

Supported Parameters

If you wish you can filter custom fields based on department. You can pass the department parameter containing the ID of the department whose fields you wish to view. If you do not have an ID, you can pass brand and department containing the names of the brand & department.

Example JSON

When executing a request for all fields, you will receive JSON as shown below:

[
  {
    "id": 1,
    "field_type": "string",
    "name": "Field 1",
    "system_name": "field1",
    "values": "",
    "default_value": "",
    "description": "",
    "private": false,
    "all_departments": true
  },
  {
    "id": 2,
    "field_type": "text",
    "name": "Field 2",
    "system_name": "field2",
    "values": "",
    "default_value": "",
    "description": "",
    "private": false,
    "all_departments": false,
    "departments": [
      {
        "id": 5,
        "name": "Accounts & Billing",
        "private": false
      },
      {
        "id": 4,
        "name": "Sales",
        "private": false
      }
    ]
  }
]

If filtered by department, you will not have the 'departments' data included.

[
  {
    "id": 1,
    "field_type": "string",
    "name": "Field 1",
    "system_name": "field1",
    "values": "",
    "default_value": "",
    "description": "",
    "private": false,
    "all_departments": true
  },
  {
    "id": 2,
    "field_type": "text",
    "name": "Field 2",
    "system_name": "field2",
    "values": "",
    "default_value": "",
    "description": "",
    "private": false,
    "all_departments": false
  }
]