# Express ## Create `ExpressCreateResponse express().create(ExpressCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **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 - `ExpressCreateParams params` - `String expressCustomerName` Name of the Express customer to create - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs ### Returns - `class ExpressCreateResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java 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; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressCreateParams params = ExpressCreateParams.builder() .expressCustomerName("City Medical Center - Radiology Department") .build(); ExpressCreateResponse express = client.express().create(params); } } ``` ## List `ExpressListPage express().list(ExpressListParamsparams = ExpressListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v1/express` Retrieves a paginated list of customers with optional filtering by name. Returns up to 100 customers per request. ### Parameters - `ExpressListParams params` - `Optional cursor` Base64 encoded cursor from previous response - `Optional limit` Number of results to return (1-100) ### Returns - `class ExpressListResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.ExpressListPage; import com.avara.models.express.ExpressListParams; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressListPage page = client.express().list(); } } ``` ## Retrieve `ExpressRetrieveResponse express().retrieve(ExpressRetrieveParamsparams = ExpressRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v1/express/{expressCustomerId}` Retrieves a single customer by its unique customer ID. Returns the complete customer object with name, status, and timestamps. ### Parameters - `ExpressRetrieveParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressRetrieveResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.ExpressRetrieveParams; import com.avara.models.express.ExpressRetrieveResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressRetrieveResponse express = client.express().retrieve("cus_1234567890abcdef1234567890abcdef"); } } ``` ## Update `ExpressUpdateResponse express().update(ExpressUpdateParamsparams = ExpressUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **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 - `ExpressUpdateParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `Optional expressCustomerName` Updated name for the Express customer - `Optional metadata` Updated metadata. Pass null to clear all metadata ### Returns - `class ExpressUpdateResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.ExpressUpdateParams; import com.avara.models.express.ExpressUpdateResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressUpdateResponse express = client.express().update("cus_1234567890abcdef1234567890abcdef"); } } ``` ## Deactivate `ExpressDeactivateResponse express().deactivate(ExpressDeactivateParamsparams = ExpressDeactivateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **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 - `ExpressDeactivateParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressDeactivateResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.ExpressDeactivateParams; import com.avara.models.express.ExpressDeactivateResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressDeactivateResponse response = client.express().deactivate("cus_1234567890abcdef1234567890abcdef"); } } ``` ## Reactivate `ExpressReactivateResponse express().reactivate(ExpressReactivateParamsparams = ExpressReactivateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **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 - `ExpressReactivateParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} ### Returns - `class ExpressReactivateResponse:` An Express customer entity that groups users and studies - `Optional createdAt` Timestamp when the Express customer was created - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `boolean isActive` Whether the Express customer is currently active - `Optional updatedAt` Timestamp when the Express customer was last updated - `long userCount` Number of users currently in this Express customer - `Optional createdByApiKeyId` UUID of the API key used to create this Express customer, for audit tracking - `Optional createdByUserId` User ID who created this Express customer via dashboard, null if created via API key - `Optional metadata` Custom key-value metadata for the Express customer. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.ExpressReactivateParams; import com.avara.models.express.ExpressReactivateResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); ExpressReactivateResponse response = client.express().reactivate("cus_1234567890abcdef1234567890abcdef"); } } ``` # Users ## Add `UserAddResponse express().users().add(UserAddParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v1/express/{expressCustomerId}/users` Associates an existing user with a customer, granting them access to customer-specific resources and studies. ### Parameters - `UserAddParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String userId` User ID to add to the Express customer. Format: usr_{32-hex-chars} ### Returns - `class UserAddResponse:` Standard success response with optional message - `boolean success` - `Optional message` ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.users.UserAddParams; import com.avara.models.express.users.UserAddResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); UserAddParams params = UserAddParams.builder() .expressCustomerId("cus_1234567890abcdef1234567890abcdef") .userId("usr_1234567890abcdef1234567890abcdef") .build(); UserAddResponse response = client.express().users().add(params); } } ``` ## Remove `UserRemoveResponse express().users().remove(UserRemoveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **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 - `UserRemoveParams params` - `Optional expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String userId` User ID to remove from the Express customer. Format: usr_{32-hex-chars} ### Returns - `class UserRemoveResponse:` Standard success response with optional message - `boolean success` - `Optional message` ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.express.users.UserRemoveParams; import com.avara.models.express.users.UserRemoveResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); UserRemoveParams params = UserRemoveParams.builder() .expressCustomerId("cus_1234567890abcdef1234567890abcdef") .userId("usr_1234567890abcdef1234567890abcdef") .build(); UserRemoveResponse user = client.express().users().remove(params); } } ```