Astrada TypeScript SDK
    Preparing search index...

    Class NetworkBulkEnrollmentsApi

    Hierarchy (View Summary)

    Index
    configuration: Configuration
    middleware: Middleware[]

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

    • Asks Astrada to confirm that a card program can join a network bulk feed. Astrada checks with the issuing bank and the network by hand, then emails the card program admin with the answer. Unlike POST /network-bulk-enrollments, this is not a kickoff: it does not start outreach to the bank and can never be linked to a feed. A validation failure or an unknown subaccount answers 400, as for the kickoff. A program has one open confirmation request at a time. A program is the calling account, the subaccountId, the network and the bin. Every stored request is open for 30 days from its createdAt, as nothing closes a request yet. When the program already has an open request that another request wrote, this request stores nothing and answers 200 with that request's summary (alreadyOpen: true), whatever new requestId it sent. No second request reaches Astrada. Two requests for one program sent at the same time store one request between them. Once a request is 30 days old it stops holding its program: nothing is written to it, and the next request for the program is stored with 201 and reaches Astrada again. The route answers these errors as application/problem+json, with title and detail: | Status | When | detail | | --- | --- | --- | | 400 | The body does not pass validation. errors lists each field that failed. | Request parameters are invalid | | 400 | subaccountId is not a subaccount of the calling account. | The subaccount {subaccountId} was not found | | 403 | The token holds neither network-bulk-enrollments:write nor network-bulk-feeds:write. | You do not have permission to access the requested resource | | 500 | The request could not be completed. | An unexpected error occurred or The server encountered an unexpected condition that prevented it from fulfilling the request | Create network bulk confirmation

      Parameters

      Returns Promise<NetworkBulkConfirmationCreateResult>

    • Asks Astrada to confirm that a card program can join a network bulk feed. Astrada checks with the issuing bank and the network by hand, then emails the card program admin with the answer. Unlike POST /network-bulk-enrollments, this is not a kickoff: it does not start outreach to the bank and can never be linked to a feed. A validation failure or an unknown subaccount answers 400, as for the kickoff. A program has one open confirmation request at a time. A program is the calling account, the subaccountId, the network and the bin. Every stored request is open for 30 days from its createdAt, as nothing closes a request yet. When the program already has an open request that another request wrote, this request stores nothing and answers 200 with that request's summary (alreadyOpen: true), whatever new requestId it sent. No second request reaches Astrada. Two requests for one program sent at the same time store one request between them. Once a request is 30 days old it stops holding its program: nothing is written to it, and the next request for the program is stored with 201 and reaches Astrada again. The route answers these errors as application/problem+json, with title and detail: | Status | When | detail | | --- | --- | --- | | 400 | The body does not pass validation. errors lists each field that failed. | Request parameters are invalid | | 400 | subaccountId is not a subaccount of the calling account. | The subaccount {subaccountId} was not found | | 403 | The token holds neither network-bulk-enrollments:write nor network-bulk-feeds:write. | You do not have permission to access the requested resource | | 500 | The request could not be completed. | An unexpected error occurred or The server encountered an unexpected condition that prevented it from fulfilling the request | Create network bulk confirmation

      Parameters

      Returns Promise<ApiResponse<NetworkBulkConfirmationCreateResult>>

    • Starts a bulk enrollment kickoff for a whole card program. The request records the company, the card program admin, an optional bank contact and program size, and the admin's consent, and Astrada's onboarding team takes it from there with the issuing bank. The Unified Enrollment SDK calls this endpoint when an admin sends the bulk kickoff form (in SDK v1, with bulkFlow: \"kickoff\"); you can also call it directly. Nothing is enrolled yet at this point. Once the bank has issued the network reference, register the feed with POST /network-bulk-feeds and pass this enrollment's id as networkBulkEnrollmentId; the enrollment then moves to feed-created and links to the feed. The subaccount must belong to the calling account. The BIN's bulk eligibility is not re-checked here. A validation failure or an unknown subaccount answers 400. A program has one open kickoff at a time. A program is the calling account, the subaccountId, the network and the first 8 digits of the bin; a bin shorter than 8 digits matches only a kickoff with exactly the same digits. A kickoff is open while it is requested and was created less than 90 days ago, or while it is feed-created and its feed is live (not failed or deactivated, and not deleted), at any age. When the program already has an open kickoff that another request wrote, this request stores no second kickoff and answers 200 with that kickoff's summary (alreadyOpen: true), whatever new requestId it sent, or none. Astrada keeps the card admin named in this request with the open kickoff, so its onboarding team knows who else is waiting, and the open kickoff stays the only one they work on. A repeat of the same requestId is kept once. GET /network-bulk-enrollments/open answers the same question before the form. Two kickoffs for one program sent at the same time store one kickoff between them. The 90 days count from the kickoff's createdAt. Once a requested kickoff is 90 days old it stops holding its program: nothing is written to it, it keeps its state and can still be read, and the next kickoff for the program is created with 201. A cancelled kickoff, or one whose feed failed, was deactivated or was deleted, does not hold its program either. Requires the network-bulk-enrollments:write scope. Tokens that only hold network-bulk-feeds:write are still accepted, so existing integrations keep working. Create network bulk enrollment

      Parameters

      Returns Promise<NetworkBulkEnrollmentCreateResult>

    • Starts a bulk enrollment kickoff for a whole card program. The request records the company, the card program admin, an optional bank contact and program size, and the admin's consent, and Astrada's onboarding team takes it from there with the issuing bank. The Unified Enrollment SDK calls this endpoint when an admin sends the bulk kickoff form (in SDK v1, with bulkFlow: \"kickoff\"); you can also call it directly. Nothing is enrolled yet at this point. Once the bank has issued the network reference, register the feed with POST /network-bulk-feeds and pass this enrollment's id as networkBulkEnrollmentId; the enrollment then moves to feed-created and links to the feed. The subaccount must belong to the calling account. The BIN's bulk eligibility is not re-checked here. A validation failure or an unknown subaccount answers 400. A program has one open kickoff at a time. A program is the calling account, the subaccountId, the network and the first 8 digits of the bin; a bin shorter than 8 digits matches only a kickoff with exactly the same digits. A kickoff is open while it is requested and was created less than 90 days ago, or while it is feed-created and its feed is live (not failed or deactivated, and not deleted), at any age. When the program already has an open kickoff that another request wrote, this request stores no second kickoff and answers 200 with that kickoff's summary (alreadyOpen: true), whatever new requestId it sent, or none. Astrada keeps the card admin named in this request with the open kickoff, so its onboarding team knows who else is waiting, and the open kickoff stays the only one they work on. A repeat of the same requestId is kept once. GET /network-bulk-enrollments/open answers the same question before the form. Two kickoffs for one program sent at the same time store one kickoff between them. The 90 days count from the kickoff's createdAt. Once a requested kickoff is 90 days old it stops holding its program: nothing is written to it, it keeps its state and can still be read, and the next kickoff for the program is created with 201. A cancelled kickoff, or one whose feed failed, was deactivated or was deleted, does not hold its program either. Requires the network-bulk-enrollments:write scope. Tokens that only hold network-bulk-feeds:write are still accepted, so existing integrations keep working. Create network bulk enrollment

      Parameters

      Returns Promise<ApiResponse<NetworkBulkEnrollmentCreateResult>>

    • Answers whether a card program already has an open bulk enrollment kickoff, before anyone fills in the kickoff form. The Unified Enrollment SDK calls it while it looks up a card, and shows "Already under way" instead of the program screen when the program has one; you can also call it directly. A program is the calling account, the subaccountId, the network and the card's first 8 digits (bin). The rule is the one POST /network-bulk-enrollments uses: a kickoff is open while it is requested and was created less than 90 days ago, or while it is feed-created and its feed is live, at any age. The account comes from the token, never from the query. The answer carries only the open kickoff's enrollmentId, state and requestedAt. A bin of more or fewer than 8 digits, a missing or unknown parameter, or an accountId in the query answers 400. Requires the network-bulk-enrollments:write scope, the one the kickoff itself takes. Tokens that only hold network-bulk-feeds:write are also accepted. A token with only a read scope answers 403. Check for an open network bulk enrollment

      Parameters

      Returns Promise<NetworkBulkEnrollmentOpen>

    • Answers whether a card program already has an open bulk enrollment kickoff, before anyone fills in the kickoff form. The Unified Enrollment SDK calls it while it looks up a card, and shows "Already under way" instead of the program screen when the program has one; you can also call it directly. A program is the calling account, the subaccountId, the network and the card's first 8 digits (bin). The rule is the one POST /network-bulk-enrollments uses: a kickoff is open while it is requested and was created less than 90 days ago, or while it is feed-created and its feed is live, at any age. The account comes from the token, never from the query. The answer carries only the open kickoff's enrollmentId, state and requestedAt. A bin of more or fewer than 8 digits, a missing or unknown parameter, or an accountId in the query answers 400. Requires the network-bulk-enrollments:write scope, the one the kickoff itself takes. Tokens that only hold network-bulk-feeds:write are also accepted. A token with only a read scope answers 403. Check for an open network bulk enrollment

      Parameters

      Returns Promise<ApiResponse<NetworkBulkEnrollmentOpen>>

    • 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.

    • 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>