Up - API Reference - Home
Requires JWT.
Set a record's definition.
We set the definition field to the new value, check which fields are in both the old and new definition and keep those field values, and clear out the rest.
POST /api/p/<project gid>/records/definition/set
Authorization: Bearer <JWT>
{
"record": "<record gid>",
"definition": "<definition gid>"
}
record
the record's gid
definition
the new definition's gid
language
return data for this (project) language.
languages
return data for these (project) languages.
If you request language
and/or languages
, you get the records' title
and fields
for the combined set. If you request neither, you'll get all available languages.
Authorization: <JWT>
{
"success": true,
"result": {
"record": "<record gid>"
},
"data": {
"records": {
"<record gid>": {
"gid": "<record gid>",
"definition": "<definition gid>",
…,
"fields": {
"nl": {
"name": "Caravell ijsconservator 174 liter",
"artnr": "CMS 225-945",
"packing": "1",
…
}
}
}
}
}
}
record
the updated record.
records
Record info with hierarchy, definition, field values.
400
Bad request - missing parameters or wrong type or value
401
Unauthorized - missing or expired JWT
403
Forbidden - not a member of this project
422
Unprocessable entity - parent record doesn't exist