Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
3.0 kB
2
Indexable
Never
// create

// payload
{
    "name": "________абв",
    "is_active": true,
    "vendor_code": "iuouoiurehjfeeri858943850438",
    "category_uuids": [
        "1eddf476-b729-6ea4-b89e-0242ac140005"
    ],
    "attribute_set_uuids": [
        "1ee218ed-6c0c-62b0-8814-29376bf490e4"
    ],
    "price": 0,
    "trade_network_uuids": [
        "1ee26737-7760-67fe-bb4c-0242ac14002d"
    ],
    "data": {
        "1ee20911-64c2-6df6-a03c-ff96341e637a": "111",
        "1ee20913-087c-6bbc-8dc2-1b1dc77d26a8": "ммм"
    },
    "type": "simple"
}

// curl
curl 'https://staging-1-0.envs.iqd.by/product/create' \
  -H 'authority: staging-1-0.envs.iqd.by' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: ru-RU,ru' \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2OTIyODMwMTAsImV4cCI6MTY5MjI5MzAxMCwicm9sZXMiOltdLCJsb2dpbiI6InN0cmluZyIsIm9yZ2FuaXphdGlvblV1aWQiOiIxZWUxYmU1Yi0yZWUwLTYzMDYtYjY1My1kOTkyOWY5MTJkNzQiLCJvcmdhbml6YXRpb25OYW1lIjoic3RyaW5nIn0.G77CIg6qt8mjDBmWXi0uv_c3-_MoIu8ddhTblPpVmGkPgyHCcskpDos-CE2nuaJwe4XWij5FSTcBLaPYyEflZ0LMBNEyu7ev9-bAJnzWL0FzbLq42vG-LZy5EqarXkfIQi4p6wJ8oggRWVLKb0FeXEzd_ZE4lgXpxdBvkfYFqboROW_cHMahWfV_nDBHEyGCaxYotn8MVgdjz3vqzr3hVS0z3Ti1IRcs-BDNt5LcaSECHHjlsts8adadVmOPi9AZn9_rjNpN3hin3gVC5sH7KWWGt30LqgaHGTQYis2gI8KpPEMp-2cnu5pU7qf1NfHm0HJKeg0i6wisrfEAo-RBpQ' \
  -H 'content-type: application/json' \
  -H 'origin: http://localhost:4200' \
  -H 'referer: http://localhost:4200/' \
  -H 'sec-ch-ua: "Chromium";v="112", "Brave";v="112", "Not:A-Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-gpc: 1' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' \
  --data-raw '{"name":"________абв","is_active":true,"vendor_code":"iuouoiurehjfeeri858943850438","category_uuids":["1eddf476-b729-6ea4-b89e-0242ac140005"],"attribute_set_uuids":["1ee218ed-6c0c-62b0-8814-29376bf490e4"],"price":0,"trade_network_uuids":["1ee26737-7760-67fe-bb4c-0242ac14002d"],"data":{"1ee20911-64c2-6df6-a03c-ff96341e637a":"111","1ee20913-087c-6bbc-8dc2-1b1dc77d26a8":"ммм"},"type":"simple"}' \
  --compressed

// response data
{
    "uuid": "1ee3d02c-6b01-6cc4-a610-5d125fcc40c2",
    "type": "group",
    "name": "___ nm mn mn m",
    "price": 2,
    "is_active": true,
    "vendor_code": "nkbjjhguyt675465e56sxdgfc",
    "data": [],
    "configurations": [],
    "categories": [
        {
            "uuid": "1eddf476-b729-6ea4-b89e-0242ac140005",
            "name": "Покеболл"
        }
    ],
    "trade_network_uuids": [
        {
            "uuid": "1ee26737-7760-67fe-bb4c-0242ac14002d",
            "name": "testikkkk"
        }
    ],
    "attribute_set_uuids": [
        {
            "uuid": "1ee218ed-6c0c-62b0-8814-29376bf490e4",
            "name": "третий"
        }
    ],
    "simple_products": []
}