Skip to content

Update monthly service invoice preferences

PATCH /api/v2/account/service-consolidation

Turns combined invoicing for monthly services on or off. It can also dismiss the suggestion to turn it on. Monthly services are VPS and web hosting on monthly billing. Send exactly one field: enabled (true or false) or dismissSuggestion: true. While the setting is on, each renewal invoice gathers every monthly service due within the following month onto one invoice. It has one line per service with its own period and is due on the earliest renewal. Invoices already issued are not merged or split. There is no payment-history, company or country requirement. The response is the setting read back after the change. A 503 means the change could not be confirmed. Read the setting with GET /api/v2/account/service-consolidation before you retry.

Authentication: An API key with the scope write:billing. About keys and scopes

Request

Body

enabledboolean
true combines future renewal invoices for monthly services. false keeps one invoice per service.
dismissSuggestionboolean
true stops the suggestion to turn the setting on. One of true.

Example

PATCH /api/v2/account/service-consolidation
curl -X PATCH "https://cloud.hostup.se/api/v2/account/service-consolidation" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'

Responses

200 The setting read back after the change.

{
"enabled": true,
"available": true,
"suggestion": {
"show": false,
"settingsUrl": "/account?tab=billing#service-invoices"
},
"actions": {
"canToggle": {
"allowed": true,
"reason": null
}
}
}
Response fields
enabledboolean
true when renewal invoices for monthly services are combined into one invoice a month.
availableboolean
false while the setting is temporarily unavailable.
suggestionobject
Whether to suggest turning the setting on.
showboolean
true when the account has two or more upcoming service renewals on different dates and the setting is off, not turned off on purpose and not dismissed.
settingsUrlstring
Client-area path to the setting.
actionsobject
canToggleobject
Whether the setting can be changed now.
allowedboolean
true when PATCH /api/v2/account/service-consolidation can change the setting now.
reasonstring or null
Why the setting cannot be changed. null when allowed is true.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400The body is not exactly one of enabled (boolean) or dismissSuggestion: true.
401Authentication is required.
403The API key lacks write:billing. A session that is not the account owner gets it too.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
503The change could not be confirmed. Read the setting again before you retry.