Customers
Create and manage Express customers — one tenant per site you sell AutoScribe or Viewer to.
Each tenant you sell to is an Express customer (cus_…). Create them in the dashboard or with the SDK. Isolation is described on Isolation.
Via dashboard
Section titled “Via dashboard”- Open Express Customers.
- Click Create Customer.
- Enter a name. Optionally add metadata.
- Click Create.
The customer is created immediately with an Express Customer ID.
Create
Section titled “Create”TypeScript
Section titled “TypeScript”import Avara from "avara";
const client = new Avara({ apiKey: process.env.AVARA_API_KEY,});
const customer = await client.express.create({ expressCustomerName: "City Medical Center", metadata: { region: "northeast", },});Python
Section titled “Python”import osfrom avara import Avara
client = Avara( api_key=os.environ.get("AVARA_API_KEY"),)customer = client.express.create( express_customer_name="City Medical Center", metadata={ "region": "northeast", },)package com.avara.example;
import com.avara.client.AvaraClient;import com.avara.client.okhttp.AvaraOkHttpClient;import com.avara.models.express.ExpressCreateParams;import com.avara.models.express.ExpressCreateResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv();
ExpressCreateParams params = ExpressCreateParams.builder() .expressCustomerName("City Medical Center") .metadata(Map.of("region", "northeast")) .build(); ExpressCreateResponse customer = client.express().create(params); }}using Avara;using Avara.Models.Express;
var client = new AvaraClient();
var customer = await client.Express.Create(new ExpressCreateParams{ ExpressCustomerName = "City Medical Center", Metadata = new Dictionary<string, string> { ["region"] = "northeast", },});TypeScript
Section titled “TypeScript”const page = await client.express.list({ limit: 20 });
for (const customer of page.data) { console.log(customer.expressCustomerId, customer.expressCustomerName);}Python
Section titled “Python”page = client.express.list(limit=20)
for customer in page.data: print(customer.express_customer_id, customer.express_customer_name)ExpressListPage page = client.express().list( ExpressListParams.builder().limit(20).build());
for (ExpressCustomer customer : page.data()) { System.out.println(customer.getExpressCustomerId() + " " + customer.getExpressCustomerName());}var page = await client.Express.List(new ExpressListParams { Limit = 20 });
foreach (var customer in page.Data){ Console.WriteLine($"{customer.ExpressCustomerId} {customer.ExpressCustomerName}");}Retrieve
Section titled “Retrieve”TypeScript
Section titled “TypeScript”const customer = await client.express.retrieve( "cus_1234567890abcdef1234567890abcdef");Python
Section titled “Python”customer = client.express.retrieve( "cus_1234567890abcdef1234567890abcdef")ExpressCustomer customer = client.express().retrieve( "cus_1234567890abcdef1234567890abcdef");var customer = await client.Express.Retrieve( "cus_1234567890abcdef1234567890abcdef");Update
Section titled “Update”TypeScript
Section titled “TypeScript”const updated = await client.express.update( "cus_1234567890abcdef1234567890abcdef", { expressCustomerName: "City Medical Center — North", metadata: { region: "northeast", wing: "Building A" }, });Python
Section titled “Python”updated = client.express.update( "cus_1234567890abcdef1234567890abcdef", express_customer_name="City Medical Center — North", metadata={"region": "northeast", "wing": "Building A"},)ExpressUpdateParams params = ExpressUpdateParams.builder() .expressCustomerName("City Medical Center — North") .metadata(Map.of("region", "northeast", "wing", "Building A")) .build();ExpressCustomer updated = client.express().update( "cus_1234567890abcdef1234567890abcdef", params);var updated = await client.Express.Update( "cus_1234567890abcdef1234567890abcdef", new ExpressUpdateParams { ExpressCustomerName = "City Medical Center — North", Metadata = new Dictionary<string, string> { ["region"] = "northeast", ["wing"] = "Building A", }, });Deactivate
Section titled “Deactivate”TypeScript
Section titled “TypeScript”const deactivated = await client.express.deactivate( "cus_1234567890abcdef1234567890abcdef");Python
Section titled “Python”deactivated = client.express.deactivate( "cus_1234567890abcdef1234567890abcdef")ExpressCustomer deactivated = client.express().deactivate( "cus_1234567890abcdef1234567890abcdef");var deactivated = await client.Express.Deactivate( "cus_1234567890abcdef1234567890abcdef");Reactivate
Section titled “Reactivate”TypeScript
Section titled “TypeScript”const reactivated = await client.express.reactivate( "cus_1234567890abcdef1234567890abcdef");Python
Section titled “Python”reactivated = client.express.reactivate( "cus_1234567890abcdef1234567890abcdef")ExpressCustomer reactivated = client.express().reactivate( "cus_1234567890abcdef1234567890abcdef");var reactivated = await client.Express.Reactivate( "cus_1234567890abcdef1234567890abcdef");For every field on these calls, see the API Reference.