GET
/
billing
/
v1
/
org
/
expenses
Get reseller's account expenses
curl --request GET \
  --url https://api.gcore.com/billing/v1/org/expenses \
  --header 'Authorization: <api-key>'
{
  "count": 123,
  "next": "https://api.gcore.com/billing/v1/org/expenses?offset=20&limit=10",
  "previous": "https://api.gcore.com/billing/v1/org/expenses?offset=20&limit=10",
  "results": [
    {
      "id": 123,
      "addendum_id": 123,
      "contract_id": 123,
      "subscription_fee_id": 123,
      "client_id": 123,
      "client_company": "<string>",
      "plan_id": 123,
      "plan_name_en": "<string>",
      "period_date": "2023-11-07T05:31:56Z",
      "for_date": "2023-11-07T05:31:56Z",
      "plan_item_id": 123,
      "feature_id": 123,
      "feature_name_en": "<string>",
      "feature_name_ru": "<string>",
      "calc_rule_type": "<string>",
      "currency_char_code": "<string>",
      "product_name": "<string>",
      "product_internal_name": "<string>",
      "money_value": "<string>",
      "tax_value": "<string>",
      "tax_type": "<string>",
      "tax_rate": "<string>",
      "usage": "<string>",
      "unit_name_en": "<string>",
      "unit_name_ru": "<string>",
      "description": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "plan_item_description": "<string>",
      "discount_id": 123,
      "discount_value": "<string>",
      "discount_relative_value": "<string>",
      "product_id": 123,
      "subscription_id": 123,
      "deleted": true,
      "comment": "<string>",
      "product_category_id": 123,
      "statistic_region_id": 123,
      "product_category_name": "CDN",
      "feature": {
        "id": 123,
        "name_en": "<string>",
        "name_ru": "<string>",
        "product_id": 123,
        "product_name_en": "<string>",
        "sap_id": 123,
        "statistic_unit_id": 123,
        "statistic_unit_name_en": "<string>",
        "metrics_data": [
          {
            "id": 123,
            "int_name": "<string>"
          }
        ],
        "regions_data": [
          {
            "id": 123,
            "name_en": "<string>",
            "int_name": "<string>"
          }
        ],
        "rounding_rule": {
          "id": 123,
          "unit_id": 123,
          "unit_name": "<string>",
          "round_operation": "<string>",
          "value": "<string>"
        },
        "metric_id": 123,
        "archive": true,
        "product_category_id": 123,
        "product_category_name": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

created_at
string<date-time>

Specifies the exact date when the expenses were created, (ISO 8601/RFC 3339 format, UTC.) You can specify a date with a time separated by a space, or just a date. Examples:

  • &created_at=2021-05-05 12:00:00
  • &created_at=2021-05-05
id
integer

Specify an expense ID.

addendum_id
integer

Specify an addendum ID for which you need to get a list of expenses.

discount_id
integer

Specify a discount ID for which you need to get a list of expenses.

feature_name_en
string

Specify features name.

product_id
integer

Specify product ID. Possible values:

IDNameInternal Name
1CDNCDN
2Object StorageSTORAGE
3Web SecurityDDOS
4StreamingSTREAMING
5CloudCLOUD
6Colocation ServicesCONNECT
9DDoS ProtectionINFRASTRUCTURE_PROTECTION
10Managed DNSDNS
11Other ServicesOTHER_SERVICES
12Premium SupportPREMIUM_SUPPORT
13ConnectivityCONNECTIVITY
14Hosting (G-Hosting)GHOST
15Managed ServicesMANAGED_SERVICES
16RentRENT
17Software developmentSOFTWARE_DEVELOPMENT
18VM WareVMWARE
19LaaSLAAS
20AWS CloudAWS_CLOUD
21Fast EdgeFAST_EDGE
22Technical SupportTECHNICAL_SUPPORT
product_name
string

Specify a product's name. Possible values:

IDNameInternal Name
1CDNCDN
2Object StorageSTORAGE
3Web SecurityDDOS
4StreamingSTREAMING
5CloudCLOUD
6Colocation ServicesCONNECT
9DDoS ProtectionINFRASTRUCTURE_PROTECTION
10Managed DNSDNS
11Other ServicesOTHER_SERVICES
12Premium SupportPREMIUM_SUPPORT
13ConnectivityCONNECTIVITY
14Hosting (G-Hosting)GHOST
15Managed ServicesMANAGED_SERVICES
16RentRENT
17Software developmentSOFTWARE_DEVELOPMENT
18VM WareVMWARE
19LaaSLAAS
20AWS CloudAWS_CLOUD
21Fast EdgeFAST_EDGE
22Technical SupportTECHNICAL_SUPPORT
product_internal_name
enum<string>

Specify a product's internal name. Possible values:

IDNameInternal Name
1CDNCDN
2Object StorageSTORAGE
3Web SecurityDDOS
4StreamingSTREAMING
5CloudCLOUD
6Colocation ServicesCONNECT
9DDoS ProtectionINFRASTRUCTURE_PROTECTION
10Managed DNSDNS
11Other ServicesOTHER_SERVICES
12Premium SupportPREMIUM_SUPPORT
13ConnectivityCONNECTIVITY
14Hosting (G-Hosting)GHOST
15Managed ServicesMANAGED_SERVICES
16RentRENT
17Software developmentSOFTWARE_DEVELOPMENT
18VM WareVMWARE
19LaaSLAAS
20AWS CloudAWS_CLOUD
21Fast EdgeFAST_EDGE
22Technical SupportTECHNICAL_SUPPORT
Available options:
CDN,
STORAGE,
DDOS,
STREAMING,
CLOUD,
CONNECT,
INFRASTRUCTURE_PROTECTION,
DNS,
OTHER_SERVICES,
PREMIUM_SUPPORT,
CONNECTIVITY,
GHOST,
MANAGED_SERVICES,
RENT,
SOFTWARE_DEVELOPMENT,
VMWARE,
LAAS,
AWS_CLOUD,
FAST_EDGE,
TECHNICAL_SUPPORT
currency
enum<string>

Specify the code for the expense's currency. Possible values:

  • EUR - for EUR
  • USD - for USD
Available options:
EUR,
USD
period_date
string<date>

Specify the exact period date of the expenses period (ISO 8601/RFC 3339 format, UTC.) Examples:

  • ._date=2021-05-05
period_date__from
string<date>

Specify the start date for the expenses period (ISO 8601/RFC 3339 format, UTC.) Examples:

  • ._date__from=2021-05-05
period_date__to
string<date>

Specify the end of the date for the expenses period (ISO 8601/RFC 3339 format, UTC.) Examples:

  • ._date__to=2021-05-05
for_date
string<date>

Specifies the exact expenses date, (ISO 8601/RFC 3339 format, UTC.) Examples:

  • &for_date=2021-05-05
for_date__from
string<date>

Specify the start date for the expenses (ISO 8601/RFC 3339 format, UTC.) Examples:

  • &for_date__from=2021-05-05
for_date__to
string<date>

Specify the end date for the expenses (ISO 8601/RFC 3339 format, UTC.) Examples:

  • &for_date__to=2021-05-05
created_at__from
string<date-time>

Specifies the start of the date range when the expenses were created (ISO 8601/RFC 3339 format, UTC.). You can specify a date with a time separated by a space, or just a date. Examples:

  • &created_at__from=2021-05-05 12:00:00
  • &created_at__from=2021-05-05
created_at__to
string<date-time>

Specifies the end of the date range when the expenses were created (ISO 8601/RFC 3339 format, UTC.). You can specify a date with a time separated by a space, or just a date. Examples:

  • &created_at__to=2021-05-05 12:00:00
  • &created_at__to=2021-05-05
invoice_id
integer

Specify invoice ID

money_value__from
string

Specify the initial value for the range of expense amount values

money_value__to
string

Specify the end value for the range of expense amount values

money_value
string

Specify the specific value for the range of expense amount values

client_company_name
string

A name of the client's company (or client's name)

calc_rule
enum<string>

Specify a calculation rule

Available options:
commit,
overcommit,
stepped,
staged,
unit
plan_name_en
string

Specify a plan name

plan_id
integer

Specify a plan ID

deleted
enum<string>

Indication of deleted expense Has two possible values:

  • false - expense exists
  • true - expense doesn't exist Default is false
comment
string

Optional comment for specific expenses.

description
string

Optional description for describing expenses.

client_id
integer

Specifies the account or reseller technical client ID

contract_id
integer

Specifies the contract_id

rounding
enum<string>

Indication of rounding rule for expenses money_value Has two possible values:

  • false - don't round the money_value
  • true - round the money_value Default is true
ordering
enum<string>

Ordering

Available options:
period_date,
-period_date,
for_date,
-for_date,
money_value,
-money_value,
currency,
-currency,
created_at,
-created_at,
service_name,
-service_name,
id,
-id
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

Response

200 - application/json

OK

The response is of type object.