Update a brand template
Changes the settings of a brand template that already exists.
IT IS SHARED. Every report printed with the template and every client portal view wearing it changes with it, from the next time they are drawn. /v1/brand-templates/delete names them when it refuses to delete one.
THE UPDATE IS PARTIAL: the fields the body carries are written and every other column is left as it is, the logo and the cover image included. The answer carries before with the whole template in the same shape, so sending that block back undoes the call.
TWO PAIRS THE SETTINGS WINDOW OF THE APPLICATION KEEPS AND THIS ENDPOINT KEEPS WITH IT. include_logo true over a template that carries no logo is refused with 400 and details.reason logo_required; cover_style 'image' over one that carries no cover image is refused with details.reason cover_image_required.
SETTING include_logo FALSE REMOVES THE LOGO. The flag and the file are one thing: unticking the checkbox in the settings window of the application blanks the file with it, and this endpoint does the same, in the same write. Nothing keeps a copy, so switching the flag on again needs a new upload through /v1/brand-templates/set-logo; the answer says so with a LOGO_REMOVED warning, and a read afterwards answers logo null. The other way to remove it is /v1/brand-templates/set-logo with a null file, which is refused while the flag is on.
A WRITE OF SETTINGS NEVER WRITES THE BYTES OF AN IMAGE. It writes the columns that are settings and leaves the logo and the cover image where they are, so an upload running at the same time is never undone by it; the one thing that reaches the logo column is the removal above, and it only ever writes an absence.
The brand of the platform, under the empty key, answers 409 NOT_ALLOWED with details.reason system_defined.
if_version is not accepted.
Refusals: 400 for the framework and the body, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND when the template is not this account's, 409 NOT_ALLOWED.
A brand template written through this API is not visible to an application window that is already open: the page has to be reloaded before the same template is edited there.
Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.
Request
- Base URL: https://api.reportingninja.com/v1
- URL: https://api.reportingninja.com/v1/brand-templates/update
- Auth: HTTP bearer
Request body
Response
The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.
Changes
No recorded changes to this operation across all 1 revision of this API.