API Definitions
Anyone using the API should also become very familiar with our schema documentation which contains important details about individual database table columns.
See Definition Database Schema.
Version Added: 26.2.1
DefNum: Required in the URL.
Example Request:
GET /definitions/350
Example Response:
{
"DefNum": 350,
"Category": 25,
"category": "BlockoutTypes",
"ItemOrder": 5,
"ItemName": "General Blockout",
"ItemValue": "",
"ItemColor": "255,255,255",
"IsHidden": "false",
"Supp": ""
}
200 OK
404 NotFound (with explanation)
Version Added: 21.1
Parameters: All optional.
Category: Integer value corresponding to a DefCat enum entry.
category: (Added in version 26.2.1) String value corresponding to a DefCat enum entry.
includeHidden: Either "true" or "false". When "true", hidden definitions will be returned alongside non-hidden definitions. Default "false".
Example Requests:
GET /definitions
GET /definitions?Offset=200
GET /definitions?category=AdjTypes
GET /definitions?Category=1&includeHidden=true
Example Response:
[
{
"DefNum": 7,
"Category": 1,
"category": "AdjTypes",
"ItemOrder": 0,
"ItemName": "Sales Tax",
"ItemValue": "+",
"ItemColor": "",
"IsHidden": "false",
"Supp": ""
},
{
"DefNum": 8,
"Category": 1,
"category": "AdjTypes",
"ItemOrder": 1,
"ItemName": "Professional Discount",
"ItemValue": "-",
"ItemColor": "",
"IsHidden": "false",
"Supp": ""
},
{
"DefNum": 9,
"Category": 1,
"category": "AdjTypes",
"ItemOrder": 2,
"ItemName": "Cash Discount",
"ItemValue": "-",
"ItemColor": "",
"IsHidden": "false",
"Supp": ""
},
etc...
]
200 OK
400 BadRequest (with explanation)
Version Added: 26.2.27
Returns the API capabilites and validation rules for each definition category. Use this method to determine which fileds can be supplied or modified for a given definition category before calling definitions POST or definitions PUT. These options are static for a given version of Open Dental, so applications should retrieve and cache them.
Parameters: All optional.
Category: Integer value corresponding to a DefCat enum entry.
category: String value corresponding to a DefCat enum entry.
Returned fields are detailed below:
CanEditName: Either "true" or "false". When "true", this definition category is supported in Definitions POST. When "false", definitions belonging to this category can only be updated in Definitions PUT.
EnableValue: Either "true" or "false". When "true", definitions belonging to this category can specify ItemValue in Definitions POST. When "false", definitions belonging to this category cannot set ItemValue.
EnableColor: Either "true" or "false". When "true", definitions belonging to this category support ItemColor in both Definitions POST and Definitions PUT. When "false", definitions belonging to this category cannot have ItemColor set or updated.
CanHide: Either "true" or "false". When "true", definitions belonging to this category support being hidden in both Definitions POST and Definitions PUT. When "false", definitions belonging to this category cannot be hidden.
IsValueDefNum: Either "true" or "false". When "true", ItemValue for definitions belonging to this category must be a valid FK to definition.DefNum in Definitions POST.
DoShowNoColor: Either "true" or "false". Can only be "true" if EnableColor is also "true". When "true", no color can be specified for definitions belonging to this category by supplying "0" for ItemColor in both Definitions POST and Definitions PUT.
Example Requests:
GET /definitions/DefCatOptions
GET /definitions/DefCatOptions?Category=20
GET /definitions/DefCatOptions?category=BlockoutTypes
Example Response:
[
{
"Category": 0,
"category": "AccountColors",
"CanEditName": "false",
"EnableValue": "false",
"EnableColor": "true",
"CanHide": "true",
"IsValueDefNum": "false",
"DoShowNoColor": "false"
},
{
"Category": 1,
"category": "AdjTypes",
"CanEditName": "true",
"EnableValue": "true",
"EnableColor": "false",
"CanHide": "true",
"IsValueDefNum": "false",
"DoShowNoColor": "false"
},
etc...
]
200 OK
Version Added: 22.1
Creates a new definition, attempts to set the Category (definition.Category) will be silently ignored.
category: Required. See the list of current Definitions for a valid definition.Category name.
ItemName: Required. Name of the definition.
ItemValue: Optional. Values will be validated differently for each Category.
ItemColor: (Added in version 26.2.27) Optional. Comma delimited list of three color values from 0-255. Default depends on category. See Definitions Get DefCatOptions for more information.
IsHidden: Optional. Defaults to "false".
Supp: (Added in version 26.2.1) Optional. Can only be specified for the "AdjTypes" category, which uses this field as a default percentage (with valid values 0 through 1000). Default empty string.
{
"category": "PaymentTypes",
"ItemName": "Interest Payment"
}
or
{
"category": "AdjTypes",
"ItemName": "Cash Discount",
"ItemValue":"-",
"IsHidden":"false"
}
Example Response:
{
"DefNum": 12,
"Category": 1,
"category":"AdjTypes",
"ItemOrder": 17,
"ItemName": "Cash Discount",
"ItemValue":"-",
"ItemColor": "",
"IsHidden":"false",
"Supp": ""
}
201 Created
400 BadRequest (with explanation)
Version Added: 26.2.1
Updates an existing definition.
DefNum: Required in the URL.
ItemOrder: Optional. Numeric order of the definition within the definition Category. 0-indexed.
ItemColor: (Added in version 26.2.27) Optional. Comma delimited list of three color values from 0-255.
IsHidden: Optional. Either "true" or "false".
{
"ItemOrder": 5,
"ItemColor": "255,0,128",
"IsHidden":"true"
}
Example Response:
{
"DefNum": 350,
"Category": 25,
"category": "BlockoutTypes",
"ItemOrder": 5,
"ItemName": "General Blockout",
"ItemValue": "",
"ItemColor": "255,0,128",
"IsHidden": "true",
"Supp": ""
}
200 OK
400 BadRequest (with explanation)
404 NotFound (with explanation)