---
title: "POST /products/{product_id}/prepacks/batch"
method: POST
path: "/products/{product_id}/prepacks/batch"
tags: ["Products", "Prepacks"]
---

# POST /products/{product_id}/prepacks/batch

`POST /products/{product_id}/prepacks/batch`

## Request

- Base URL: `https://www.faire.com/external-api/v2`
- URL: `https://www.faire.com/external-api/v2/products/{product_id}/prepacks/batch`
- Auth: API key in header `X-FAIRE-OAUTH-ACCESS-TOKEN` and API key in header `X-FAIRE-APP-CREDENTIALS`
- TypeScript: <https://skmtc.dev/faire/apis/faire-external-api/docs/products/:product_id/prepacks/batch/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates multiple prepacks for a product in a single request.

## Path parameters

- `product_id` string, required

## Request body

- CreateExternalPrepacksRequestV2: Request to create one or more prepacks (multi-item packages sold as a unit).
  - `prepacks` ExternalPrepackV2[]: A list of prepacks to create.
    - `id` string: Read-only. A unique identifier of the prepack, beginning with "pc_".
    - `idempotence_token` string: The identifier used for idempotence when this prepack was created.
    - `created_at` string: Read-only. An ISO 8601 timestamp of when the prepack was created.
    - `updated_at` string: Read-only. An ISO 8601 timestamp of when the prepack was most recently updated.
    - `name` string: The name of the prepack.
    - `description` string: A description of the prepack. The description is determined by the quantities and sizes of prepack items.
    - `items` ExternalPrepackItemV2[]: A list of prepack items that belong to this prepack.
      - `id` string: Read-only. A unique identifier of the prepack item, beginning with "pci_".
      - `created_at` string: Read-only. An ISO 8601 timestamp of when the item was created.
      - `updated_at` string: Read-only. An ISO 8601 timestamp of when the item was most recently updated.
      - `variant_id` string: The identifier of the variant for this prepack item.
      - `quantity` integer: The number of prepack items included in the prepack.
    - `lifecycle_state` 'DRAFT' | 'PUBLISHED' | 'UNPUBLISHED': The current stage in the lifecycle of a product on Faire.

## Response `200`

Successful response

- CreateExternalPrepacksResponseV2: Response containing the created prepacks with their assigned IDs.
  - `prepacks` ExternalPrepackV2[]: The list of created prepacks.
    - `id` string: Read-only. A unique identifier of the prepack, beginning with "pc_".
    - `idempotence_token` string: The identifier used for idempotence when this prepack was created.
    - `created_at` string: Read-only. An ISO 8601 timestamp of when the prepack was created.
    - `updated_at` string: Read-only. An ISO 8601 timestamp of when the prepack was most recently updated.
    - `name` string: The name of the prepack.
    - `description` string: A description of the prepack. The description is determined by the quantities and sizes of prepack items.
    - `items` ExternalPrepackItemV2[]: A list of prepack items that belong to this prepack.
      - `id` string: Read-only. A unique identifier of the prepack item, beginning with "pci_".
      - `created_at` string: Read-only. An ISO 8601 timestamp of when the item was created.
      - `updated_at` string: Read-only. An ISO 8601 timestamp of when the item was most recently updated.
      - `variant_id` string: The identifier of the variant for this prepack item.
      - `quantity` integer: The number of prepack items included in the prepack.
    - `lifecycle_state` 'DRAFT' | 'PUBLISHED' | 'UNPUBLISHED': The current stage in the lifecycle of a product on Faire.

## Other responses

- `400`: Bad Request -- Your request is invalid.
- `401`: Unauthorized -- Your API key is wrong.
- `404`: Not found -- The requested resource could not be found.
- `405`: Method Not Allowed -- You tried to access an entity with an invalid method.
- `429`: Too Many Requests.
- `500`: Internal Server Error -- We had a problem with our server. Try again later.
- `503`: Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

---

[API](https://skmtc.dev/faire/apis/faire-external-api.md) - [All operations](https://skmtc.dev/faire/apis/faire-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/faire/apis/faire-external-api/revisions/19558399745c?raw)
