Update a merchant's brand
BuildingIn development for the v1 API. The contract is set; the route is not served yet.
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.
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}$application/json- body
Only the fields sent change. null clears a field; an empty string is not a valid value.
display_name?|Plain text, without control characters or < > { }. Spaces are collapsed.
1 <= length <= 80primary_color?|#RRGGBB; stored upper-cased.
^#[0-9a-fA-F]{6}$support_email?|One plain address, stored lower-cased.
emaillength <= 254footer_text?|Plain text, without control characters or < > { }.
length <= 500The brand was saved. The answer is the effective brand, as GET returns it.
application/json- response
merchant_id*string^mer_[0-7][0-9a-hjkmnp-tv-z]{25}$display_name*|Name on the invoicing page and in the emails. Null: the merchant's trade name, or its legal name.
logo*|Null: heru's logo.
primary_color*|Accent colour. Null: heru's. Text on it is white or dark, whichever reads, so any colour is safe.
^#[0-9A-F]{6}$support_email*|Help line of the page and the emails. Null: heru's support mailbox.
emailfooter_text*|Footer of the page and the emails. Null: none.
sources*Which level decided each field: the merchant itself, its company, its organization, or heru's default.
curl -X PUT 'https://api.dev.b2b.heru.app/v1/branding/merchants/mer_01m4xnvf23ecb963n48h2j9vxz' \ -H 'Content-Type: application/json' \ -d '{ "display_name": "Clínica Dental Roma", "primary_color": "#0E7C86", "support_email": "contacto@clinica-dental-roma.example"}'{ "merchant_id": "mer_01m4xnvf23ecb963n48h2j9vxz", "display_name": "Clínica Dental Roma", "logo": { "url": "https://invoice.heru.app/assets/logo/3f5c0a9d7e2b4c6a8f1e0d3b5a7c9e2f4b6d8a0c1e3f5a7b9d0c2e4f6a8b0c1d.png", "content_type": "image/png", "width": 480, "height": 160 }, "primary_color": "#0E7C86", "support_email": "contacto@clinica-dental-roma.example", "footer_text": null, "sources": { "display_name": "merchant", "logo": "merchant", "primary_color": "merchant", "support_email": "merchant", "footer_text": "default" }}Get a chargeGET
Returns the charge. Once the customer invoices it, `invoice` carries the CFDI, and the link fields are null. Download its files with `GET /invoices/{id}/download`. Needs the `charges:read` scope.
Upload a merchant's logoPUT
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.