get-bank-account-detail
Method: GET
Path: /customers/{customer_id}/bank-accounts/{account_id}
Tags: Bank accounts
Summary
Retrieve a bank account
Description
Retrieve a specific bank account for a customer. Returns a CustomerBankAccount object. Requires a signed-in customer session.
Storefront SDK Usage
SDK Method: sdk.customer.getBankAccount()
Example:
typescript
const { data, error } = await sdk.customer.getBankAccount({
account_id: "acct_789"
});
if (error) {
console.error("Failed to get bank account:", error);
return;
}
console.log("Bank account:", data.bank_account);TypeScript Definition
typescript
"get-bank-account-detail": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Bank account id */
account_id: string;
/** @description Customer id */
customer_id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
bank_account: components["schemas"]["CustomerBankAccount"];
};
};
};
};
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CustomerBankAccount"] | CustomerBankAccount |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Responses
200
OK
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
404
Requested resource not found
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
json
{
"tags": [
"Bank accounts"
],
"operationId": "get-bank-account-detail",
"summary": "Retrieve a bank account",
"description": "Retrieve a specific bank account for a customer. Returns a `CustomerBankAccount` object. Requires a signed-in customer session.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/get-bank-account-detail",
"description": "API reference for the get-bank-account-detail operation"
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"bank_account": {
"$ref": "#/components/schemas/CustomerBankAccount"
}
},
"required": [
"bank_account"
],
"type": "object"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "customers",
"x-speakeasy-ignore": false,
"x-speakeasy-name-override": "getBankAccountDetail"
}Auto-generated from OpenAPI spec and TypeScript definitions