# Capability Requests ## Request a capability `embed.accounts.capability_requests.create(straccount_id, CapabilityRequestCreateParams**kwargs) -> CapabilityRequestPagedV1` **post** `/v1/accounts/{account_id}/capability_requests` Submits a request to enable a specific capability for an account. Use this endpoint to request additional features or services for an account. ### Parameters - `account_id: str` - `businesses: Optional[Businesses]` Allows the account to accept payments from businesses. - `enable: bool` - `charges: Optional[Charges]` The charges capability settings for the account. - `daily_amount: float` The maximum dollar amount of charges in a calendar day. - `enable: bool` Determines whether `charges` are enabled for the account. - `max_amount: float` The maximum amount of a single charge. - `monthly_amount: float` The maximum dollar amount of charges in a calendar month. - `monthly_count: int` The maximum number of charges in a calendar month. - `individuals: Optional[Individuals]` Allows the account to accept payments from individuals. - `enable: bool` - `internet: Optional[Internet]` Allows the account to accept payments authorized via the internet or mobile applications. - `enable: bool` - `payouts: Optional[Payouts]` The payouts capability settings for the account. - `daily_amount: float` The maximum dollar amount of payouts in a day. - `enable: bool` Determines whether `payouts` are enabled for the account. - `max_amount: float` The maximum amount of a single payout. - `monthly_amount: float` The maximum dollar amount of payouts in a month. - `monthly_count: int` The maximum number of payouts in a month. - `signed_agreement: Optional[SignedAgreement]` Allows the account to accept payments authorized by signed agreements or contracts. - `enable: bool` - `correlation_id: Optional[str]` - `idempotency_key: Optional[str]` - `request_id: Optional[str]` ### Returns - `class CapabilityRequestPagedV1: …` - `data: List[Data]` - `id: str` Unique identifier for the capability request. - `account_id: str` The unique identifier of the account associated with this capability request. - `category: Literal["payment_type", "customer_type", "consent_type"]` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: datetime` Timestamp of when the capability request was created. - `enable: bool` Whether this capability request is to enable or disable the capability. - `status: Literal["active", "inactive", "in_review", 3 more]` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: Literal["charges", "payouts", "individuals", 3 more]` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: datetime` Timestamp of the most recent update to the capability request. - `settings: Optional[Dict[str, object]]` Any specific settings or configurations related to the requested capability. - `meta: PagedResponseMetadata` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: str` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: datetime` Timestamp for this API request, useful for troubleshooting. - `max_page_size: int` Maximum allowed page size for this endpoint. - `page_number: int` Page number for paginated results. - `page_size: int` Number of items per page in this response. - `sort_by: str` The field that the results were sorted by. - `sort_order: Literal["asc", "desc"]` - `"asc"` - `"desc"` - `total_items: int` Total number of items returned in this response. - `total_pages: int` The number of pages available. - `response_type: Literal["object", "array", "error", "none"]` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```python import os from straddle import Straddle client = Straddle( api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted ) capability_request_paged_v1 = client.embed.accounts.capability_requests.create( account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(capability_request_paged_v1.data) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## List capability requests `embed.accounts.capability_requests.list(straccount_id, CapabilityRequestListParams**kwargs) -> SyncPageNumberSchema[Data]` **get** `/v1/accounts/{account_id}/capability_requests` Retrieves a list of capability requests associated with an account. The requests are returned sorted by creation date, with the most recent requests appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `account_id: str` - `category: Optional[Literal["payment_type", "customer_type", "consent_type"]]` Filter capability requests by category. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `page_number: Optional[int]` Results page number. Starts at page 1. - `page_size: Optional[int]` Page size.Max value: 1000 - `sort_by: Optional[str]` Sort By. - `sort_order: Optional[Literal["asc", "desc"]]` Sort Order. - `"asc"` - `"desc"` - `status: Optional[Literal["active", "inactive", "in_review", "rejected"]]` Filter capability requests by their current status. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `type: Optional[Literal["charges", "payouts", "individuals", 3 more]]` Filter capability requests by the specific type of capability. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `correlation_id: Optional[str]` - `request_id: Optional[str]` ### Returns - `Data` - `id: str` Unique identifier for the capability request. - `account_id: str` The unique identifier of the account associated with this capability request. - `category: Literal["payment_type", "customer_type", "consent_type"]` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: datetime` Timestamp of when the capability request was created. - `enable: bool` Whether this capability request is to enable or disable the capability. - `status: Literal["active", "inactive", "in_review", 3 more]` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: Literal["charges", "payouts", "individuals", 3 more]` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: datetime` Timestamp of the most recent update to the capability request. - `settings: Optional[Dict[str, object]]` Any specific settings or configurations related to the requested capability. ### Example ```python import os from straddle import Straddle client = Straddle( api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted ) page = client.embed.accounts.capability_requests.list( account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) page = page.data[0] print(page.id) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Domain Types ### Capability Request Paged V1 - `class CapabilityRequestPagedV1: …` - `data: List[Data]` - `id: str` Unique identifier for the capability request. - `account_id: str` The unique identifier of the account associated with this capability request. - `category: Literal["payment_type", "customer_type", "consent_type"]` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: datetime` Timestamp of when the capability request was created. - `enable: bool` Whether this capability request is to enable or disable the capability. - `status: Literal["active", "inactive", "in_review", 3 more]` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: Literal["charges", "payouts", "individuals", 3 more]` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: datetime` Timestamp of the most recent update to the capability request. - `settings: Optional[Dict[str, object]]` Any specific settings or configurations related to the requested capability. - `meta: PagedResponseMetadata` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: str` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: datetime` Timestamp for this API request, useful for troubleshooting. - `max_page_size: int` Maximum allowed page size for this endpoint. - `page_number: int` Page number for paginated results. - `page_size: int` Number of items per page in this response. - `sort_by: str` The field that the results were sorted by. - `sort_order: Literal["asc", "desc"]` - `"asc"` - `"desc"` - `total_items: int` Total number of items returned in this response. - `total_pages: int` The number of pages available. - `response_type: Literal["object", "array", "error", "none"]` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `"object"` - `"array"` - `"error"` - `"none"`