Skip to content

Organization

Get information about an organization and update its settings.

List Organizations

GET
/organizations

Get all organizations the current user has access to.

Example response

json
// HTTP 200 OK
[
    {
        "id": 124,
        "name": "Acme Inc",
        "slug": "acme-inc",
        "owner": {
            "id": 1234,
            "firstname": "Alice",
            "lastname": "Cooper",
            "fullName": "Alice Cooper",
            "email": "alice.cooper@acme.com"
        },
        "logo": {
            "uuid": "6aa451d3-54f2-4f69-a8cb-6f5591f14c8f",
            "name": "logo.png",
            "url": "https://api.strawblond.com/image/6aa451d3-54f2-4f69-a8cb-6f5591f14c8f/logo.png?h=100&w=100&signature=..."
        },
        "is_on_trial": true,
        "trial_ends_at": "2022-12-15T08:08:06.000000Z",
        "subscription": null,
        "role_in_organization": "admin",
        "created_at": "2022-09-16T07:08:06.000000Z"
    }
]

Get Organization

GET
/organizations/{organizationId}

Get detailed information about a specific organization.

Path parameters

ParameterTypeRequiredDescription
organizationIdIntegerYesThe organization's ID

Example response

json
// HTTP 200 OK
{
    "id": 124,
    "type": "independent",
    "managed_by_id": null,
    "managed_by": null,
    "managing": [],
    "owner": {
        "id": 1234,
        "firstname": "Alice",
        "lastname": "Cooper",
        "fullName": "Alice Cooper",
        "email": "alice.cooper@acme.com"
    },
    "name": "Acme Inc",
    "legal_form": "gmbh",
    "vat_idn": "CHE-123.456.789",
    "slug": "acme-inc",
    "users": [
        {
            "id": 1234,
            "firstname": "Alice",
            "lastname": "Cooper",
            "email": "alice.cooper@acme.com"
        }
    ],
    "archived_users": [],
    "country": {
        "id": 1,
        "name": "Schweiz",
        "code": "CH",
        "currency_code": "CHF",
        "default_vat_rate": 7.7
    },
    "is_on_trial": true,
    "trial_ends_at": "2022-12-15T08:08:06.000000Z",
    "subscription": null,
    "has_payment_method": false,
    "billing_portal_url": "https://api.strawblond.com/organization/124/billing-portal?signature=...",
    "billing_portal_plan_url": "https://api.strawblond.com/organization/124/billing-portal?signature=...",
    "pm_type": null,
    "pm_last_four": null,
    "invoices": [],
    "billing_name": "Acme Inc",
    "billing_address": "Hardturmstrasse 123",
    "billing_address_line_2": null,
    "billing_city": "Zürich",
    "billing_zip": "8005",
    "billing_state": null,
    "billing_country": "CH",
    "phone_number": "+41 43 999 12 23",
    "extra_billing_information": null,
    "invitations": [],
    "role_in_organization": "admin",
    "member": {
        "id": 185,
        "role_name": "admin",
        "created_at": "2022-09-16T07:08:06.000000Z"
    },
    "logo": {
        "uuid": "6aa451d3-54f2-4f69-a8cb-6f5591f14c8f",
        "name": "logo.png",
        "url": "https://api.strawblond.com/image/6aa451d3-54f2-4f69-a8cb-6f5591f14c8f/logo.png?h=100&w=100&signature=..."
    },
    "max_dunning_level": 3,
    "current_fiscal_year": {
        "id": 1,
        "name": "2024",
        "start_date": "2024-01-01",
        "end_date": "2024-12-31"
    },
    "oldest_open_fiscal_year": {
        "id": 1,
        "name": "2024",
        "start_date": "2024-01-01",
        "end_date": "2024-12-31"
    },
    "default_vat_rate": {
        "id": 1,
        "name": "Standard",
        "rate": 7.7,
        "is_default": true
    },
    "show_acquisition_tax": false,
    "settings": {
        "offeredIncomeETA": 6,
        "monthlyIncomeGoal": 0,
        "monthlyFixedExpenses": 0,
        "averageInternalRate": 80,
        "invoiceDefaultDueInDays": 30,
        "autoSendInvoiceReminders": false,
        "liableForVat": true,
        "showNonVatLiableNote": true,
        "documentNumberStart": 1,
        "documentNumberFill": 5,
        "documentNumberResetYearly": false,
        "documentPrefixInvoice": "R-",
        "documentPrefixOffer": "O-",
        "documentPrefixExpense": "A-",
        "invoiceTotalRound": 0.05,
        "invoiceQrBillType": "QR",
        "invoiceQrBillPrintable": false,
        "invoiceFromOfferText": "Gemäss Offerte {number} erlauben wir uns diesen Betrag in Rechnung zu stellen.",
        "invoiceFromOfferMultipleText": "Gemäss Offerte {number} erlauben wir uns diesen Teilbetrag in Rechnung zu stellen.",
        "billingItemDescriptionTemplate": "{description} ({amount} Std.)",
        "documentFontSize": 8,
        "documentThemePrimary": "#000000",
        "documentThemeHeadingColor": "#000000",
        "documentThemeFontColor": "#212529",
        "documentThemeBorderColor": "#212529",
        "documentTableStyle": "classic",
        "documentLogoShow": true,
        "documentLogoSize": "normal",
        "documentLogoAlignment": "left",
        "documentFontFamily": "Inter",
        "documentAddressAlignment": "left",
        "documentPageCounter": null,
        "documentMargin": {
            "topCover": 50,
            "topLogo": 25,
            "top": 25,
            "right": 25,
            "bottom": 25,
            "left": 25
        },
        "mailFromName": "",
        "mailFromAddress": "",
        "mailThemePrimaryColor": "#ffbb00",
        "mailThemeFontColor": "#505362",
        "mailThemeHeadingColor": "#10121e",
        "mailThemeLogoWidth": 100,
        "mailThemeCorners": "rounded",
        "accountingEnabled": false,
        "accountingDebtorAccount": "1100",
        "accountingCreditorAccount": "2000",
        "accountingRevenueAccount": "3400",
        "accountingExpenseAccount": "4400",
        "accountingVatAccount": "2200",
        "accountingInputTaxAccount": "1170",
        "accountingInputTaxOperationsAccount": "1171",
        "accountingReverseTaxAccount": "2200",
        "accountingNetTaxRate2Accounts": []
    },
    "mail_preview_url": "https://api.strawblond.com/mail/preview?organization=124",
    "invoices_count": 1,
    "offers_count": 1,
    "projects_count": 1,
    "companies_count": 1,
    "products_count": 3,
    "rates_count": 9,
    "tags_count": 0,
    "expenses_count": 0,
    "times_count": 2,
    "accounts_count": 15,
    "bank_accounts_count": 1,
    "unreconciled_bank_transactions_count": 0,
    "expense_payment_methods_count": 2,
    "qr_bill_enabled": true,
    "expense_parser_quota": 30,
    "free_expense_parser_quota": 30,
    "addons": [],
    "created_at": "2022-09-16T07:08:06.000000Z"
}

