Brand Templates

Set the logo of a brand template

Uploads the logo a brand template prints, or removes the one it carries.

THE FILE TRAVELS BASE64 ENCODED and is at most 153600 decoded bytes and 25000000 pixels. It has to really be a JPEG, a PNG or a GIF: the first bytes decide, not the name, which is read only so a caller that sent the wrong file hears which one. The bytes are stored exactly as they arrive.

REMOVING IT (file null) IS REFUSED WHILE include_logo IS TRUE, with 400 and details.reason logo_required: a template that prints its logo has to carry one, which is what the settings window of the application demands. Set include_logo false with /v1/brand-templates/update first.

THE PREVIOUS FILE IS NOT KEPT ANYWHERE, so the way back from a replacement is uploading it again; before says only whether there was one.

The brand of the platform, under the empty key, answers 409 NOT_ALLOWED with details.reason system_defined.

if_version is not accepted, and the call is never confirmed.

Refusals: 400 for the framework, the body and the file (details.reason is one of too_large, too_many_pixels, format_not_supported, not_an_image, logo_required), 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND when the template is not this account's, 409 NOT_ALLOWED, 413 when the whole body is over the request ceiling.

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

post/brand-templates/set-logo

Request

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

Request body

brand_template_keystring required

The brand template whose logo is written. 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.

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.