Retrieve partner settings
Requires the partner:read scope. Returns the enrolled partner team's products, revenue share, tip account counts and domain status counts. products currently contains send. share_bps is the agreed share of net revenue; divide its integer value by 100 to obtain a percentage. tip_account_count includes pending vanity accounts; live_tip_account_count counts live accounts. Your own keys keep using company tip accounts until all eight vanity accounts are live. Customer keys can only be created after that switch. Domains can be prepared while waiting. A nonpartner receives HTTP 404.
managementKeyAuthorizationBearer <zc_mgmt_>Products, share, total and live tip account counts, and domain counts
application/json- response
products*array<string>share_bps*integerAgreed share of net revenue. Divide this integer by 100 to obtain the percentage.
0 <= value <= 10000tip_account_count*integerTotal assigned vanity tip accounts, including pending accounts.
0 <= value <= 9007199254740991live_tip_account_count*integerLive vanity tip accounts. Customer-key creation requires live accounts.
0 <= value <= 9007199254740991domain_counts*// src/bin/management_partner.rs
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, required};
#[tokio::main]
async fn main() -> Result<()> {
let endpoint = reqwest::Url::parse("https://console.zerocopy.sh/api/v1/partner")?;
let request = reqwest::Client::new()
.get(endpoint)
.bearer_auth(required("MANAGEMENT_API_KEY")?);
let response = request.send().await?;
let status = response.status();
let request_id = response.headers().get("Request-Id")
.map(|value| value.to_str()).transpose()?.unwrap_or("<missing>").to_owned();
if let Some(etag) = response.headers().get("ETag") {
eprintln!("ETag: {}", etag.to_str()?);
}
let body = response.text().await?;
if !status.is_success() {
return Err(format!("HTTP {status}; Request-Id: {request_id}; {body}").into());
}
eprintln!("Request-Id: {request_id}");
println!("{body}");
Ok(())
}{
"products": [
"send"
],
"share_bps": 2500,
"tip_account_count": 8,
"live_tip_account_count": 8,
"domain_counts": {
"pending": 1,
"awaiting_dns": 1,
"active": 1,
"failed": 1
}
}