Page cover image

🎁Create a Product

To create a product you need to make request

Your product won't be available for selling before you PATCH it and setup USD prices, it would has draft/unpublished status, please reffer to Update a Product section

POST https://api.mel.store/api/mel-store/products

Example of request


curl --location 'https://api.mel.store/api/mel-store/products'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer ••••••'
--data '{ 
    "product_type": "CustomService",
    "button_title": "Invividual Consult Service",
    "product_description": "Indiviual English lesson with Maria",
    "product_title": "Indiviual English lesson" 
}'
poduct_type is required field, it's a product type on platform,
currently you could create only CustomService type of product

product_type

required, currently you can use only CustomService type

button_title

required, button title on list of projects which would be shown for users go to checkout page

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

Example of response

{
    "id": 339,
    "product_type": "CustomService",
    "thumbnail_type": "button",
    "title": "",
    "subtitle": "",
    "button_title": "Invividual Consult Service",
    "item_order": 9,
    "is_visible": true,
    "is_free": false,
    "is_published": false,
    "button_image_id": {
        "id": null,
        "url": "",
        "file_name": "",
        "uuid": ""
    },
    "product_image_id": {
        "id": null,
        "url": "",
        "file_name": "",
        "uuid": ""
    },
    "product_title": "Consult service",
    "product_description": "Test Test",
    "reviews": [],
    "additional_fields": [
        {
            "text": "Name",
            "id": "text",
            "name": "name",
            "position": 0,
            "is_removable": false,
            "is_required": true,
            "extra": false
        },
        {
            "text": "Email",
            "id": "email",
            "name": "email",
            "position": 1,
            "is_removable": false,
            "is_required": true,
            "extra": false
        },
        {
            "text": "Phone",
            "id": "phone",
            "name": "phone_number",
            "position": 2,
            "is_hidden": false,
            "is_removable": false,
            "is_required": true,
            "extra": false
        }
    ],
    "limit_quantity": 0,
    "quantity_usage": 0,
    "available_currencies": [
        {
            "id": 1,
            "name": "RUB",
            "has_installment": true
        }
    ],
    "prices": [
        {
            "id": 1190,
            "currency_code": "USD",
            "currency_id": 2,
            "has_price": true,
            "is_removable": false,
            "price": 35,
            "price_label": "$35.00",
            "limit": 40000,
            "is_discount_price": true,
            "discount_price": 29.99,
            "discount_price_label": "$29.99"
        }
    ],
    "discount_codes": null,
    "default_after_buy_email": {
        "subject": "...",
        "body": "..."
    },
    "after_buy_email_subject": "emails.custom_service.subject",
    "after_buy_email_body": "emails.custom_service.body",
    "reviews_avg": "0.00",
    "has_promo_codes": false,
    "success_page_url": null,
    "is_success_page_enabled": false,
    "success_page_text": ""
}

This response is pretty long and currently we can't provide you full description of all params and meanings of all params, maybe it would be added in later stages/versions, from all this reponse you just need an id field, in our example it's id: 339

It will be used to Update Product or to create a Payment Link as :productId

Obtain :productId via UI

Last updated