Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | lookups.json | |
Action | Yes | The action to perform | action=create | |
General | Yes | Parameters described in overview | user=user&password=user | Structure of an API call |
JSON Input | Mandatory | Description | Examples |
---|---|---|---|
lookupsLookupValue | Yes | Lookup value | "lookupsLookupValue":"New Dept" |
lookupsLookupsPropertiesUuid | Yes | Lookup properties UUID | "lookupsLookupsPropertiesUuid":"263CD0A8DCDF4BFAAB50A1560B17E010" |
lookupsContextValue | Yes | Parent context | "lookupsContextValue":"Departments" |
Note: Parent context is used when the lookup you are adding a validation item to has a parent lookup. In this case each new lookup item has to be associated to a lookup item that already exists in the parent lookup.
Example request:
http://<SERVER>/jsonapi/lookups.json?action=create&user=user&password=user&input={"data":[{"lookupsLookupValue":"New Dept","lookupsLookupsPropertiesUuid":"263CD0A8DCDF4BFAAB50A1560B17E010","lookupsContextValue":"Departments"}]}&version=3.9
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"synapiversion": 3.9,
"data": [
{
"lookupsUuid": "3629761F72A19E448BD943F155DBE096",
"lookupsTimestampModified": 1648638222,
"lookupsRecordVersionNumber": 0
}
]
}