Get account preferences
GET /api/v2/me/preferences
Returns your account preferences: language and timezone, notification settings, invoice delivery and billing automation. To see whether card payments are charged automatically, read billing.cardAutoCharge.status. configured: true only means the setting is on. Without a saved card, enabled is false with status: "needs_payment_method". billing.separateInvoices.enabled: false means consolidated monthly renewal invoices: domain renewals are combined on one invoice each month. categories holds free-form settings the client area saves for its own views. Change preferences with PATCH /api/v2/me/preferences. To check whether the account can get e-invoices through Peppol, use GET /api/v2/me/preferences/peppol.
Authentication: An API key with the scope read:account. About keys and scopes
Example
curl "https://cloud.hostup.se/api/v2/me/preferences" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Your account preferences.
{ "localization": { "languageCode": "en", "timezone": "Europe/Stockholm" }, "notifications": { "emailEnabled": true, "smsEnabled": false, "delivery": { "overrideEnabled": true, "enabledEmails": [ "notify_billing", "notify_support", "notify_services", "notify_domains" ], "billing": { "enabled": true, "actions": { "canToggle": { "allowed": false, "reason": "Add a billing notification recipient before changing billing email delivery." } } } } }, "security": { "bankIdOnlyLogin": false, "twoFactorEnabled": false }, "billing": { "peppol": { "optedOut": false, "optOutReason": null, "optedOutAt": null, "creditNotesOptedOut": false, "creditNotesOptedOutAt": null }, "cardAutoCharge": { "enabled": true, "label": "Card auto-charge", "description": "Automatically charge the saved card when invoices are due.", "reason": null, "actions": { "canToggle": { "allowed": true, "reason": null } }, "method": "card", "status": "active", "configured": true, "hasPaymentMethod": true }, "separateInvoices": { "enabled": false, "label": "Separate domain invoices", "description": "Receive a separate invoice for each domain renewal.", "reason": null, "actions": { "canToggle": { "allowed": true, "reason": null } } } }, "categories": { "general": {}, "ui": {}, "notifications": {}, "billing": {}, "dashboard": {} }}Response fields
localizationobjectlanguageCodestringsv, en.timezonestringnotificationsobjectemailEnabledbooleansmsEnabledbooleandeliverynullsecurityobjectbankIdOnlyLoginbooleantwoFactorEnabledbooleanbillingobjectpeppolobjectoptedOutbooleanoptOutReasonstring or nulloptedOutAtstring or nullcreditNotesOptedOutbooleancreditNotesOptedOutAtstring or nullcardAutoChargenullseparateInvoicesnullcategoriesobjectgeneralobjectuiobjectnotificationsobjectbillingobjectdashboardobjectErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | forbidden: the request has no customer account context. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |