Skip to content
Get started

Creates a new product list for a store, optionally including initial line items.

product_lists.create_product_list(strstore_number, ProductListCreateProductListParams**kwargs) -> ProductListCreateProductListResponse
POST/api/v2/public/stores/{store_number}/productlists

Creates a new product list for a store, optionally including initial line items.

ParametersExpand Collapse
store_number: str
product_list_name: str

Name of the product list. Must contain only letters, numbers, spaces, dots, hyphens, or underscores.

minLength1
product_list_type: int

Numeric product list type identifier. Ignored when module_id is supplied; the type is then resolved from the module.

formatint32
app_username: Optional[str]

Name of the app user creating the product list. Defaults to “unknown” when omitted.

free_fields: Optional[Iterable[FreeField]]

Custom free-field key/value pairs to attach to the product list.

key: Optional[str]

Free-field key.

value: Optional[str]

Free-field value.

is_allow_duplicate_products: Optional[bool]

When true (default), duplicate products may appear on multiple lines. When false, lines for the same product are merged and quantities are summed.

lines: Optional[Iterable[Line]]

Initial line items to add to the product list. May be empty; lines may be added later via the line-update endpoint.

product_number: str

Product number identifying which product the line refers to. Unknown product numbers are silently skipped.

minLength1
quantity: float

Quantity for the line. A value of 0 is treated as 1.

formatdouble
barcode: Optional[str]

Ignored on input. The barcode stored on the line is sourced from the product master via product_number. Field retained for backwards compatibility.

module_id: Optional[int]

Optional module identifier. When set, the product list type is resolved from the module’s configured type and product_list_type is ignored.

formatint32
ReturnsExpand Collapse
class ProductListCreateProductListResponse:

Response returned after a product list is created. Contains the identifier of the new list.

product_list_id: int

Identifier of the newly created product list.

formatint64

Creates a new product list for a store, optionally including initial line items.

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.product_lists.create_product_list(
    store_number="store_number",
    product_list_name="Produce",
    product_list_type=1,
    free_fields=[{
        "key": "department",
        "value": "produce",
    }],
    is_allow_duplicate_products=True,
    lines=[{
        "product_number": "PRD-001",
        "quantity": 5,
    }, {
        "product_number": "PRD-002",
        "quantity": 12,
    }],
)
print(response.product_list_id)
{
  "product_list_id": 0
}
Returns Examples
{
  "product_list_id": 0
}