Get the downstream Reseller's end-customer Charge information by ID
The Get the Child Reseller's end-customer Сharge by ID method returns end-customer Charge details of the downstream Reseller of the current Reseller.
The Manager's API token specified in an API request determines the current Reseller and downstream Resellers accessible within a method.
GET {base_url}/api/v3/resellers/{reseller_id}/child_reseller_charges/{charge_id}
Arguments
Name | Parameter Type | Data type | Required/ | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X-Api-Token | header | string | Required | API token of a Manager that performs the operation (see Viewing and updating manager's information) | ||||||||||||
Content-Type | header | string | Required | Media type of the request. Specify the following: application/vnd.api+json | ||||||||||||
Accept | header | string | Required | Supported media types of the answer. Specify the following: application/vnd.api+json | ||||||||||||
base_url | path | string | Required | ActivePlatform URL | ||||||||||||
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) | ||||||||||||
charge_id | path | string | Required | ID of the Charge | ||||||||||||
include | query | string | Optional | Returns additional information about objects related to Charges. The parameter can be a comma-separated list if information about several objects is required. The following objects and possible values are supported:
|
Response model
Name | Data type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array | Response data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | ID of the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Data type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes | object | Information about the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | date | Date and time of the Charge creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | date | Date and time when the Charge was updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id | integer | ID of the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_id | integer | ID of the Resource in the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | integer | The number of ordered Services or Resources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_from | date | The start date of the period paid by the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
duration | float | Period of the Charge (in months). For example, 1 day = 0.033, 2 years = 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Charge details description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unit_price | float | The unit price of the Service or Resource in the Plan currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
amount | float | Total amount of the Charge (Discount included) in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string | Status of the Charge (for the list of Charge statuses, see Charges attributes) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Type of the Charge (see also Charges attributes)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
net_cost | float | The net cost of the Charge in the Plan currency for the selected Reseller. For delegated Plans only | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes_amount | float | The amount of taxes for the Charge in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_name | string | Name of the Resource in the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource_id | integer | Name of the Resource in the customer's Plan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resource_id | integer | ID of the Resource | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_id | integer | ID of the Order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_to | date | The finish date of the period paid by the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
close_date | date | The close date of the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billing_date | date | Start date of the related Billing period | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
application_template_key | string | Key of the Application template linked to the Subscription (see Viewing and updating connector details) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
additional_params | array of objects | Additional parameters of the Charge for Services based on the following plugins:
In other cases, returns the empty array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | float | The amount of the Discount for the Charge in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
original_amount | string | Charge total amount in the Plan currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
original_amount_currency | string | Currency code of the Plan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency_rate | string | Exchange rate used for generating the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency_unit | integer | Currency units used for generating the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relationships | object | Related objects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes | object | Taxes information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reseller | object | Reseller information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | object | Account information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription | object | Subscription information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan | object | Plan information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource | object | Plan Resource information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | object | Discount information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included | array | Additional information about objects listed in the request:
Attributes of the object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | array | Additional information about the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | string | Reseller's currency |
Request example
GET /api/v3/resellers/1/child_reseller_charges/6118?include=reseller,account,subscription,plan,discount
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "6118",
"type": "charges",
"attributes": {
"created_at": "2016-11-30T12:35:53.737502+0300",
"updated_at": "2017-01-19T17:35:29.198370+0300",
"subscription_id": 315,
"subscription_resource_id": null,
"quantity": 1,
"operate_from": "2017-01-01",
"duration": 1,
"description": "Upgrade resource (recurring fee) \"HDD\" for Subscription #315 \"Auto provisioning w/o resources \"",
"unit_price": "0.0",
"amount": "0.5",
"status": "deleted",
"type": "Charge::Recurring",
"net_cost": null,
"taxes_amount": 0,
"subscription_resource_name": null,
"plan_resource_id": null,
"resource_id": null,
"order_id": 404,
"operate_to": "2017-01-31",
"close_date": "2017-01-31",
"billing_date": "2017-01-01",
"application_template_key": "",
"additional_params": [],
"discount": "0.50",
"original_amount": "0.5",
"original_amount_currency": "BYN",
"currency_rate": "1.0",
"currency_unit": 1
},
"relationships": {
"taxes": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "10",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "315",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "9",
"type": "plans"
}
},
"plan_resource": {
"data": null
},
"discount": {
"data": {
"id": "17",
"type": "discounts"
}
}
}
},
"included": [
{
"id": "1",
"type": "resellers",
"attributes": {...
}
},
{
"id": "10",
"type": "accounts",
"attributes": {...
},
"relationships": {...
}
},
{
"id": "315",
"type": "subscriptions",
"attributes": {
"created_at": "2016-11-30T12:35:53.369910+0300",
"updated_at": "2017-05-14T01:02:45.402943+0300",
"auto_renewal": false,
"billing_from": "2016-11-30",
"expiration_date": "2017-04-30",
"name": "Auto provisioning w/o resources ",
"auto_renew_point_days": 0,
"start_date": "2016-11-30",
"status": "deleted",
"payment_model": "prepay",
"payment_model_parameters": {}
}
},
{
"id": "9",
"type": "plans",
"attributes": {...
}
},
{
"id": "17",
"type": "discounts",
"attributes": {
"created_at": "2016-11-30T12:34:35.246+03:00",
"updated_at": "2016-11-30T16:39:35.514+03:00",
"name": "sale50",
"status": "inactive",
"type": "promo_code",
"percentage": "50.0",
"duration_from": null,
"duration_to": null
}
}
],
"meta": {
"currency": "BYN"
}
}