Bilibili Ad Suite - Account Funds: View and Modify Account Budgets and Transaction History within Agent

Preface

Every day, ad operations staff have to check balances, verify daily and next-day budgets in the Sanlian backend, while finance or operations teams often have to dig through account transaction histories. If you are already using MAPI or scripts to connect to Sanlian, tasks like querying budgets, modifying budgets, or deleting next-day budgets often require piecing together different HTTP methods based on developer documentation. Furthermore, when asking “how much was spent today,” it is easy to confuse account transaction histories with ad delivery reports.

Below is an introduction to the Bilibili Sanlian Ads - Account Finance (internal ID bilibili-sanlian-ads-account-finance) available on SkillHub. It encapsulates account-level budgets and fund transaction histories into an Agent-executable Skill. It has a clearly defined division of labor with the authorization entry and ad reporting Skills in the same series, preventing interface misuse during conversations.

What is this

Bilibili Sanlian Ads - Account Finance focuses on the financial capabilities of the advertiser account for Bilibili Sanlian Ads: daily/next-day account budgets (including duplicate settings) and balance-related transaction history queries. Authored by Benjamin, the current Skill package version is 3.0.4 (MIT). It is categorized as business-ops on SkillHub, with a rating of approximately 98906 and around 2441 downloads (data sourced from the SkillHub listing page).

Account budgets are distinct from campaign or ad group budgets: the latter are handled in the “Bilibili Sanlian Ads - Ad Management” Skill. This Skill only covers account-dimension budgets and transaction histories, and does not replace ad delivery performance reports.

Official access points:

  • https://api.skillhub.cn/user_b0010d5c/sanlian-ads-account-finance
  • Canonical site link: https://skillhub.cn/skills/sanlian-ads-account-finance

Core Features

Based on the Skill package SKILL.md and built-in references, the verified capabilities are as follows.

Target Description
Query Account Budget Daily budget, next-day budget, and whether the next-day budget repeats daily (is_repeat)
Set Account Budget Specify an amount or set unlimited budget; effective date can be today or tomorrow; can configure if the next-day budget loops
Delete Next-day Budget Only clears the next-day configuration, does not affect the current day’s budget
Query Account Flow View fund change ledgers by day (summary dimensions like top-up, transfer out, consumption, etc.)

Corresponding MAPI paths (domain is https://cm.bilibili.com/takumi/api):

  • GET /open_api/cpc/v3/account/budget — Budget Query
  • POST /open_api/cpc/v3/account/budget — Budget Setting
  • DELETE /open_api/cpc/v3/account/nextday_budget — Delete Next-day Budget
  • GET /open_api/report/v3/cash_flow — Account Flow

Chinese trigger words (included in the Skill description for easy conversational invocation): Account budget, daily budget, next-day budget, balance, account flow, top-up, funds, wallet.

Related Skills: bilibili-sanlian-ads (OAuth and access_token), bilibili-sanlian-ads-reporting (Ad delivery consumption and performance metrics).

Installation and Activation

  1. Open the official address mentioned above on SkillHub and follow the page instructions to install the Skill into your current Agent environment (consistent with other Sanlian Ads Skills on the site; the publishing namespace is indiv-benjamin, and the slug is sanlian-ads-account-finance).
  2. First, install and configure Bilibili Sanlian Ads - Authorization & Main Flow (bilibili-sanlian-ads) to complete OAuth, ensuring the target advertiser account_id is within the token’s authorization scope.
  3. This Skill comes with scripts/mapi.sh (use py -3 scripts/mapi_client.py on Windows). Python 3.8+ is required; you can specify the interpreter path via the environment variable SANLIAN_PYTHON.

Direct link to the Skill package (consistent with the SkillHub download API, convenient for version verification):

https://api.skillhub.cn/api/v1/download?slug=sanlian-ads-account-finance&namespace=indiv-benjamin

Calling conventions (mandatory within the Skill):

  • All MAPI requests must be initiated via the call subcommand of mapi.sh / mapi_client.py. Do not hand-write curl commands or刷接口 (brush interfaces) in parallel for multiple accounts.
  • Request headers must include Authorization: Bearer {access_token}, X-Call-Source: sanlian-skills, X-Sanlian-Skills-Version: 3.0.4; JSON body interfaces additionally require Content-Type: application/json.
  • Budget query is GET, setting is POST, and deleting next-day budget is DELETE. The paths are similar, and using the wrong method will result in immediate failure.

Installation entries for various Agent products (Cursor, Codex CLI, Claude Code, etc.) are subject to the SkillHub page and their respective “Skills” configurations; differences not separately explained on the official page are not expanded upon here.

Typical Usage

Driven by Natural Language

Provided the Skill is enabled, you can directly describe your intent, for example:

  • “Check the daily budget and next-day budget for account 123456 today, and see if the next-day budget repeats every day.”
  • “Change the next-day budget for account 123456 to 1000 RMB, effective daily, and show me the before and after comparison first.”
  • “List the account flow for this account in June to see top-ups and balance changes.”

The Agent should follow Skill requirements: first confirm access_token and account_id; before modifying the budget, query current status → display before/after comparison and obtain confirmation → write → query again to verify.

In the Skill directory, pass query or body via JSON files. Example for querying daily/next-day budgets:

# Content of q.json example: {"account_id": 123456}
./scripts/mapi.sh call GET /open_api/cpc/v3/account/budget --query-file q.json

Setting a specific next-day budget with daily repetition (field meanings see reference 1879):

# body.json example
# {
#   "account_id": 123456,
#   "budget_limit_type": 1,
#   "budget": 800.00,
#   "effect_type": 2,
#   "is_repeat": 1
# }
./scripts/mapi.sh call POST /open_api/cpc/v3/account/budget --body-file body.json

Querying account flow (aggregated by day, pagination parameters see reference 1787):

# q.json example:
# {"account_id": 123456, "start_date": "2026-06-01", "end_date": "2026-06-15", "page": 1, "size": 20}
./scripts/mapi.sh call GET /open_api/report/v3/cash_flow --query-file q.json

Business success or failure is determined by the status, error_code, and error_msg in the response body, not just the HTTP status code.

Applicable Scenarios and Notes

Who it is for

  • Advertising, operations, and financial automation teams that have integrated or plan to integrate Sanlian MAPI; who wish to complete “view budget / modify budget / reconcile flow” within conversations instead of checking the backend or piecing together requests every time.
  • When used in combination with other Sanlian Skills like Ad Management, Reporting, and Creative Materials, select this Skill to handle funds and account budget issues according to the main Skill routing table.

Limitations and Pitfalls

  • Ad Delivery Consumption ≠ Account Flow: If a user asks “how much money was spent” or about “impression/click conversion,” use bilibili-sanlian-ads-reporting custom reports; the flow interface description also states that “Sanlian Ad Delivery Total Consumption” must go through the reporting interface.
  • Budget Unit is Yuan (RMB): When budget_limit_type=1, a positive number budget must be included. The system will validate the minimum budget and current day’s consumption; if it is lower than the already consumed amount, it may be rejected—subject to the interface return. Do not use trial-and-error multiple budget changes to “test” the limit.
  • Next-day Budget is_repeat: It is difficult to distinguish between one-time effective and daily loop at the moment of submission. After setting, you should read back the configuration. If a next-day budget is not needed, call the delete interface to avoid a looping budget persisting.
  • Flow Query Range: Only supports data from 2023-10-01 onwards, with a single query span not exceeding 184 days; currently does not support incentive coupon consumption queries.
  • You must comply with the sequential calling, rate limiting, and write operation confirmation rules in the main Skill; budget changes directly affect active accounts. If a timeout occurs or the result is unclear, query the current status first before deciding whether to retry.

Conclusion

Bilibili Sanlian Ads - Account Finance consolidates account budget reading, writing, deleting, and fund flow queries into a single set of Skills and references, with clear boundaries from authorization and reporting Skills. If you are building an Agent workflow for Sanlian Ads, you can install it on SkillHub and use it alongside bilibili-sanlian-ads:

https://api.skillhub.cn/user_b0010d5c/sanlian-ads-account-finance

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye