Preview the credit from a move to a postpaid team
Overview
Takes the same team and moves as the transfer endpoint and says what the move would do to billing, without moving or changing anything. Use it before sending accept_postpaid: true.
ends_prepaid_billing is true when the move would end prepaid billing for any of the resources. credit is then the unused paid time that would be added to account credit, as a decimal string in currency. Both are null when the move would not change how anything is billed. The amount is worked out for the current moment, so the move itself may credit slightly less a few minutes later.
The same checks as the move apply, so a move that would be refused is refused here with the same reason.
Permissions
Requires one of the server.transfer (Transfer servers to their own account), network.transfer (Transfer floating IPs to their own account) or snapshot.transfer (Transfer snapshot storage to their own account) permissions for the selected team, depending on the request. Resources outside that team return 404.
Authorization
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Send it as Bearer <token>.
Body
application/jsonThe value of moves.
1 to 11 items
Show child attributesHide child attributes
The type of resource this entry describes.
One of: server, ssh_key, user_script, iso, firewall_group, firewall_ip_group, private_network, floating_ip, snapshot_storage, website_hosting, license
The resource UUIDs to act on.
At least 1 items
The destination team UUID.
Exactly 36 characters
The value of accept_postpaid.
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
The value of ends_prepaid_billing.
The available account credit, formatted for display.
The three-letter currency code used for monetary amounts.
Errors
- 401
- The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- 403
- Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- 422
- A field is missing or invalid, or the resource cannot accept this change in its current state. Check
messagefor details. Field validation also includes anerrorsobject keyed by field name. - 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown