Product
Edit Product

Edit product

Edit data of exisiting product.
PUT/product/edit

Parameters

identifier - string required
The attribute for finding the product that will be edited. This need to be the original product reference.


data - object required
The product's object with the new data.


More parameters

Same strucutre as creating product.

You only need to pass the parameters that want to edit, not all of them.

EXAMPLE
{
    "identifier": "ProductAPI_5",
    "data" : {
        "name": "New name",
        "active": false
    }
}

Response

status 200

The edited product object.

Response
{
    "id": 20,
    "reference": "ProductAPI_5",
    "max_discount": null,
    "stock": 1,
    "active": false,
    "product_category_id": 1,
    "created_at": "2024-01-30 17:40:28",
    "updated_at": "2024-01-31 10:31:30",
    "deleted_at": null,
    "vat_id": 2,
    "taxes": null,
    "store_visible": true,
    "store_rate_id": null,
    "slug": "productapi-5",
    "provider_id": null,
    "name_ref": "(ProductAPI_5) New name",
    "name": "New name",
    "description": null,
    "store_name": null,
    "store_description": null,
    "rates": [
        {
            "id": 20,
            "product_id": 20,
            "sku": "ProductAPI_rate_1",
            "cost": 1,
            "price": 5,
            "services": 0,
            "primary": true,
            "created_at": "2024-01-30 17:40:28",
            "updated_at": "2024-01-30 17:40:28",
            "name": "ProductAPI_rate_1 (5.000)"
        }
    ],
    "translations": [
        {
            "id": 59,
            "locale": "ca",
            "product_id": 20,
            "name": "Product API",
            "description": "Product API description",
            "created_at": "2024-01-30 17:40:28",
            "updated_at": "2024-01-30 17:40:28",
            "store_name": null,
            "store_description": null
        },
        {
            "id": 60,
            "locale": "en",
            "product_id": 20,
            "name": "Product API",
            "description": "Product API description",
            "created_at": "2024-01-30 17:40:28",
            "updated_at": "2024-01-30 17:40:28",
            "store_name": null,
            "store_description": null
        },
        {
            "id": 58,
            "locale": "es",
            "product_id": 20,
            "name": "New name",
            "description": null,
            "created_at": "2024-01-30 17:40:28",
            "updated_at": "2024-01-31 10:31:30",
            "store_name": null,
            "store_description": null
        }
    ]
}