latestOpenAPI 3.0.32026-08-083681145.6 KB

19558399745c

Products
Prepacks

POST /products/{product_id}/prepacks

Creates a prepack for a product.

post/products/{product_id}/prepacks

Path parameters

product_idstring required

Request body

idstring

Read-only. A unique identifier of the prepack, beginning with "pc_".

idempotence_tokenstring

The identifier used for idempotence when this prepack was created.

created_atstring

Read-only. An ISO 8601 timestamp of when the prepack was created.

updated_atstring

Read-only. An ISO 8601 timestamp of when the prepack was most recently updated.

namestring

The name of the prepack.

descriptionstring

A description of the prepack. The description is determined by the quantities and sizes of prepack items.

lifecycle_state'DRAFT' | 'PUBLISHED' | 'UNPUBLISHED'

The current stage in the lifecycle of a product on Faire.

Example request

{
  "id": "pc_xyz789",
  "idempotence_token": "prepack_abc123",
  "created_at": "2019-03-14T00:09:15.000Z",
  "updated_at": "2019-03-15T00:09:15.000Z",
  "name": "Assorted Sizes Pack",
  "description": "Pack includes 2 Small, 3 Medium, 2 Large",
  "items": [
    {
      "id": "pci_abc456",
      "created_at": "2019-03-14T00:09:15.000Z",
      "updated_at": "2019-03-15T00:09:15.000Z",
      "variant_id": "po_3745tjzrpc",
      "quantity": 3
    }
  ]
}

Response

Successful response

idstring

Read-only. A unique identifier of the prepack, beginning with "pc_".

idempotence_tokenstring

The identifier used for idempotence when this prepack was created.

created_atstring

Read-only. An ISO 8601 timestamp of when the prepack was created.

updated_atstring

Read-only. An ISO 8601 timestamp of when the prepack was most recently updated.

namestring

The name of the prepack.

descriptionstring

A description of the prepack. The description is determined by the quantities and sizes of prepack items.

lifecycle_state'DRAFT' | 'PUBLISHED' | 'UNPUBLISHED'

The current stage in the lifecycle of a product on Faire.

Example response

{
  "id": "pc_xyz789",
  "idempotence_token": "prepack_abc123",
  "created_at": "2019-03-14T00:09:15.000Z",
  "updated_at": "2019-03-15T00:09:15.000Z",
  "name": "Assorted Sizes Pack",
  "description": "Pack includes 2 Small, 3 Medium, 2 Large",
  "items": [
    {
      "id": "pci_abc456",
      "created_at": "2019-03-14T00:09:15.000Z",
      "updated_at": "2019-03-15T00:09:15.000Z",
      "variant_id": "po_3745tjzrpc",
      "quantity": 3
    }
  ]
}