SDK reference · Python SDK
prov.authorize.issuer.programs.set_branding
prov.authorize.issuer.programs.set_branding in Python SDK. Partial; None clears a field.
Signature
prov.authorize.issuer.programs.set_branding(program_id: str, **body: Any = …) -> AnyParameters
program_idstrRequired**bodyAny
Request fields
idstringpathRequired- The program's ID (
iprg_). namestring | null- The display name (at most 40 characters, no link or phone number, never "Provenance").
primarystring | null- The button colour,
#RRGGBB(white text on it at 4.5:1 or more). secondarystring | null- The page background,
#RRGGBB(the page text on it at 7:1 or more). accentstring | null- The link colour,
#RRGGBB(4.5:1 or more on white and on the secondary colour). help_urlstring | null- An https link to your help page.
powered_byboolean- False leaves out "Powered by Provenance" (Enterprise). Default true.
page_themeenum- The theme the program's approval pages open in. Default
dark. One ofdark,light. theme_switchboolean- Whether the cardholder may switch the page's theme. Default true.
logoobject | null- A new logo, or null to remove it.
Show child attributes
data_base64string- A PNG, JPEG or WebP image, base64 (at most 200 KB and 1024 px on a side; SVG isn't accepted).
Returns
Any The program, with its branding.
HTTP operation
PUT /v1/authorize/issuer_programs/{id}/branding: Set a program's approval branding
Errors
- authentication_required
- insufficient_scope
- parameter_invalid
- plan_required
- rate_limit_exceeded
- resource_missing
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Fernhill agent cards",
"processor": "lithic",
"approvals": {
"delivery": "issuer_push"
}
}),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}/branding`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Fernhill Bank",
"primary": "#1D4ED8",
"help_url": "https://help.fernhill.example/cards",
"powered_by": false,
"page_theme": "dark",
"theme_switch": true
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Fernhill agent cards",
"processor": "lithic",
"approvals": {
"delivery": "issuer_push"
}
}).json()
program = step1["id"]
data = httpx.put(f"{api}/v1/authorize/issuer_programs/{program}/branding", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Fernhill Bank",
"primary": "#1D4ED8",
"help_url": "https://help.fernhill.example/cards",
"powered_by": False,
"page_theme": "dark",
"theme_switch": True
}).json()