Skip to navigation

Check whether a Yearend Cleardown configuration would be saved

This endpoint runs the checks that a save runs on the configuration in the body, without saving anything.

If the name in the body belongs to an active configuration, then the endpoint runs the checks of an update, so the configuration’s own name isn’t reported as taken. Otherwise, it runs the checks of a create. The endpoint ignores expectedVersion.

If the configuration passes, then the response is 200 with valid set to true. If it fails, then the response is the same 400 or 403 error that a save returns.

Additional roles: the roles that the create endpoint needs for its checks.

Errors (each error type ends with the name shown):

  • 400 and 403: as on create.
  • 409 AmbiguousName: more than one active configuration has this name.

Permissions for nested calls. This endpoint calls other Fynapse services with your token. Depending on the request, the token also needs:

  • data_structure_read or bulk_configurator_read, when a journal definition exists.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Request

This endpoint expects an object.
namestringRequired1-64 characters
The configuration's name, unique among the active Yearend Cleardown configurations. It must not be blank.
journalTypeCodestringRequired>=1 character

The Journal Type of the clear-down journals, by its code. It must be a Journal Type that subledger-configuration defines (InvalidJournalTypeCode).

ruleslist of objectsRequired

What the clear-down moves. Rule names are unique within the configuration (RuleNameNotUnique). A source account appears once in the configuration (AccountNotUnique), and no source account is also an offset account (AccountUsedAsOffsetAccount).

descriptionstringOptional<=500 characters
Free text that describes the configuration.
commentstringOptional<=255 characters
Stored on the version that the write creates, and returned by the versions endpoint.

Response

OK
validtrue

Always true. A configuration that would be refused is answered with the refusal as an error response, never with valid false.

persistedfalse
Always false. The check stores nothing.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
5XX
Server Error