> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# 建立虛擬卡批次訂單

> 以單一非同步請求發行多張虛擬卡。

```javascript theme={null}
import { GraphQLClient, gql } from 'graphql-request';

const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';

const CREATE_VIRTUAL_CARD_BULK_ORDER = gql`
  mutation CreateVirtualCardBulkOrder {
    createVirtualCardBulkOrder(
      input: {
        offerId: "592c394e-26cc-44ac-a145-a5f81301fe77"
        orderItems: [
          {
            quantity: 3
            spendLimit: 100
            spendLimitDuration: DAILY
            lockCardNextUse: true
            cardNickname: "Team card"
            primaryFundingSource: FLUZ_BALANCE
          }
        ]
      }
    ) {
      orderId
      orderStatus
    }
  }
`;

const client = new GraphQLClient(API_URL, {
  headers: {
    Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
    'Content-Type': 'application/json',
  },
});

const response = await client.request(CREATE_VIRTUAL_CARD_BULK_ORDER);
console.log(response);
```

使用回傳的 `orderId` 輪詢 `getVirtualCardBulkOrderStatus` 以取得已建立的卡片。
