ZeroCopyZeroCopy
ReferenceManagement API

Retrieve partner settings

GET
/partner

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.

Authorization

managementKey
headerAuthorizationBearer <zc_mgmt_>

Response Body

Products, share, total and live tip account counts, and domain counts

application/json
  1. response
products*array<string>
share_bps*integer

Agreed share of net revenue. Divide this integer by 100 to obtain the percentage.

Range0 <= value <= 10000
tip_account_count*integer

Total assigned vanity tip accounts, including pending accounts.

Range0 <= value <= 9007199254740991
live_tip_account_count*integer

Live vanity tip accounts. Customer-key creation requires live accounts.

Range0 <= value <= 9007199254740991
domain_counts*
Example request
// 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(())
}
Example response
{
  "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
  }
}