Lootly Seller APILootly Seller API
Товары

Обновить товар

Полная замена - шлите все поля, схема как при создании.

PUT
/products/{id}
АвторизацияBearer <token>

API-ключ магазина как Bearer-токен: Authorization: Bearer lootly_sk_…

В: header

Параметры пути

id*string

ID товара.

Тело запроса

application/json

Определения TypeScript

Используйте тип request body в TypeScript.

Все поля обязательны (дефолтов нет). Одно тело для create и update.

Тело ответа

application/json

application/json

application/json

curl -X PUT "https://example.com/products/string" \  -H "Content-Type: application/json" \  -d '{    "categoryId": "string",    "title": "string",    "description": "string",    "isActive": true,    "external": true,    "currencyRateId": "string",    "price": 0,    "imageId": "string",    "employeeReward": {      "type": "",      "value": 0    },    "fields": [      {        "type": "text",        "label": "string",        "required": true,        "multiple": true,        "options": [          {            "label": "string",            "price": 0          }        ]      }    ],    "filters": [      {}    ]  }'
{  "success": true,  "data": {    "product": {      "id": "string",      "title": "string",      "description": "string",      "categoryId": "string",      "active": true,      "archived": true,      "external": true,      "currencyRateId": "string",      "price": 0,      "priceRub": 0,      "imageId": "string",      "imageUrl": "string",      "employeeReward": {        "type": "",        "value": 0      },      "fields": [        {          "id": "string",          "type": "text",          "label": "string",          "required": true,          "multiple": true,          "options": [            {              "id": "string",              "label": "string",              "price": 0            }          ],          "valuePricing": true,          "valueMin": 0,          "valueMax": 0,          "valueStep": 0,          "dataRequest": true,          "dataRequestWebhookUrl": "string",          "requestAfterPayment": true        }      ],      "filters": [        {          "filterId": "string",          "optionIds": [            "string"          ]        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  }}
{  "success": false,  "error": {    "code": "VALIDATION_ERROR"  }}
{  "success": false,  "error": {    "code": "ORDER_NOT_FOUND"  }}