market.edit ✎ Edit on GitHub

Edit product

NameRequiredTypeDescription
product_id true String

Product ID

attachment true Attachment

Json-formatted product content

catalog_ids false String

Authorization

Session is required

Required permissions:

  • GROUP_CONTENT
  • VALUABLE_ACCESS

Requires strict mediablock order in an attachment field - title(text), description(text), photo (optional), product specific info. Example:

{"media":[
	{"type":"text","text":"Название товара"},
	{"type":"text","text":"Описание товара"},
	{
	    "type": "photo",
	    "list": [
	        {"id": "photoToken1"}, 
	        {"id": "photoToken2"}, 
	        {"existing_photo_id": "1234", "group": true}
	    ]
	},
	{"type":"product","price":1000,"lifetime": 30}
]}

Default currency is russian ruble. Default lifetime is 30 days. It is possible to specify others: USD, KZT, UAH, GEL, UZS, KGS, AZN, USD, EUR. Example with 10$ price:

{"type":"product","price": 10, "currency": "USD", "lifetime": 30}

Photo uploading is similar with mediatopic. It also does not require commit invoking.

Response

{ "product_id": "String", "success": "boolean" }

Application paramters

User session data

Method

List of paramters

Используем для подписи secret_key = session_secret_key
Используем для подписи secret_key = application_secret_key
Используем для подписи secret_key = MD5(access_token + application_secret_key)
secret_key =
Сортируем и склеиваем параметры запроса и secret_key
Рассчитываем MD5 от полученной строки и получаем параметр sig