Page cover image

🛒Update Product

After creating a product and receiving a response, it's time to set up prices and configure additional options to complete the publishing and setup of your digital product. Note: It's required step.

Make PATCH request with :productId obtained while you created a product

PATCH https://api.mel.store/api/mel-store/products/:productId
{
    "thumbnail_type": "button",
    "has_promo_codes": false,
    "button_title": "Book Now!",
    "prices": [
        {
            "currency_id": 1,
            "price": 9120,
            "is_discount_price": true,
            "discount_price": 6842
        },
         {
            "currency_id": 2,
            "price": 100,
            "is_discount_price": true,
            "discount_price": 75.00
        }
    ],
    "product_title": "1-Hour Coding Lesson",
    "product_description": "Get personalized coding help in a 1-hour session."
}

thumbnail_type

required, this settings is how you product will look on your main store page https://mel.store/{username}

Currently need to use button

has_promocodes

required, put false here, if you don't need discount codes for product, we could extend our API if promocodes needed for you while updating a product via API

product_title

required, checkout page product title which customers will see while buy your product

product_description

required, checkout page product description which customers will see while buy your product

prices

required, array of prices in different currencies, one product can has one price in the same currency

prices.*.currency_id

required, int, id of currency, USD = 2, for full list of currencies ask your account manager

prices.*.price

required, float or int, price of you product with cents for e.g 100.55 is $100.55

prices.*.is_discount_price

required, boolean, true of false, you can specify discount price to your product to better sells, so your price would be crossed out and customer will see next to it your discount_price amount

prices.*.discount_price

required_if, float or int. discount price of you product with cents for e.g 90.55 is $90.55. Discount price must be lower than price

Once you updated a product with prices it should be published and ready for selling in your store

You can generate a link to you product by your self if you needed

Example of a link

Where username is your username while register and :productId is product id

Last updated