https://console.iugu.com/api/workspaces
Correct the billing data of a batch of provisionings.
Replaces the billing data of provisionings whose billing_status is failed and queues a
new attempt. This is the way out of a rejected document or email — because external_id is
an idempotency key, resending the batch to POST only answers replayed.
Authentication and batch semantics are identical to POST: same entitlement, same item cap,
200 with a per-item outcome as long as the request is well formed.
Only billing data is correctable. Items are matched by external_id and every other
field is ignored, including install_requesting_app — the workspace and the install intent
are already settled. To rename a workspace, use the workspace endpoints.
The billing object replaces the rejected one rather than merging into it, so send it
complete: any field you leave out is cleared. Corrected items come back as pending and
reach synced asynchronously, or failed again if Billing rejects the new data too.
Only failed is correctable. synced is already accepted, pending is still being
processed, and skipped never had billing data — each answers with its own error code.
Sem ações implementadas definidas
Request
|
Body Required Content Type: application/json |
||||||||
|---|---|---|---|---|---|---|---|---|
|
||||||||
1
2
3
4
5
6
7
8
{
"workspaces": [
{
"external_id": "crm-8842",
"billing": "<BILLING>"
}
]
}
Response
|
200 |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Batch processed. Check each item for its outcome.
|
||||||||||||||||||||||||||||||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"items": [
{
"external_id": "crm-8842",
"status": "<STATUS>",
"workspace_id": "abcd1234efgh5678ijkl",
"user_id": "abcd1234efgh5678ijkl",
"setup_status": "<SETUP_STATUS>",
"billing_status": "<BILLING_STATUS>",
"app_installed": "<APP_INSTALLED>",
"error": {
"code": "missing_document",
"message": "billing.document is required",
"details": {
"name": [
{
"error": "blank"
}
]
}
}
}
]
}
|
401 |
||||
|---|---|---|---|---|
|
Unauthorized
|
||||
1
2
3
4
{
"error": "JWT::ExpiredSignature",
"error_description": "Signature has expired"
}
|
403 |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The application may not provision workspaces.
|
||||||||||||
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"error": {
"code": "missing_document",
"message": "billing.document is required",
"details": {
"name": [
{
"error": "blank"
}
]
}
}
}
|
422 |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The batch itself is invalid (missing, empty or too large).
|
||||||||||||
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"error": {
"code": "missing_document",
"message": "billing.document is required",
"details": {
"name": [
{
"error": "blank"
}
]
}
}
}