Update Organization

patch
/organizations/{organizationId}

Update organization details and settings.

Path parameters

ParameterTypeRequiredDescription
organizationIdIntegerYesThe organization's ID

Request body

AttributeTypeRequiredDescription
nameStringNoOrganization name (3-50 characters)
legal_formStringNoLegal form (see Legal Forms section)
vat_idnStringNoVAT identification number (max 255)
billing_nameStringNoBilling name (max 255)
billing_addressStringNoBilling address (max 255)
billing_address_line_2StringNoAdditional billing address line (max 255)
billing_cityStringNoBilling city (max 255)
billing_countryStringNoBilling country code (2 characters)
billing_stateStringNoBilling state/province (max 255)
billing_zipStringNoBilling ZIP code (max 25)
country_idIntegerNoCountry ID (must exist in countries)
extra_billing_informationStringNoExtra billing information (max 1000)
phone_numberStringNoPhone number (max 30)
settingsObjectNoOrganization settings object

Valid values for legal_form:

ValueDescription
sole_proprietorshipEinzelfirma
simple_partnershipEinfache Gesellschaft
general_partnershipKollektivgesellschaft
limited_partnershipKommanditgesellschaft
plcAktiengesellschaft (SA/AG)
llcGesellschaft mit beschränkter Haftung (Sàrl/GmbH)
associationVerein
foundationStiftung

Organization Settings

SettingTypeDescription
monthlyIncomeGoalNumberMonthly income goal (min: 0)
monthlyFixedExpensesNumberMonthly fixed expenses (min: 0)
averageInternalRateNumberAverage internal hourly rate (min: 1)
liableForVatBooleanWhether organization is liable for VAT
showNonVatLiableNoteBooleanShow note for non-VAT liable organizations
customerPortalEnabledBooleanEnable customer portal
customerPortalShowSectionsArraySections to show (invoices, offers, credits) - min 1
customerPortalShowClosedDocumentsBooleanShow closed documents in customer portal
invoiceDefaultDueInDaysNumberDefault invoice due days (0-365)
invoiceTotalRoundNumberInvoice total rounding (0.01 or 0.05)
invoiceHeaderStringInvoice header text
invoiceFooterStringInvoice footer text
invoiceMailMessageStringDefault invoice email message
invoiceNotifyCustomerPaidBooleanNotify customer when invoice is paid
invoiceNotifyCustomerPaidTextStringText for paid invoice notification (max 1000)
invoiceQrBillTypeStringQR bill type (QRR, SCOR, NON)
invoiceQrBillIbanStringQR bill IBAN (21 alphanumeric, starts with CH/LI)
invoiceQrBillCINNumberQR bill customer identification number (0-999999)
invoiceQrBillPrintableBooleanMake QR bill printable
billingItemNameTemplateStringTemplate for billing item names (max 255)
billingItemDescriptionTemplateStringTemplate for billing item descriptions (max 255)
expensePaymentIbanStringIBAN for expense payments (starts with CH/LI)
autoSendInvoiceRemindersBooleanAutomatically send invoice reminders
documentFontSizeNumberDocument font size in points (4-20)
documentThemePrimaryStringPrimary theme color (hex color)
documentThemeHeadingColorStringHeading color (hex color)
documentThemeFontColorStringFont color (hex color)
documentThemeBorderColorStringBorder color (hex color)
documentThemeHighContrastBooleanUse high contrast theme
documentTableStyleStringTable style (classic, elegant)
documentCustomCSSStringCustom CSS for documents (HTML tags stripped)
documentFontFamilyStringDocument font family (max 255)
documentLogoAlignmentStringLogo alignment (left, center, right)
documentLogoShowBooleanShow logo on documents
documentLogoSizeStringLogo size (extra-small, small, normal, large, extra-large)
documentAddressAlignmentStringAddress alignment (left, right)
documentPageCounterStringPage counter position (left, center, right)
documentMarginObjectDocument margins (6 required fields: topCover, topLogo, top, right, bottom, left - each 0-100)
documentNumberStartNumberStarting document number (min: 1)
documentNumberFillNumberDocument number padding (0-6)
documentNumberResetYearlyBooleanReset document numbers yearly
documentPrefixInvoiceStringInvoice document prefix (1-25 characters)
documentPrefixOfferStringOffer document prefix (1-25 characters)
documentPrefixExpenseStringExpense document prefix (1-25 characters)
mailFromNameStringEmail sender name (max 255)
mailFromAddressStringEmail sender address (valid email, max 255)
mailThemePrimaryColorStringEmail theme primary color (hex color)
mailThemeFontColorStringEmail theme font color (hex color)
mailThemeHeadingColorStringEmail theme heading color (hex color)
mailThemeLogoWidthNumberEmail logo width in pixels (50-400)
mailThemeCornersStringEmail theme corner style (rounded, sharp)
offerHeaderStringOffer header text
offerFooterStringOffer footer text
offerMailMessageStringDefault offer email message
offerSummaryPositionStringOffer summary position (top, bottom)
termsStringTerms and conditions
invoiceFromOfferTextStringText when creating invoice from offer
invoiceFromOfferMultipeTextStringText when creating multiple invoices from offer
orderConfirmationHeaderStringOrder confirmation header
orderConfirmationFooterStringOrder confirmation footer
accountingEnabledBooleanEnable accounting features
accountingDebtorAccountStringDebtor account number (max 10)
accountingCreditorAccountStringCreditor account number (max 10)
accountingRevenueAccountStringRevenue account number (max 10)
accountingExpenseAccountStringExpense account number (max 10)
accountingVatAccountStringVAT account number (max 10)
accountingReverseTaxAccountStringReverse tax account number (max 10)
accountingUnclearAmountsAccountStringUnclear amounts account number (max 10)
accountingNetTaxRate2AccountsArrayNet tax rate 2 accounts (account numbers must exist)

Example request

json
{
    "name": "Acme Corporation",
    "billing_address": "Hardturmstrasse 456",
    "settings": {
        "monthlyIncomeGoal": 50000,
        "liableForVat": true,
        "invoiceDefaultDueInDays": 14,
        "documentThemePrimary": "#ff0000"
    }
}

Get Organization Settings

GET
/organizations/{organizationId}/settings

Get organization settings only.

Path parameters

ParameterTypeRequiredDescription
organizationIdIntegerYesThe organization's ID