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
enabledbooleantrue combines future renewal invoices for monthly services. false keeps one invoice per service.dismissSuggestionbooleantrue stops the suggestion to turn the setting on. One of true.Example
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 }'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": false }'curl -X PATCH "https://cloud.hostup.se/api/v2/account/service-consolidation" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "dismissSuggestion": 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 } }}{ "enabled": false, "available": true, "suggestion": { "show": false, "settingsUrl": "/account?tab=billing#service-invoices" }, "actions": { "canToggle": { "allowed": true, "reason": null } }}{ "enabled": false, "available": true, "suggestion": { "show": false, "settingsUrl": "/account?tab=billing#service-invoices" }, "actions": { "canToggle": { "allowed": true, "reason": null } }}Response fields
enabledbooleantrue when renewal invoices for monthly services are combined into one invoice a month.availablebooleanfalse while the setting is temporarily unavailable.suggestionobjectshowbooleantrue 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.settingsUrlstringactionsobjectcanToggleobjectallowedbooleantrue when PATCH /api/v2/account/service-consolidation can change the setting now.reasonstring or nullnull when allowed is true.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The body is not exactly one of enabled (boolean) or dismissSuggestion: true. |
| 401 | Authentication is required. |
| 403 | The API key lacks write:billing. A session that is not the account owner gets it too. |
| 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. |
| 503 | The change could not be confirmed. Read the setting again before you retry. |