Получение информации о Списании конечного клиента нижестоящего Реселлера по ID
Метод Get the Child Reseller's end-customer Charge by ID позволяет получить информацию о Списании конечного клиента для нижестоящего Реселлера по отношению к текущему Реселлеру.
Доступ к текущему Реселлеру, относительно которого формируется список нижестоящих Реселлеров, определяется по токену Сотрудника, указанному в заголовке запроса.
GET {base_url}/api/v3/resellers/{reseller_id}/child_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 | string | Обязательный | ID Списания | ||||||||||
include | query | string | Опциональный | Предназначен для включения в ответ дополнительной информации о связанных объектах. Для получения информации о нескольких объектах значения параметра должны перечисляться через запятую. Поддерживаются следующие объекты:
|
Модель ответа
Название | Тип данных | Описание | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array | Данные ответа | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | ID Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Тип данных | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes | object | Информация о Списании | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | date | Дата и время создания Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | date | Дата и время последнего изменения Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id | integer | ID клиентской Подписки | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_id | integer | ID Ресурса в клиентской Подписке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | integer | Количество заказанных единиц Услуги или Ресурса | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_from | date | Дата начала периода, оплаченного Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
duration | float | Период Списания, измеряемый в месяцах. Например, период 1 день = 0.033, 2 года = 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Подробное описание Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unit_price | float | Стоимость единицы Ресурса или Услуги у выбранного Реселлера | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
amount | float | Общая сумма Списания (с учетом Скидки) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string | Статус Списания (список статусов см. в Атрибуты списаний) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Тип Списания (см. также Атрибуты списаний):
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
net_cost | float | Себестоимость Списания для выбранного Реселлера | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes_amount | float | Сумма налогов для данного Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_name | string | Имя Ресурса в Подписке, которая была заказана Клиентом | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource_id | integer | ID Ресурса в Тарифном плане, который был заказан Клиентом | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resource_id | integer | ID Ресурса в Шаблоне услуги | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_id | integer | ID Заказа, по которому произведено Списание | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_to | date | Дата окончания периода, оплаченного Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
close_date | date | Дата, когда Cписание должно быть закрыто | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | float | Размер Скидки для данного Списания | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relationships | array | Перечень объектов, связанных со Списанием | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes | array | Информация о налогах | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reseller | array | Информация о Реселлере | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | array | Информация о Клиенте | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription | array | Информация о Подписке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan | array | Информация о Тарифном плане | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | array | Информация о Скидке | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Информация о связанном объекте:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included | array | Дополнительная информация о связанных объектах, указанных в запросе:
Атрибуты:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | array | Дополнительная информация о Списании | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | string | Валюта Реселлера |
Пример запроса
GET /api/v3/resellers/4/child_reseller_charges/250
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Пример ответа
{
"data": {
"id": "250",
"type": "charges",
"attributes": {
"created_at": "2016-10-25T10:00:14.162558+0300",
"updated_at": "2016-12-02T01:02:14.047225+0300",
"subscription_id": 75,
"subscription_resource_id": 473,
"quantity": 4.0,
"operate_from": "2016-11-01",
"duration": 1.0,
"description": "Upgrade resource (recurring fee) \"Resource 3\" for Subscription #75 \"Auto provisioning with resources\"",
"unit_price": "4.0",
"amount": "8.0",
"status": "closed",
"type": "Charge::Recurring",
"net_cost": "44.0",
"taxes_amount": 0,
"subscription_resource_name": "Resource 3",
"plan_resource_id": 615,
"resource_id": 10,
"order_id": 80,
"operate_to": "2016-11-30",
"close_date": "2016-11-30",
"discount": "0.00"
},
"relationships": {
"taxes": {
"data": []
},
"reseller": {
"data": {
"id": "4",
"type": "resellers"
}
},
"account": {
"data": {
"id": "11",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "75",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "32",
"type": "plans"
}
},
"discount": {
"data": null
}
}
},
"included": [
{
"id": "4",
"type": "resellers",
"attributes": {
"created_at": "2016-10-18T10:57:38.219+03:00",
"updated_at": "2018-07-26T07:30:34.748+03:00",
"parent_id": 25,
"general": {
"created_at": "2016-10-18T10:57:38.219+03:00",
"updated_at": "2018-07-26T07:30:34.748+03:00",
"name": "Resendor",
"domain": "test.activeplatform.com",
"manager": "Admin",
"currency": "USD"
},
"company": {
"created_at": "2016-10-18T10:57:38.219+03:00",
"updated_at": "2018-07-26T07:30:34.748+03:00",
"city": null,
"zip": null,
"country": null,
"fax": null,
"name": null,
"address_line_1": null,
"address_line_2": null,
"state": null,
"phone": null,
"email": null
},
"contacts": {
"created_at": "2016-10-18T10:57:38.219+03:00",
"updated_at": "2018-07-26T07:30:34.748+03:00",
"first_name": null,
"last_name": null,
"middle_name": null,
"position": null,
"phone": null,
"email": null
},
"custom_attributes": {}
}
},
{
"id": "11",
"type": "accounts",
"attributes": {
"created_at": "2016-10-25T09:59:11.165+03:00",
"updated_at": "2019-02-01T16:51:36.416+03:00",
"reseller_id": 4,
"name": "Busines",
"account_class_id": 5,
"primary_name": "Busines",
"first_name": "Бизнес",
"middle_name": "",
"last_name": "Сндс",
"country": "BY",
"region": "Minsk",
"city": "Minsk",
"street": "empty",
"building": "",
"office": "29",
"zip": "123456",
"phone": "+375291234567",
"email": "test@email.com",
"status": "active",
"balance": "0.0",
"current_debt": 0.0,
"subscription_credit_limit": 0.0,
"financial_blocking_threshold": 0.0,
"account_type_id": 8,
"manager_id": 11,
"owner_id": 29,
"tech_user_id": 29,
"bill_user_id": 29,
"custom_attributes": {
"kpp": "123456",
"inn": "123"
},
"manager": {
"created_at": "2016-10-25T09:57:54.182+03:00",
"updated_at": "2016-10-25T09:57:54.182+03:00",
"reseller_id": 4,
"id": 11,
"name": "Manager",
"status": "active",
"email": "testtest@gmail.com",
"role": "sales"
},
"default_payment_model": "prepay",
"account_type": {
"id": 8,
"name": "Business BLR",
"created_at": "2016-10-18T10:57:38.367+03:00",
"updated_at": "2017-05-10T19:28:56.308+03:00",
"reseller_id": 4,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "businessblr",
"default_payment_method_id": null,
"ancestry": "2/67",
"use_by_default": false
},
"account_class": {
"id": 5,
"reseller_id": 4,
"name": "Default",
"created_at": "2016-10-18T10:57:38.602+03:00",
"updated_at": "2019-02-07T15:42:32.188+03:00",
"financial_blocking_threshold": "0.0",
"due_order_period": 14,
"subzero_period": 5,
"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": false,
"receipt_day": null,
"payment_model": "prepay",
"default": false,
"due_payment_period": 30,
"subscription_credit_limit": "0.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "75",
"type": "subscriptions"
}
]
}
}
},
{
"id": "75",
"type": "subscriptions",
"attributes": {
"created_at": "2016-10-25T10:00:13.646956+0300",
"updated_at": "2017-01-08T01:02:19.383375+0300",
"auto_renewal": false,
"billing_from": "2016-10-25",
"expiration_date": "2016-12-25",
"name": "Auto provisioning with resources",
"renew_point_days": 0,
"start_date": "2016-10-25",
"status": "deleted"
}
},
{
"id": "32",
"type": "plans",
"attributes": {
"created_at": "2016-10-25T09:59:48.153+03:00",
"updated_at": "2017-08-10T13:10:39.249+03:00",
"status": "active",
"name": "Auto provisioning with resources",
"description": "",
"public": true,
"plan_class_id": 9,
"product_id": 404,
"billing_type": "reservation",
"ancestry": "5",
"reseller_id": 4,
"plan_class": "Default",
"product_category_id": 191,
"product_category": "default",
"product": "Default",
"plan_resources": {
"data": [
{
"id": "615",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-25T09:59:48.831+03:00",
"updated_at": "2016-10-28T11:25:03.301+03:00",
"name": "Resource 3",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 5,
"minimum": 5,
"limit": 0,
"setup_fee": "14.0",
"recurring_fee": "4.0",
"overuse_fee": "16.0",
"renewal_fee": "14.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 10,
"custom_attributes": {
"item_1c_id": "res3",
"item_1c_for_resellers": ""
}
}
},
{
"id": "613",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-25T09:59:48.744+03:00",
"updated_at": "2016-10-28T11:25:03.326+03:00",
"name": "Resource 4",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 3,
"minimum": 3,
"limit": 0,
"setup_fee": "10.0",
"recurring_fee": "4.0",
"overuse_fee": "12.0",
"renewal_fee": "10.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 272,
"custom_attributes": {
"item_1c_id": "",
"item_1c_for_resellers": ""
}
}
},
{
"id": "614",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-25T09:59:48.794+03:00",
"updated_at": "2016-10-28T11:25:03.277+03:00",
"name": "Resource 2",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 1,
"minimum": 1,
"limit": 0,
"setup_fee": "10.0",
"recurring_fee": "4.0",
"overuse_fee": "12.0",
"renewal_fee": "10.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 9,
"custom_attributes": {
"item_1c_id": "",
"item_1c_for_resellers": ""
}
}
},
{
"id": "612",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-25T09:59:48.691+03:00",
"updated_at": "2016-10-28T11:25:03.349+03:00",
"name": "Resource 5",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 2,
"minimum": 2,
"limit": 0,
"setup_fee": "6.0",
"recurring_fee": "4.0",
"overuse_fee": "10.0",
"renewal_fee": "6.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 273,
"custom_attributes": {
"item_1c_id": "",
"item_1c_for_resellers": ""
}
}
},
{
"id": "611",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-25T09:59:48.645+03:00",
"updated_at": "2016-10-28T16:48:29.556+03:00",
"name": "Resource 1",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 3,
"minimum": 3,
"limit": 0,
"setup_fee": "20.0",
"recurring_fee": "22.0",
"overuse_fee": "20.0",
"renewal_fee": "20.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 8,
"custom_attributes": {
"item_1c_id": "",
"item_1c_for_resellers": ""
}
}
}
]
},
"plan_periods": {
"data": [
{
"id": "151",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.370+03:00",
"updated_at": "2016-10-28T11:25:02.758+03:00",
"duration_value": 5,
"duration_type": "day",
"setup_fee": "10.0",
"recurring_fee": "2.0",
"transfer_fee": "12.0",
"renewal_fee": "10.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "152",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.403+03:00",
"updated_at": "2016-10-28T11:25:02.740+03:00",
"duration_value": 1,
"duration_type": "month",
"setup_fee": "20.0",
"recurring_fee": "2.0",
"transfer_fee": "24.0",
"renewal_fee": "20.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "154",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.474+03:00",
"updated_at": "2016-10-28T11:25:02.703+03:00",
"duration_value": 1,
"duration_type": "year",
"setup_fee": "120.0",
"recurring_fee": "2.0",
"transfer_fee": "130.0",
"renewal_fee": "100.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "145",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.193+03:00",
"updated_at": "2016-10-28T11:25:02.856+03:00",
"duration_value": 1,
"duration_type": "day",
"setup_fee": "2.0",
"recurring_fee": "2.0",
"transfer_fee": "4.0",
"renewal_fee": "2.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "146",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.229+03:00",
"updated_at": "2016-10-28T11:25:02.836+03:00",
"duration_value": 2,
"duration_type": "day",
"setup_fee": "4.0",
"recurring_fee": "2.0",
"transfer_fee": "6.0",
"renewal_fee": "2.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "148",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.285+03:00",
"updated_at": "2016-10-28T11:25:02.796+03:00",
"duration_value": 4,
"duration_type": "day",
"setup_fee": "8.0",
"recurring_fee": "2.0",
"transfer_fee": "10.0",
"renewal_fee": "2.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "153",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.442+03:00",
"updated_at": "2016-10-28T11:25:02.722+03:00",
"duration_value": 2,
"duration_type": "month",
"setup_fee": "36.0",
"recurring_fee": "2.0",
"transfer_fee": "40.0",
"renewal_fee": "36.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "147",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.258+03:00",
"updated_at": "2019-07-29T13:30:47.461+03:00",
"duration_value": 3,
"duration_type": "day",
"setup_fee": "6.0",
"recurring_fee": "2.0",
"transfer_fee": "8.0",
"renewal_fee": "2.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "155",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.506+03:00",
"updated_at": "2016-10-28T11:25:02.685+03:00",
"duration_value": 3,
"duration_type": "month",
"setup_fee": "132.0",
"recurring_fee": "2.0",
"transfer_fee": "132.0",
"renewal_fee": "132.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "149",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.313+03:00",
"updated_at": "2016-10-28T11:25:02.777+03:00",
"duration_value": 2,
"duration_type": "year",
"setup_fee": "120.0",
"recurring_fee": "2.0",
"transfer_fee": "120.0",
"renewal_fee": "130.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "156",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.541+03:00",
"updated_at": "2016-10-28T11:25:02.666+03:00",
"duration_value": 3,
"duration_type": "year",
"setup_fee": "154.0",
"recurring_fee": "2.0",
"transfer_fee": "354.0",
"renewal_fee": "156.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "150",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.343+03:00",
"updated_at": "2016-10-28T11:25:02.074+03:00",
"duration_value": null,
"duration_type": null,
"setup_fee": "176.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "157",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.577+03:00",
"updated_at": "2016-10-28T11:25:02.646+03:00",
"duration_value": 4,
"duration_type": "month",
"setup_fee": "132.0",
"recurring_fee": "2.0",
"transfer_fee": "132.0",
"renewal_fee": "132.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "158",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-25T09:59:48.609+03:00",
"updated_at": "2016-10-25T09:59:48.609+03:00",
"duration_value": 5,
"duration_type": "month",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
}
]
},
"available_account_types": [
{
"id": 8,
"name": "Business BLR",
"created_at": "2016-10-18T10:57:38.367+03:00",
"updated_at": "2017-05-10T19:28:56.308+03:00",
"reseller_id": 4,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "businessblr",
"default_payment_method_id": null,
"ancestry": "2/67",
"use_by_default": false
},
{
"id": 9,
"name": "Personal BLR",
"created_at": "2016-10-18T10:57:38.386+03:00",
"updated_at": "2017-08-08T15:55:36.351+03:00",
"reseller_id": 4,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personalblr",
"default_payment_method_id": null,
"ancestry": "1/68",
"use_by_default": false
}
],
"custom_attributes": {
"item_1c_id": "Plan1cgetCH",
"item_1c_for_resellers": "",
"vat25": "0",
"attribute_2": "plannum",
"uniqueness": "PlanCH"
}
}
}
],
"meta": {
"currency": "USD"
}
}