Получение информации о реселлер-Списании нижестоящего Реселлера по ID
Метод Get the Child Reseller's Charge by ID позволяет получить информацию о реселлер-Списании Реселлеров, являющихся нижестоящими по отношению к текущему Реселлеру, или по отношению к его выбранному нижестоящему Реселлеру.
Доступ к текущему Реселлеру, относительно которого формируется список нижестоящих Реселлеров, определяется по токену Сотрудника, указанному в заголовке запроса.
GET {base_url}/api/v3/resellers/{reseller_id}/child_reseller_reseller_charges/{charge_id}
Аргументы
Название | Тип параметра | Тип данных | Обязательный/ | Описание | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X-Api-Token | header | string | Обязательный | API токен Сотрудника, выполняющего операцию (см. Просмотр и обновление информации о сотруднике) | ||||||||||
Content-Type | header | string | Обязательный | Предназначен для идентификации формата и способа представления сущности | ||||||||||
Accept | header | string | Обязательный | Предназначен для информирования сервера о типах данных, которые поддерживаются клиентом (браузером) | ||||||||||
reseller_id | path | integer | Обязательный | ID Реселлера. Возможно указать ID текущего Реселлера или ID любого из его нижестоящих Реселлеров (см. Просмотр информации о реселлере) | ||||||||||
charge_id | path | integer | Обязательный | ID Списания | ||||||||||
include | query | string | Опциональный | Предназначен для включения в ответ дополнительной информации о связанных объектах. Для получения информации о нескольких объектах значения параметра должны перечисляться через запятую. Поддерживаются следующие объекты:
|
Модель ответа
Название | Тип данных | Описание | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array | Данные ответа | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | ID Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Тип данных | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes | object | Информация о Списании | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | date | Дата и время создания Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | date | Дата и время последнего изменения Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
charge_id | integer |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id | integer | ID клиентской Подписки | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unit_price | float | Стоимость единицы Ресурса или Услуги у выбранного Реселлера | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
amount | float | Общая сумма Списания (с учетом Скидки) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
net_cost | float | Себестоимость Списания для выбранного Реселлера | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_id | integer | ID Ресурса в клиентской Подписке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_name | string | Имя Ресурса в Подписке, которая была заказана Клиентом | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource_id | integer | ID Ресурса в Тарифном плане, который был заказан Клиентом | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resource_id | integer | ID Ресурса | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | integer | Количество заказанных единиц Услуги или Ресурса | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_from | date | Дата начала периода, оплаченного Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_to | date | Дата окончания периода, оплаченного Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
duration | float | Период Списания, измеряемый в месяцах. Например, период 1 день = 0.033, 2 года = 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Подробное описание Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Тип Списания (см. также Атрибуты списаний):
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_id | integer | ID Заказа, по которому произведено Списание | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | float | Размер Скидки для данного Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relationships | array | Перечень объектов, связанных со Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reseller | array | Информация о Реселлере | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | array | Информация о Клиенте | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription | array | Информация о Подписке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan | array | Информация о Тарифном плане | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
manager | array | Информация о Менеджере | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource | array | Информация о Ресурсе | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | array | Информация о Скидке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included | array | Дополнительная информация о связанных объектах, указанных в запросе:
Атрибуты:
|
Пример запроса
GET /api/v3/resellers/1/child_reseller_reseller_charges/4581?include=reseller,account,subscription,plan
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Пример ответа
{
"data": {
"id": "4581",
"type": "reseller_charges",
"attributes": {
"created_at": "2019-04-06T07:15:34.411+03:00",
"updated_at": "2019-04-06T07:15:34.411+03:00",
"charge_id": 60726,
"subscription_id": 3004753,
"unit_price": "50.0",
"amount": "47.5",
"net_cost": null,
"subscription_resource_id": 27352,
"subscription_resource_name": "r3",
"plan_resource_id": 3002,
"resource_id": 1448,
"quantity": 1.0,
"operate_from": "2019-02-19",
"operate_to": "2019-03-18",
"duration": 1.0,
"description": "Upgrade resource (recurring fee) \"r3\" for Subscription #3004753 \"Plan for postpay reservation\"",
"type": "Charge::Recurring",
"order_id": 6310,
"discount": "2.50"
},
"relationships": {
"reseller": {
"data": {
"id": "266",
"type": "resellers"
}
},
"account": {
"data": {
"id": "403",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "3004753",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "866",
"type": "plans"
}
},
"manager": {
"data": {
"id": "50",
"type": "managers"
}
},
"plan_resource": {
"data": {
"id": "3002",
"type": "plan_resources"
}
},
"discount": {
"data": {
"id": "48",
"type": "discounts"
}
}
}
},
"included": [
{
"id": "266",
"type": "resellers",
"attributes": {
"created_at": "2018-06-19T15:50:08.006+03:00",
"updated_at": "2018-09-21T07:23:01.125+03:00",
"parent_id": 1,
"general": {
"created_at": "2018-06-19T15:50:08.006+03:00",
"updated_at": "2018-09-21T07:23:01.125+03:00",
"name": "check post",
"domain": "test.activeplatform.com",
"manager": "Sales Manager",
"currency": "BYN"
},
"company": {
"created_at": "2018-06-19T15:50:08.006+03:00",
"updated_at": "2018-09-21T07:23:01.125+03:00",
"city": "kk",
"zip": "220007",
"country": "BY",
"fax": "",
"name": "Company",
"address_line_1": "Con",
"address_line_2": "",
"state": "kk",
"phone": "+375290000000",
"email": "test@gmail.com"
},
"contacts": {
"created_at": "2018-06-19T15:50:08.006+03:00",
"updated_at": "2018-09-21T07:23:01.125+03:00",
"first_name": "kate",
"last_name": "sss",
"middle_name": "test332",
"position": "",
"phone": "+369696666666",
"email": "test@gmail.com"
},
"custom_attributes": {
"softline1c_plugin_api_password": "",
"softline1c_plugin_api_name": "",
"kpp": "",
"inn": "5555333333",
"reseller_mpn_id_ttttt": "",
"loc_1": "5555",
"l_ocation": "",
"l_ocationv": "",
"ererere": "555",
"inn_inn": "5555"
}
}
},
{
"id": "403",
"type": "accounts",
"attributes": {
"created_at": "2018-10-01T10:58:35.387+03:00",
"updated_at": "2020-02-06T07:15:49.770+03:00",
"reseller_id": 266,
"name": "kate 1411 prepay",
"account_class_id": 1393,
"primary_name": "",
"first_name": "kate 1411",
"middle_name": "",
"last_name": "prepay",
"country": "US",
"region": "NY",
"city": "Brooklyn",
"street": "Westminster ave.",
"building": "1",
"office": "1",
"zip": "11230",
"phone": "+16000000000",
"email": "test@gmail.com",
"status": "credit_hold",
"balance": "-10.01",
"current_debt": 0.0,
"subscription_credit_limit": 0.0,
"financial_blocking_threshold": 100.0,
"account_type_id": 4754,
"manager_id": null,
"owner_id": 783,
"tech_user_id": 783,
"bill_user_id": 783,
"custom_attributes": {},
"manager": null,
"default_payment_model": "prepay",
"account_type": {
"id": 4754,
"name": "Физическое лицо",
"created_at": "2018-06-19T15:50:08.061+03:00",
"updated_at": "2018-06-28T10:18:18.545+03:00",
"reseller_id": 266,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personal",
"default_payment_method_id": 1523,
"ancestry": "1562/1564",
"use_by_default": false
},
"account_class": {
"id": 1393,
"reseller_id": 266,
"name": "Default",
"created_at": "2018-06-19T15:50:08.969+03:00",
"updated_at": "2019-02-07T15:42:38.834+03:00",
"financial_blocking_threshold": "100.0",
"due_order_period": 90,
"subzero_period": 99,
"stop_subscription_type": "automatically",
"key": "default",
"color": "grey",
"guaranteed_payment_limit": 1000,
"guaranteed_payment_period": 7,
"delete_subscription_type": "automatically",
"denominated": false,
"buy_with_negative_balance": true,
"receipt_day": null,
"payment_model": "prepay",
"default": false,
"due_payment_period": 30,
"subscription_credit_limit": "0.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3004749",
"type": "subscriptions"
},
{
"id": "3004748",
"type": "subscriptions"
},
{
"id": "3004757",
"type": "subscriptions"
},
{
"id": "3004758",
"type": "subscriptions"
},
{
"id": "3004761",
"type": "subscriptions"
},
{
"id": "3004747",
"type": "subscriptions"
},
{
"id": "3004753",
"type": "subscriptions"
},
{
"id": "3004754",
"type": "subscriptions"
},
{
"id": "3004756",
"type": "subscriptions"
},
{
"id": "3004755",
"type": "subscriptions"
},
{
"id": "3004759",
"type": "subscriptions"
},
{
"id": "3004760",
"type": "subscriptions"
}
]
}
}
},
{
"id": "3004753",
"type": "subscriptions",
"attributes": {
"created_at": "2018-10-09T14:58:45.249481+0300",
"updated_at": "2020-02-08T07:15:26.295265+0300",
"auto_renewal": false,
"billing_from": "2018-10-09",
"expiration_date": "2019-10-09",
"name": "Plan for postpay reservation",
"renew_point_days": 0,
"start_date": "2018-10-09",
"status": "deleted"
}
},
{
"id": "866",
"type": "plans",
"attributes": {
"created_at": "2018-06-19T15:23:26.939+03:00",
"updated_at": "2019-08-05T07:43:33.544+03:00",
"status": "active",
"name": "Plan for postpay reservaion",
"description": "",
"public": true,
"plan_class_id": 5858,
"product_id": 64,
"billing_type": "reservation",
"ancestry": null,
"reseller_id": 1,
"plan_class": "Res BD",
"product_category_id": 129,
"product_category": "000",
"product": "test",
"plan_resources": {
"data": [
{
"id": "3000",
"type": "plan_resources",
"attributes": {
"created_at": "2018-06-19T15:23:52.001+03:00",
"updated_at": "2018-06-19T15:23:52.001+03:00",
"name": "r2",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "auto prov new2",
"included": 0,
"minimum": 0,
"limit": 0,
"setup_fee": "60.0",
"recurring_fee": "60.0",
"overuse_fee": "60.0",
"renewal_fee": "60.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 1430,
"custom_attributes": {}
}
},
{
"id": "3001",
"type": "plan_resources",
"attributes": {
"created_at": "2018-06-19T15:23:52.100+03:00",
"updated_at": "2018-07-17T17:36:47.070+03:00",
"name": "r3",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "auto prov new2",
"included": 0,
"minimum": 0,
"limit": 0,
"setup_fee": "30000.0",
"recurring_fee": "30000.0",
"overuse_fee": "50.0",
"renewal_fee": "50.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 1448,
"custom_attributes": {
"item_1c_id": "",
"v_resource": ""
}
}
}
]
},
"plan_periods": {
"data": [
{
"id": "1824",
"type": "plan_periods",
"attributes": {
"created_at": "2019-06-06T07:43:33.585+03:00",
"updated_at": "2019-06-06T07:43:33.585+03:00",
"duration_value": 5,
"duration_type": "day",
"setup_fee": "90.0",
"recurring_fee": "90.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "1754",
"type": "plan_periods",
"attributes": {
"created_at": "2018-06-19T15:24:39.016+03:00",
"updated_at": "2018-06-19T15:24:39.016+03:00",
"duration_value": 1,
"duration_type": "day",
"setup_fee": "60.0",
"recurring_fee": "60.0",
"transfer_fee": "60.0",
"renewal_fee": "60.0",
"trial": false,
"public": true,
"status": "active",
"description": null
}
},
{
"id": "1755",
"type": "plan_periods",
"attributes": {
"created_at": "2018-06-19T15:24:39.051+03:00",
"updated_at": "2018-06-19T15:24:39.051+03:00",
"duration_value": null,
"duration_type": null,
"setup_fee": "90.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": null
}
},
{
"id": "1756",
"type": "plan_periods",
"attributes": {
"created_at": "2018-06-19T15:24:39.053+03:00",
"updated_at": "2018-06-19T15:24:39.053+03:00",
"duration_value": 1,
"duration_type": "month",
"setup_fee": "20.0",
"recurring_fee": "20.0",
"transfer_fee": "20.0",
"renewal_fee": "20.0",
"trial": false,
"public": true,
"status": "active",
"description": null
}
},
{
"id": "1757",
"type": "plan_periods",
"attributes": {
"created_at": "2018-06-19T15:24:39.054+03:00",
"updated_at": "2019-02-05T10:45:35.385+03:00",
"duration_value": 1,
"duration_type": "year",
"setup_fee": "0.0",
"recurring_fee": "36.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "1758",
"type": "plan_periods",
"attributes": {
"created_at": "2018-06-19T15:24:39.056+03:00",
"updated_at": "2018-06-19T15:24:39.056+03:00",
"duration_value": 1,
"duration_type": "month",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": true,
"public": true,
"status": "active",
"description": null
}
}
]
},
"available_account_types": [
{
"id": 1,
"name": "Personal BLR",
"created_at": "2016-08-25T09:26:12.658+03:00",
"updated_at": "2019-05-08T07:21:42.843+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personalblr",
"default_payment_method_id": 2,
"ancestry": null,
"use_by_default": false
},
{
"id": 2,
"name": "Business BLR",
"created_at": "2016-08-25T09:26:12.674+03:00",
"updated_at": "2019-05-08T03:11:31.082+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "businessblr",
"default_payment_method_id": 197,
"ancestry": null,
"use_by_default": false
},
{
"id": 12,
"name": "Business w/o НДС",
"created_at": "2016-10-25T08:16:28.789+03:00",
"updated_at": "2017-02-01T15:04:39.227+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "business_wo_vat",
"default_payment_method_id": 197,
"ancestry": null,
"use_by_default": false
},
{
"id": 651,
"name": "business w/o vat",
"created_at": "2017-01-31T15:58:27.121+03:00",
"updated_at": "2017-01-31T15:58:27.121+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "",
"key": "business_no_vat",
"default_payment_method_id": null,
"ancestry": null,
"use_by_default": false
},
{
"id": 1124,
"name": "Test1",
"created_at": "2017-02-02T18:08:39.408+03:00",
"updated_at": "2017-02-02T18:19:18.433+03:00",
"reseller_id": 1,
"name_pattern": "test1",
"primary_name": "",
"key": "test1",
"default_payment_method_id": null,
"ancestry": null,
"use_by_default": false
},
{
"id": 1385,
"name": "Индивидуальный предприниматель",
"created_at": "2017-02-08T11:25:32.739+03:00",
"updated_at": "2017-02-08T15:25:04.689+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "key",
"default_payment_method_id": 2,
"ancestry": null,
"use_by_default": false
},
{
"id": 1564,
"name": "Физическое лицо",
"created_at": "2017-03-20T16:34:28.163+03:00",
"updated_at": "2017-03-20T16:34:28.163+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personal",
"default_payment_method_id": null,
"ancestry": "1562",
"use_by_default": false
},
{
"id": 1602,
"name": "Юридическое лицо",
"created_at": "2017-03-21T10:48:13.152+03:00",
"updated_at": "2017-03-21T10:48:13.152+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "business",
"default_payment_method_id": null,
"ancestry": "1600",
"use_by_default": false
}
],
"custom_attributes": {
"item_1c_id": "",
"item_1c_for_resellers": "",
"vat25": "0",
"attribute_2": "",
"uniqueness": ""
}
}
}
]
}