> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkCreateBillableItems

# Package: getPaid

# Namespace: BillableItems

# Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/billable-items/bulk-create-billable-items.md

## Permission Scopes:
Manage Billable Items: SCOPE.BILLABLE_ITEMS.MANAGE-BILLABLE-ITEMS

## Introduction

Create multiple billable items.

---

## REST API

### Schema

```
 Method: bulkCreateBillableItems
 Description: Create multiple billable items.
 URL: https://www.wixapis.com/billable-items/v1/bulk/billable-items/create
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  billableItems
 Method parameters: 
   param name: billableItems | type: array<billableItems> | description: List of billable items to create. | required: true | validation: minItems 1, maxItems 100
              - name: name | type: string | description: Billable item name, for display on invoices.  | validation: minLength 1, maxLength 200
              - name: description | type: string | description: Detailed description of the billable item. Provides additional information about the product or service.  | validation: minLength 1, maxLength 600
              - name: price | type: string | description: Price of the billable item in decimal format with up to 4 decimal places. Represents the base cost before taxes are applied. This is a required field when creating a new billable item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
              - name: taxGroupId | type: string | description: Reference to a tax group that defines the tax rules applicable to this billable item. Use the Tax Groups API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/billing/tax-groups/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/introduction.md)) to retrieve available tax groups for the business. The tax group determines how taxes are calculated when this item is added to an invoice. If not specified, the default tax rules for the business will apply.  | validation: format GUID
              - name: image | type: Image | description: Billable item image, stored in the Wix Media Manager. Upload an image with the Media Manager API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/introduction.md) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)) or the site dashboard before associating it to a billable item.  
                 - name: id | type: string | description: WixMedia image GUID.  
                 - name: url | type: string | description: Image URL.  
                 - name: altText | type: string | description: Image alt text.  
              - name: extendedFields | type: ExtendedFields | description: Custom field data for the billable item. Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
                 - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
              - name: tags | type: Tags | description: Tags.  
                 - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
                    - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
                 - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
   param name: returnEntity | type: returnEntity | description: Whether to return the created billable items in the response.  
 Return type: BulkCreateBillableItemsResponse
  - name: results | type: array<BulkBillableItemResult> | description: List of billable items create operation results including metadata.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Billable item's create operation metadata.  
        - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: BillableItem | description: Created billable item if `returnEntity` was set `true` in the request.  
        - name: id | type: string | description: Billable item GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the billable item is updated. To prevent conflicting changes, the current revision must be passed when updating the billable item.  Ignored when creating a billable item.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the billable item was created.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the billable item was last updated.  | read-only: true | validation: format date-time
        - name: name | type: string | description: Billable item name, for display on invoices.  | validation: minLength 1, maxLength 200
        - name: description | type: string | description: Detailed description of the billable item. Provides additional information about the product or service.  | validation: minLength 1, maxLength 600
        - name: price | type: string | description: Price of the billable item in decimal format with up to 4 decimal places. Represents the base cost before taxes are applied. This is a required field when creating a new billable item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: taxGroupId | type: string | description: Reference to a tax group that defines the tax rules applicable to this billable item. Use the Tax Groups API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/billing/tax-groups/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/introduction.md)) to retrieve available tax groups for the business. The tax group determines how taxes are calculated when this item is added to an invoice. If not specified, the default tax rules for the business will apply.  | validation: format GUID
        - name: image | type: Image | description: Billable item image, stored in the Wix Media Manager. Upload an image with the Media Manager API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/introduction.md) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)) or the site dashboard before associating it to a billable item.  
           - name: id | type: string | description: WixMedia image GUID.  
           - name: url | type: string | description: Image URL.  
           - name: height | type: integer | description: Original image height.  | read-only: true 
           - name: width | type: integer | description: Original image width.  | read-only: true 
           - name: altText | type: string | description: Image alt text.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the billable item. Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Tags.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
           - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk create operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Bulk Create Billable Items
Creates multiple Billable Items

```curl
curl -X POST \
  'https://www.wixapis.com/billable-items/v1/bulk/billable-items/create' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "billableItems": [
    {
      "name": "Premium Consultation",
      "description": "One hour consultation session with a senior expert",
      "price": "99.99",
      "taxGroupId": "b52a5d5c-f8f5-4e6c-a856-66578913921a",
      "image": {
        "id": "media/12345",
        "url": "https://static.wixstatic.com/media/12345.jpg",
        "height": 600,
        "width": 800,
        "altText": "Premium Consultation Service"
      },
      "tags": {
        "tags": {
          "tagIds": ["consulting", "premium"]
        }
      }
    },
    {
      "name": "Website Audit",
      "description": "Comprehensive website performance and SEO audit",
      "price": "79.99",
      "taxGroupId": "b52a5d5c-f8f5-4e6c-a856-66578913921a",
      "tags": {
        "tags": {
          "tagIds": ["audit", "premium"]
        }
      }
    }
  ]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.getPaid.billableItems.bulkCreateBillableItems(billableItems, options)
 Description: Create multiple billable items.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  billableItems
 Method parameters: 
   param name: billableItems | type: array<BillableItem> | description: List of billable items to create. | required: true | validation: minItems 1, maxItems 100
              - name: name | type: string | description: Billable item name, for display on invoices.  | validation: minLength 1, maxLength 200
              - name: description | type: string | description: Detailed description of the billable item. Provides additional information about the product or service.  | validation: minLength 1, maxLength 600
              - name: price | type: string | description: Price of the billable item in decimal format with up to 4 decimal places. Represents the base cost before taxes are applied. This is a required field when creating a new billable item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
              - name: taxGroupId | type: string | description: Reference to a tax group that defines the tax rules applicable to this billable item. Use the Tax Groups API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/billing/tax-groups/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/introduction.md)) to retrieve available tax groups for the business. The tax group determines how taxes are calculated when this item is added to an invoice. If not specified, the default tax rules for the business will apply.  | validation: format GUID
              - name: image | type: string | description: Billable item image, stored in the Wix Media Manager. Upload an image with the Media Manager API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/introduction.md) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)) or the site dashboard before associating it to a billable item.  
              - name: extendedFields | type: ExtendedFields | description: Custom field data for the billable item. Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
                 - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
              - name: tags | type: Tags | description: Tags.  
                 - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
                    - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
                 - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
   param name: options | type: BulkCreateBillableItemsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the created billable items in the response.  
 Return type: PROMISE<BulkCreateBillableItemsResponse>
  - name: results | type: array<BulkBillableItemResult> | description: List of billable items create operation results including metadata.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Billable item's create operation metadata.  
        - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: BillableItem | description: Created billable item if `returnEntity` was set `true` in the request.  
        - name: _id | type: string | description: Billable item GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the billable item is updated. To prevent conflicting changes, the current revision must be passed when updating the billable item.  Ignored when creating a billable item.  | read-only: true | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the billable item was created.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the billable item was last updated.  | read-only: true 
        - name: name | type: string | description: Billable item name, for display on invoices.  | validation: minLength 1, maxLength 200
        - name: description | type: string | description: Detailed description of the billable item. Provides additional information about the product or service.  | validation: minLength 1, maxLength 600
        - name: price | type: string | description: Price of the billable item in decimal format with up to 4 decimal places. Represents the base cost before taxes are applied. This is a required field when creating a new billable item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: taxGroupId | type: string | description: Reference to a tax group that defines the tax rules applicable to this billable item. Use the Tax Groups API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/billing/tax-groups/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/introduction.md)) to retrieve available tax groups for the business. The tax group determines how taxes are calculated when this item is added to an invoice. If not specified, the default tax rules for the business will apply.  | validation: format GUID
        - name: image | type: string | description: Billable item image, stored in the Wix Media Manager. Upload an image with the Media Manager API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/introduction.md) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)) or the site dashboard before associating it to a billable item.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the billable item. Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Tags.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
           - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk create operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### bulkCreateBillableItems
```javascript
import { billableItems } from '@wix/get-paid';

async function bulkCreateBillableItems(billableItems,options) {
  const response = await billableItems.bulkCreateBillableItems(billableItems,options);
};
```

### bulkCreateBillableItems (with elevated permissions)
```javascript
import { billableItems } from '@wix/get-paid';
import { auth } from '@wix/essentials';

async function myBulkCreateBillableItemsMethod(billableItems,options) {
  const elevatedBulkCreateBillableItems = auth.elevate(billableItems.bulkCreateBillableItems);
  const response = await elevatedBulkCreateBillableItems(billableItems,options);
}
```

### bulkCreateBillableItems (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { billableItems } from '@wix/get-paid';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { billableItems },
  // Include the auth strategy and host as relevant
});


async function bulkCreateBillableItems(billableItems,options) {
  const response = await myWixClient.billableItems.bulkCreateBillableItems(billableItems,options);
};
```

---