market.add

Add an product.

NameRequiredTypeDescription
gid false String

Group ID

type true ApiProductOwnerType

Product type:

  • GROUP_PRODUCT - product
  • GROUP_SUGGESTED - suggested product (for group admin moderation).
attachment true Attachment

Json-formatted product content

catalog_ids false String[]

Catalogs ids to add the product

devices false String[]

Posting platform

update_default_visibility false Boolean

Authorization

Session is required

Required permissions

  • GROUP_CONTENT
  • VALUABLE_ACCESS

Requires strict mediablock order in an attachment field - title(text), description(text, optional), photo (optional), product specific info. One of description or photos must be defined. 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}

If it’s required to set link to external site, it’s possible to specify partner_link field in product info:

{"type":"product","price":1000,"lifetime": 30,"partner_link":"https://example.com"}

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

Type

{ "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