This endpoint allows you to create a new box configuration in the Venddor platform. You can define either grade boxes (size assortments) or closed boxes (complete sets) that will be used for product packaging and sales.
Authentication: Required. Use Basic Authentication with your API credentials.
POST/api/productBoxes/
Creates a new box configuration with the specified parameters.
Important: All fields in the request body are required to create a new box.
Request Body Parameters
Parameter
Type
Required
Description
title*
string
Yes
Box identifier code (e.g., "F8", "F12")
description*
string
Yes
Human-readable description of the box contents (e.g., "1 pair size 35/36, 3 pairs size 37/38, 2 pairs size 39/40")
box_type*
string
Yes
Box type: "G" for grade box (assortment), "C" for closed box (complete set)
size_variant_id*
string
Yes
ID of the size variant to link to this box (retrieve from GET /api/Features/575)
status*
string
Yes
Box status: "A" for active, "D" for disabled
size_qty_info*
array
Yes
Array of size/quantity pairs defining the contents of the box
{
"box_id": 42,
"status": "success",
"message": "Box created successfully"
}
Response Parameters
Parameter
Type
Description
box_id
integer
Unique identifier of the newly created box
status
string
Operation status: "success" or "error"
message
string
Status message providing additional information
Status Codes
Status Code
Description
201 Created
Box successfully created
400 Bad Request
Invalid request parameters or missing required fields
401 Unauthorized
Authentication credentials were missing or invalid
500 Internal Server Error
An error occurred on the server
Note on size_variant_id: To get the correct size_variant_id, first make a GET request to /api/Features/575 to retrieve the list of available size variants. Find the variant ID corresponding to the box size you want to use.
Box Type Explanation:
Grade Box (G): A collection of products in different sizes, typically used for footwear or clothing. For example, a grade box might contain 1 pair of size 35/36, 3 pairs of size 37/38, and 2 pairs of size 39/40.
Closed Box (C): A complete set or package of products sold as a single unit, where all items are identical or form a cohesive collection.
Creation Workflow: After creating a box with this endpoint, you'll typically want to create products that use this box configuration. To do this, you'll need to:
Create the box using this endpoint
Note the box_id returned in the response
Create products using the POST /api/Products endpoint, specifying the appropriate box information in the product's variation_features