Validate a registry document
const url = 'https://api.sloose.com/config/validate/registry';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"version":1,"modules":[{"seedMappings":"example","key":"example","apiName":"example","label":"example","singular":"example","singularLabel":"example","color":"example","defaultEnabled":true,"uniqueFields":["example"],"defaultDuplicateCheck":{"searchField":"example","searchMethod":"example","expression":"example"},"excludedFields":["example"],"child":{"of":"example","via":"example","parentNeedsRows":true,"pointer":"example","maxRows":"off","layouts":{"additionalProperty":{"name":"example","maxRows":"off","required":["example"]}},"defaultLayout":"example"},"stockEffect":{"field":"example","label":"example","direction":"up"}}],"expressionContext":"example","apiDelayMs":1,"systemExcludedFields":["example"],"dateFormat":"DMY","timezone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sloose.com/config/validate/registry \ --header 'Content-Type: application/json' \ --data '{ "version": 1, "modules": [ { "seedMappings": "example", "key": "example", "apiName": "example", "label": "example", "singular": "example", "singularLabel": "example", "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "child": { "of": "example", "via": "example", "parentNeedsRows": true, "pointer": "example", "maxRows": "off", "layouts": { "additionalProperty": { "name": "example", "maxRows": "off", "required": [ "example" ] } }, "defaultLayout": "example" }, "stockEffect": { "field": "example", "label": "example", "direction": "up" } } ], "expressionContext": "example", "apiDelayMs": 1, "systemExcludedFields": [ "example" ], "dateFormat": "DMY", "timezone": "example" }'Checks a RegistryDoc against the current schema and reports the module keys it declares. No authentication, no storage, no side effects.
Request Bodyrequired
Section titled “Request Bodyrequired”A registry document.
object
object
seedMappings is no longer a module setting: a mapping a new import starts from belongs to the field it is about. Set defaultMapping on the field annotation — PATCH /orgs/{org}/config/fields/{module}/{apiName}, or fields/<module>.json in a configuration repository. Values already stored were moved by migration 0035.
One record as the CRM names it in words (“Sales Order”), which sentences say; singular is the identifier expressions use (“SalesOrder”). Read-only: discovery takes it from the CRM, so a pushed value is ignored. Absent until a discovery has read it, when a reader says singular.
object
object
The organisation’s IANA timezone, which helpers.today() answers in. Read-only: it is taken from the CRM at sign-in, so a pushed value is ignored.
Responses
Section titled “Responses”Valid. modules lists the keys it declares, in order.
object
Example
{ "ok": true}Not a valid registry document. This route answers { ok: false, issues } rather than the usual error envelope, because the SDK prints the issue list directly.
object
Example
{ "ok": false}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).