ЗАПРОС в customer-policies
curl 'http://customer-policies.services.lamoda.tech/jsonrpc/v1/customer.get-policies' --data '
{
"jsonrpc": "2.0",
"params": {
"customer": {
"email": "v_nag@bk.ru",
"id": 2443439
},
"country": "RU",
"packages": [
{
"discounted_price": 3829.0,
"items": [
{
"sku": "MP002XW1G9NTINS",
"seller_id": 1,
"discounted_price": 539,
"price": 539,
"quantity": 1,
"owner_id": 972850811
},
{
"sku": "NI464EWFLDA0INM",
"seller_id": 1,
"discounted_price": 3290,
"price": 3290,
"quantity": 1,
"owner_id": 1
}
],
"price": 3829.0,
"delivery": {
"type": null,
"method": null
}
},
{
"discounted_price": 2599.0,
"items": [
{
"sku": "IX001XW00ISCE380",
"seller_id": 237541484,
"discounted_price": 2599,
"price": 2599,
"quantity": 1,
"owner_id": 237541484
}
],
"price": 2599.0,
"delivery": {
"type": null,
"method": null
}
}
],
"platform": "desktop"
},
"id": "702dd967-3074-412a-a1bd-41763f7c5d34",
"method": "customer.get-policies"
}
'
ОТВЕТ
{
"jsonrpc": "2.0",
"id": "702dd967-3074-412a-a1bd-41763f7c5d34",
"result": {
"attributes": {
"when_recalculated": "2020-01-29T18:15:26.000+03:00",
"orders_items_in_transit": 5,
"client_item_in_transit_limit": 100,
"is_in_risk": false,
"cumulative_return_rejection_rate": 0.4851675877943403,
"cumulative_buyout": 52,
"client_itlc": [
{
"category": "Красота",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 1
},
{
"category": "Верх",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 2
},
{
"category": "Детям",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 3
},
{
"category": "Нижнее белье",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 4
},
{
"category": "Украшения",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 5
},
{
"category": "Дом",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 6
},
{
"category": "Аксессуары",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 7
},
{
"category": "Верхняя одежда",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 8
},
{
"category": "Обувь",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 9
},
{
"category": "Низ",
"items_in_transit": [
{
"sku": "IX001XW00EJEE340"
},
{
"sku": "RO043EWIEJD4I410"
}
],
"items_in_cart": [
"MP002XW1G9NTINS",
"NI464EWFLDA0INM",
"IX001XW00ISCE380"
],
"current": 5,
"limit": 4,
"is_exceeded": true,
"category_id": 10
},
{
"category": "Платья и костюмы",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 11
},
{
"category": "Сумки",
"items_in_transit": null,
"items_in_cart": null,
"current": 0,
"limit": 4,
"is_exceeded": false,
"category_id": 12
}
],
"client_group": "R2L0",
"is_in_prepayment_list": false,
"loyalty_points": 30,
"buyout_numerator": 78831,
"is_client_new": false,
"buyout_denominator": 162482
},
"experiments": {
"new_loyalty": true,
"items_in_transit_limit_by_category": true
},
"recommendations": {
"pre_payment": {
"message": "",
"template_id": "",
"to_exit_from_list": "-70138.20"
},
"loyalty_percent": {
"to_next_discount_right": "11000.00",
"target_is_special": null,
"to_next_discount_down": null,
"to_next_discount_up": null,
"to_next_discount_diag": "17695.00",
"target_loyalty_percent": null,
"message": "",
"template_id": ""
}
},
"policies": {
"items_in_transit_limit": true,
"disabled_postpayment_reason_id": "category_items_in_transit_limit",
"loyalty_percent": 0
},
"notifications": {
"disabled_postpayment_reason_external": "Превышен лимит товаров в категории Низ.",
"itl_internal": "Превышен лимит товаров в категории Низ.",
"disabled_postpayment_reason_internal": "Превышен лимит товаров в категории Низ.",
"itl_external": "Превышен лимит товаров в категории Низ."
}
}
}
ЗАПРОС В payment-method
curl 'http://payment-method.services.lamoda.tech/json-rpc/payment_method:getAvailable' --data '
{
"jsonrpc": "2.0",
"params": {
"cart": {
"customer": {
"phone": "+79857588278",
"email": "v_nag@bk.ru",
"id": 2443439
},
"country": "ru",
"packages": {
"237541484___3": {
"discounted_price": 2599,
"items": [
{
"sku": "IX001XW00ISC",
"seller_id": 237541484,
"discounted_price": 2599.0,
"price": 2599.0,
"quantity": 1,
"owner_id": 237541484
}
],
"price": 2599.0,
"delivery": {
"aoid": "7700000000000"
},
"payments": [
"BertelsmannCod"
]
},
"1___1": {
"discounted_price": 3829,
"items": [
{
"sku": "MP002XW1G9NT",
"seller_id": 1,
"discounted_price": 539.0,
"price": 539.0,
"quantity": 1,
"owner_id": 972850811
},
{
"sku": "NI464EWFLDA0",
"seller_id": 1,
"discounted_price": 3290.0,
"price": 3290.0,
"quantity": 1,
"owner_id": 1
}
],
"price": 3829.0,
"delivery": {
"aoid": "7700000000000"
},
"payments": [
"BertelsmannCod"
]
}
},
"platform": "site"
}
},
"id": "4cd73d14-6cd7-4bbe-aa0a-8c91b6d4429a",
"method": "payment_method:getAvailable"
}
'
ОТВЕТ
{
"jsonrpc": "2.0",
"result": {
"payment_methods": {
"237541484___3": [
{
"category": "postpayment",
"available": true,
"code": "BertelsmannCod",
"description": "",
"title": "Оплата при получении",
"reason": "",
"reasonCode": "",
"processing_type": "cash",
"is_available_to_autoconfirm": true
}
],
"1___1": [
{
"category": "postpayment",
"available": true,
"code": "BertelsmannCod",
"description": "",
"title": "Оплата при получении",
"reason": "",
"reasonCode": "",
"processing_type": "cash",
"is_available_to_autoconfirm": true
},
{
"category": "prepayment",
"available": true,
"code": "PaytureMastercardVTB",
"description": "Вернем деньги если товары не подойдут. Скидка 5% действует при заказе от 3000₽",
"title": "Онлайн-оплата картой (скидка 5%)",
"reason": "",
"reasonCode": "",
"processing_type": "payment_url",
"is_available_to_autoconfirm": true
},
{
"category": "prepayment",
"available": true,
"code": "PaytureVTB",
"description": "Вернем деньги если товары не подойдут. Скидка 5% действует при заказе от 3000₽",
"title": "Онлайн-оплата картой (скидка 5%)",
"reason": "",
"reasonCode": "",
"processing_type": "payment_url",
"is_available_to_autoconfirm": true
}
]
}
},
"id": "4cd73d14-6cd7-4bbe-aa0a-8c91b6d4429a"
}