PUT/api/v1/pdf-template-config

Update PDF Template Configuration

Updates the PDF template configuration for the company. All fields are optional - only include the fields you want to change.

PUT /api/v1/pdf-template-config

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token or API key for authentication
X-CompanystringYesCompany UUID to scope the request
Content-TypestringYesMust be application/json

Request Body

FieldTypeRequiredDescription
templateSlugstringNoTemplate design: classic, modern, minimal, or bold
primaryColorstring|nullNoPrimary color in hex format (#RRGGBB). Set to null to use template default.
fontFamilystring|nullNoCSS font family (e.g., "DejaVu Sans", "Roboto")
showLogobooleanNoDisplay company logo on PDFs (default: true)
showBankInfobooleanNoDisplay bank account info on PDFs (default: true)
footerTextstring|nullNoCustom footer text. Set to null to remove.
customCssstring|nullNoCustom CSS styles. Set to null to remove.

Request

cURL
curl -X PUT https://api.storno.ro/api/v1/pdf-template-config \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Company: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{
    "templateSlug": "modern",
    "primaryColor": "#6366f1",
    "showLogo": true,
    "showBankInfo": true,
    "footerText": "Thank you for your business!"
  }'

Response

Returns the updated configuration object.

{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "templateSlug": "modern",
  "primaryColor": "#6366f1",
  "fontFamily": "DejaVu Sans",
  "showLogo": true,
  "showBankInfo": true,
  "footerText": "Thank you for your business!",
  "customCss": null
}

Validation

  • templateSlug must be one of: classic, modern, minimal, bold
  • primaryColor must match hex format #[0-9a-fA-F]{6} or be null

Error Codes

CodeDescription
400Invalid template slug or color format
401Missing or invalid authentication token
404Company not found