> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure AceDataCloud Application Global Balance Sharing

> Platform integration guide - Ace Data Cloud

Configure `allow_consume_global`. Once enabled, eligible pay-as-you-go Applications can continue using the account's global balance when their own balance is insufficient.

## Preparation

* Create and securely save an [Account Token](https://platform.acedata.cloud/documents/platform-token).
* Obtain the `application_id` of an Application you own from the [service application list](https://platform.acedata.cloud/documents/platform-application-list).

```shell theme={null}
export PLATFORM_TOKEN='your account token'
export APPLICATION_ID='your Application ID'
```

## API Overview

| Item | Content |
| - | - |
| Method | `POST` |
| URL | `https://platform.acedata.cloud/api/v1/applications/{application_id}/update-allow-consume-global/` |
| Auth | Account Token |
| Body | JSON |

```shell theme={null}
curl -X POST \
  "https://platform.acedata.cloud/api/v1/applications/${APPLICATION_ID}/update-allow-consume-global/" \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{"allow_consume_global": true}'
```

On success, the updated Application object is returned. Use `allow_consume_global` in the response as the source of truth, rather than assuming the requested value was necessarily saved.

> Applications of the `Period` type are not allowed to consume the global balance. Even if `true` is requested, the server will keep this field as `false`.

## Error Handling

* `401`: The Account Token is invalid or missing.
* `403`: The current account is not the owner of this Application.
* `404`: The Application ID does not exist.

For the global balance top-up entry point and available plans, refer to the platform console and the actual plans returned by [order creation](https://platform.acedata.cloud/documents/platform-order-create); do not assume that a `Wallet` type plan exists.

## Related APIs

* [Get Application Details](https://platform.acedata.cloud/documents/platform-application-detail)
* [Get Application List](https://platform.acedata.cloud/documents/platform-application-list)
* [Create Top-Up Order](https://platform.acedata.cloud/documents/platform-order-create)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.