Create Product

Create product

POST https://sandbox.mnasati.com/v1/create_product

This endpoint allows you to create/add products.

Headers

Request Body

{}

Examples

import http.client

conn = http.client.HTTPSConnection("sandbox.mnasati.com")

payload = "{\"title\":\"demo product\",\"title_ar\":\"منتج تجريبي\",\"category\":251,\"weight\":1,\"brand_id\":5,\"description\":\"demo product description\",\"description_ar\":\"منتج تجريبي منتج تجريبي\",\"sub_category\":154,\"sale_price\":10,\"prices\":{\"1\":10,\"10\":20},\"purchase_price\":7,\"shipping_cost\":1,\"purchase_limit\":5,\"barcode\":\"123456789\",\"sort_order\":10,\"tag\":\"tag1,tag2\",\"unit\":1,\"catering\":0,\"featured\":1,\"preparation_time\":0,\"preparation_type\":1,\"pdt_special_price_discount\":1,\"pdt_discount\":2,\"all_branches\":1,\"celebrity\":{\"0\":1,\"1\":2},\"product_option\":{\"0\":{\"title\":\"Demo production option title en\",\"title_ar\":\"Demo production option title ar\",\"related\":0,\"with_stock\":0,\"type\":\"multi_select\",\"required\":1,\"more_extras\":1,\"option_values\":{\"0\":173,\"1\":174}}}}"

headers = {
    'Content-Type': "",
    'Authorization-Jwt': ""
    }

conn.request("POST", "/v1/create_product", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Last updated