How to update a product

Configure the API to update products.
Written by Beeping Fulfilment
Updated 10 months ago

This method allows you to update a product. To access this step, you must first perform the basic authentication. If you need to create a product, check this article: How to create a product.

The data you need to know are:

Method: PUT

Uri: api/product/{product_id}

Endpoint: http://app.gobeeping.com/api/product/978

Curl Example

curl --location --request PUT 'http://app.gobeeping.com/api/product/978' \
--header 'Authorization: Basic XXXXXXXXXX’ \
--header 'Content-Type: application/json' \
--data-raw '{
    "data" : {
        "name": "Product test Update "
    }    
}'

In order to perform the PUT method, you need to identify the following elements:

  • 'Authorization: Basic XXXXXXXXXXXXXXXX' : here you must place the Basic Auth obtained in the previous step: how to login.
  • {product_id}: When you create a product in the system, it returns an ID, which is represented as "id": X. You can see it in the following example:
{
        "id": 5,
        "name": "Cepillo Alisador GM",
        "description": null,
        "status": "1",
        "code": "8435411536428",
        "cost": null,
        "hs_code": null,
        "image_hash": "[\"photos\\/ThEUckZ6caR2vocikP8fEalUremaA3yiMAUveyKo.png\"]",
        "lenght": null,
        "height": null,
        "width": null,
        "weight": null,
        "created_at": "2022-08-03T13:10:43.000000Z",
        "updated_at": "2022-08-03T13:10:43.000000Z",
        "default_picking": null,
        "clients_stock": [
            {
                "id": 5,
                "product_id": 5,
                "client_id": 1,
                "stock_available": 57,
                "stock_reserved": 0,
                "stock_ineligible": 0,
                "stock_incoming": 0,
                "created_at": "2022-08-03T13:10:43.000000Z",
                "updated_at": "2022-08-08T05:54:06.000000Z"
            }
        ],
        "total_stock": 57
    },

In addition, you will find other elements within data, which refer to the product information, and you can identify the following: 

  • name: Product name.
  • code: Product code/Barcode (it is not mandatory, if you do not add it, an automatic one will be created).
  • image: Product image. If you do not have image URL and you only have the file, you can upload it once you create the product in the system.

Supported parameters are:

Parameter Description
data

Json with the product data

“name” = “string”
“code” = “string”
“image” = “string”

If you need to know how to list products, we explain it in this other article.

Did this answer your question?