Upload a merchant's logo
BuildingIn development for the v1 API. The contract is set; the route is not served yet.
Uploads the merchant's logo, a PNG or an SVG, and makes it the logo of its invoicing page and emails.
- PNG: at most 2048 px a side; heru re-encodes it, which drops metadata, and the result must fit the size cap (256 KiB).
- SVG: plain shapes, gradients and text only, within the same cap. heru refuses, instead of cleaning, a file with scripts, event handlers,
foreignObject, images, links, animations or references outside the file. Export it as plain SVG.
JPEG and any other format are refused. The logo is served from an immutable public URL that does not name the merchant.
Needs the branding:write scope.
oauth2 branding:writeAuthorizationBearer <token>OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.
Scope: branding:write
id*stringThe merchant id.
^mer_[0-7][0-9a-hjkmnp-tv-z]{25}$multipart/form-data- body
file*fileThe logo, a PNG or an SVG (image/svg+xml). heru tells them apart by their bytes, not by the file name.
binaryThe logo was saved and is now the merchant's.
application/json- response
url*stringPublic, immutable URL of the logo.
uricontent_type*string"image/png""image/svg+xml"width*integerPixels of the PNG, or the SVG's viewBox scaled so its longer side is at most 2048.
height*integercurl -X PUT 'https://api.dev.b2b.heru.app/v1/branding/merchants/mer_01m4xnvf23ecb963n48h2j9vxz/logo' \ -F 'file=string'{ "url": "https://invoice.heru.app/assets/logo/3f5c0a9d7e2b4c6a8f1e0d3b5a7c9e2f4b6d8a0c1e3f5a7b9d0c2e4f6a8b0c1d.png", "content_type": "image/png", "width": 480, "height": 160}Update a merchant's brandPUT
Sets the merchant's own brand fields. A field left out keeps its value; `null` clears it, and the merchant inherits its company's again. The same body twice leaves the brand as it is, so a retry is safe and needs no Idempotency-Key. Changes reach the invoicing page and the emails within a minute. The logo goes through `PUT /branding/merchants/{id}/logo`. Needs the `branding:write` scope.
Remove a merchant's logoDEL
Removes the merchant's own logo; its page and emails show its company's again (or none). Removing a logo that is not there is a `204` too. Emails already sent keep showing the old logo. Needs the `branding:write` scope.