Brand Templates

Delete a brand template

Deletes a brand template of the account.

THERE IS NO WAY BACK, AND THE TWO IMAGES GO WITH THE ROW. /v1/brand-templates/create writes a NEW template, with a new key; the logo and the cover image would have to be uploaded again, and every report pointed at the deleted one would have to be pointed at it. That is why this endpoint ALWAYS asks for a confirmation and why its answer carries before with every setting, which is what it would take to write it again.

IT REFUSES WHILE ANYTHING STILL USES IT: 409 IN_USE, with details.used_by naming what -- reports, each with its report_key, its internal name and whether it is in the trash, and portal_views, each with its portal_view_key and its name. Reports in the trash count, like everywhere else in this API: one of them still points at the template and would come back pointing at nothing.

The account setting that names the brand template new reports are born with is cleared with the row, which is what the application does too.

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 IN_USE and 409 NOT_ALLOWED.

Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.

post/brand-templates/delete

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/brand-templates/delete
  • Auth: HTTP bearer

Request body

brand_template_keystring required

The brand template to delete. From /v1/brand-templates/list. The empty key is the brand of the platform and is refused with 409 NOT_ALLOWED.

dry_runboolean

Validate everything and write nothing.

idempotency_keystring

Replays the answer of an identical call for 24 hours.

confirmation_tokenstring

The token the first call answered with, to apply the operation.

Response

The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.

status'ok' required

Changes

No recorded changes to this operation across all 1 revision of this API.