# Express ## Create `express.create(ExpressCreateParams**kwargs) -> ExpressCreateResponse` **post** `/v1/express` Creates a new customer with a unique identifier and name. Customers can be used to group and manage users, studies, and access permissions across the Avara platform. ### Parameters - `express_customer_name: str` Name of the Express customer to create - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs ### Returns - `class ExpressCreateResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) express = client.express.create( express_customer_name="City Medical Center - Radiology Department", ) print(express.created_at) ``` ## List `express.list(ExpressListParams**kwargs) -> SyncCursorExpressCustomers[ExpressListResponse]` **get** `/v1/express` Retrieves a paginated list of customers with optional filtering by name. Returns up to 100 customers per request. ### Parameters - `cursor: Optional[str]` Base64 encoded cursor from previous response - `limit: Optional[float]` Number of results to return (1-100) ### Returns - `class ExpressListResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) page = client.express.list() page = page.express_customers[0] print(page.created_at) ``` ## Retrieve `express.retrieve(strexpress_customer_id) -> ExpressRetrieveResponse` **get** `/v1/express/{expressCustomerId}` Retrieves a single customer by its unique customer ID. Returns the complete customer object with name, status, and timestamps. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressRetrieveResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) express = client.express.retrieve( "cus_1234567890abcdef1234567890abcdef", ) print(express.created_at) ``` ## Update `express.update(strexpress_customer_id, ExpressUpdateParams**kwargs) -> ExpressUpdateResponse` **patch** `/v1/express/{expressCustomerId}` Updates a customer's properties such as name or other metadata. All fields are optional - only provided fields will be updated. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: Optional[str]` Updated name for the Express customer - `metadata: Optional[Dict[str, str]]` Updated metadata. Pass null to clear all metadata ### Returns - `class ExpressUpdateResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) express = client.express.update( express_customer_id="cus_1234567890abcdef1234567890abcdef", ) print(express.created_at) ``` ## Deactivate `express.deactivate(strexpress_customer_id) -> ExpressDeactivateResponse` **post** `/v1/express/{expressCustomerId}/deactivate` Deactivates a customer, preventing it from being used for new studies or user assignments. Existing data is preserved and the customer can be reactivated later. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressDeactivateResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) response = client.express.deactivate( "cus_1234567890abcdef1234567890abcdef", ) print(response.created_at) ``` ## Reactivate `express.reactivate(strexpress_customer_id) -> ExpressReactivateResponse` **post** `/v1/express/{expressCustomerId}/reactivate` Restores a deactivated customer to active status, allowing it to be used for new studies and user assignments again. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressReactivateResponse: …` An Express customer entity that groups users and studies - `created_at: Optional[datetime]` Timestamp when the Express customer was created - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `express_customer_name: str` Name of the Express customer - `is_active: bool` Whether the Express customer is currently active - `updated_at: Optional[datetime]` Timestamp when the Express customer was last updated - `user_count: int` Number of users currently in this Express customer - `created_by_api_key_id: Optional[str]` UUID of the API key used to create this Express customer, for audit tracking - `created_by_user_id: Optional[str]` User ID who created this Express customer via dashboard, null if created via API key - `metadata: Optional[Dict[str, str]]` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) response = client.express.reactivate( "cus_1234567890abcdef1234567890abcdef", ) print(response.created_at) ``` # Users ## Add `express.users.add(strexpress_customer_id, UserAddParams**kwargs) -> UserAddResponse` **post** `/v1/express/{expressCustomerId}/users` Associates an existing user with a customer, granting them access to customer-specific resources and studies. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `user_id: str` User ID to add to the Express customer. Format: usr_{32-hex-chars} ### Returns - `class UserAddResponse: …` Standard success response with optional message - `success: bool` - `message: Optional[str]` ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) response = client.express.users.add( express_customer_id="cus_1234567890abcdef1234567890abcdef", user_id="usr_1234567890abcdef1234567890abcdef", ) print(response.success) ``` ## Remove `express.users.remove(strexpress_customer_id, UserRemoveParams**kwargs) -> UserRemoveResponse` **delete** `/v1/express/{expressCustomerId}/users` Removes a user's association with a customer, revoking their access to customer-specific resources. The user account remains active but is no longer linked to this customer. ### Parameters - `express_customer_id: str` Unique Express customer identifier. Format: cus_{32-hex-chars} - `user_id: str` User ID to remove from the Express customer. Format: usr_{32-hex-chars} ### Returns - `class UserRemoveResponse: …` Standard success response with optional message - `success: bool` - `message: Optional[str]` ### Example ```python import os from avara import Avara client = Avara( api_key=os.environ.get("AVARA_API_KEY"), # This is the default and can be omitted ) user = client.express.users.remove( express_customer_id="cus_1234567890abcdef1234567890abcdef", user_id="usr_1234567890abcdef1234567890abcdef", ) print(user.success) ```