Update Box - Venddor API Documentation

Overview

This endpoint allows you to update an existing box configuration in the Venddor platform. You can modify properties such as the title, description, box type, status, and size distribution of the box.

Authentication: Required. Use Basic Authentication with your API credentials.
PUT /api/productBoxes/{box_id}

Updates an existing box configuration with the specified parameters.

Path Parameters

Parameter Type Required Description
box_id integer Yes Unique identifier of the box to update
Tip: Unlike the Create Box endpoint, you only need to include the fields you want to update. Any fields not included in the request will retain their current values.

Request Body Parameters

Parameter Type Required Description
title string No Box identifier code (e.g., "F8", "F12")
description string No Human-readable description of the box contents
box_type string No Box type: "G" for grade box (assortment), "C" for closed box (complete set)
size_variant_id string No ID of the size variant to link to this box
status string No Box status: "A" for active, "D" for disabled
size_qty_info array No Array of size/quantity pairs defining the contents of the box
size_qty_info[].size string Required if size_qty_info is provided Size identifier (e.g., "35/36", "37/38")
size_qty_info[].amount string Required if size_qty_info is provided Quantity of items in this size within the box

Example Request

{
    "title": "F99",
    "description": "1 par 37/38 e 4 pares 39/40",
    "box_type": "G",
    "size_variant_id": "20270",
    "status": "A",
    "size_qty_info": [
        {
            "size": "37/38",
            "amount": "1"
        },
        {
            "size": "39/40",
            "amount": "4"
        }
    ]
}

Example Response

{
    "box_id": 33,
    "status": "success",
    "message": "Box updated successfully"
}

Response Parameters

Parameter Type Description
box_id integer Unique identifier of the updated box
status string Operation status: "success" or "error"
message string Status message providing additional information

Status Codes

Status Code Description
200 OK Box successfully updated
400 Bad Request Invalid request parameters
401 Unauthorized Authentication credentials were missing or invalid
404 Not Found Box with the specified ID does not exist
500 Internal Server Error An error occurred on the server
Important: When updating the size_qty_info parameter, you must provide the complete new set of sizes and quantities. Any existing sizes not included in the update will be removed from the box configuration.
Impact on Products: Updating a box configuration may affect products that are already using this box. Any changes to the box's size distribution, in particular, may need to be reflected in inventory management and product listings.
Common Update Scenarios:
  • Activating/Deactivating a Box: Update the status field to "A" to activate or "D" to deactivate a box.
  • Changing Size Distribution: Update the size_qty_info array to modify the sizes and quantities in the box.
  • Renaming a Box: Update the title and/or description fields to change how the box is identified and described.