https://console.iugu.com/api/workspaces
Provision a batch of workspaces.
Creates one workspace per item and stores the billing information so the customer can be created in the Billing app.
Requires an application authenticated with the client_credentials grant that holds the
workspace_provisioner entitlement. The entitlement is granted by iugu only.
The batch is best effort per item: as long as the request itself is well formed the
response is 200 and every item reports its own outcome, so only the failed ones need to be
sent again. Every item carries an external_id that is unique per calling application, so
on any non-2xx response retry the whole batch — items that were already processed answer
replayed and create nothing.
Ownership. Every provisioned workspace is owned by a single iugu service account, which
exists only to hold administrator permissions. No user is created per workspace and no
invitation is sent, so the calling application owns onboarding. The address supplied in
owner.email is recorded against the provisioning for reference only — it is not sent to
Billing, which uses billing.email.
Setup and billing are asynchronous. The response returns as soon as the workspace row
exists; setup_status reaches all_set shortly after, and billing_status reaches
synced when install_requesting_app asked for a subscription, or skipped when it
did not.
Sem ações implementadas definidas
Request
|
Body Required Content Type: application/json |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"install_requesting_app": "<INSTALL_REQUESTING_APP>",
"workspaces": [
{
"external_id": "crm-8842",
"name": "Acme Ltda",
"alias": "acme",
"time_zone": "America/Sao_Paulo",
"owner": {
"email": "[email protected]"
},
"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"
}
]
}
}
}