Astrada TypeScript SDK
    Preparing search index...

    Class CardApi

    Hierarchy (View Summary)

    Index
    configuration: Configuration
    middleware: Middleware[]

    The middleware of this instance; protected so hand-written subclasses can pass it on.

    • Returns detailed information about a specific card by its identifier. Add expand=cardholder to embed the cardholder under _embedded in the same response instead of calling GET /cards/{cardId}/cardholder separately. The embedded body is the exact body that endpoint serves and requires its cardholder:read scope. Retrieve card

      Parameters

      Returns Promise<Card>

    • Returns the card's current cardholder information. Answers 404 when the card has no cardholder. For the company and legal entity the card belonged to at the time of a given transaction, use expand=cardholder on that transaction instead: GET /transactions/{transactionId}?expand=cardholder. Retrieve cardholder information

      Parameters

      Returns Promise<Cardholder>

    • Returns detailed information about a specific card by its identifier. Add expand=cardholder to embed the cardholder under _embedded in the same response instead of calling GET /cards/{cardId}/cardholder separately. The embedded body is the exact body that endpoint serves and requires its cardholder:read scope. Retrieve card

      Parameters

      Returns Promise<ApiResponse<Card>>

    • Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json

      Parameters

      • mime: string

        MIME (Multipurpose Internet Mail Extensions)

      Returns boolean

      True if the given MIME is JSON, false otherwise.

    • Returns a list of all cards linked to the account. By default, GET /cards returns cards ordered by the latest updatedAt. You can combine the different filters as documented. Use networkBulkFeedId to filter the list to cards enrolled through a given network bulk feed. An unknown feed id returns an empty page. It combines with expand=cardholder. Use expand=cardholder to embed each card's cardholder under _embedded in the same response instead of calling GET /cards/{cardId}/cardholder per item. The embedded body is the exact body that endpoint serves and requires its cardholder:read scope. Pagination links preserve expand like any other parameter. This endpoint supports offset-based pagination. List cards

      Parameters

      Returns Promise<CardList>

    • Returns a list of all cards linked to the account. By default, GET /cards returns cards ordered by the latest updatedAt. You can combine the different filters as documented. Use networkBulkFeedId to filter the list to cards enrolled through a given network bulk feed. An unknown feed id returns an empty page. It combines with expand=cardholder. Use expand=cardholder to embed each card's cardholder under _embedded in the same response instead of calling GET /cards/{cardId}/cardholder per item. The embedded body is the exact body that endpoint serves and requires its cardholder:read scope. Pagination links preserve expand like any other parameter. This endpoint supports offset-based pagination. List cards

      Parameters

      Returns Promise<ApiResponse<CardList>>

    • Sends the request. Network errors and timeouts (while waiting for the answer or reading its body), 408, 429 and 5xx are retried for idempotent methods (see ConfigurationParameters.maxRetries). A 401 is retried once with a new token. Any other status outside 200 to 299 throws a ResponseError subclass. The body is read here, whole.

      Parameters

      Returns Promise<Response>

    • Updates cardholder information for a specific card. Use this endpoint to simulate cardholder data that would typically be received through a Network Bulk Feed. This is useful for testing your integration against bulk-enrolled cards without waiting for actual network feed data. Note: This endpoint requires the cardholder:write scope and must be directly enabled by Astrada. Update cardholder information

      Parameters

      Returns Promise<Cardholder>

    • Updates cardholder information for a specific card. Use this endpoint to simulate cardholder data that would typically be received through a Network Bulk Feed. This is useful for testing your integration against bulk-enrolled cards without waiting for actual network feed data. Note: This endpoint requires the cardholder:write scope and must be directly enabled by Astrada. Update cardholder information

      Parameters

      Returns Promise<ApiResponse<Cardholder>>