Obtaining the Interim Billing Information (GET /v1/charges/transition/YYYY/MM)

To get the interim billing information of each month in accordance with specified period and conditions.

Billing information of specific month can be obtained by specifying the 4 digits of the year as"YYYY" and the 2 digits of the month as "MM" in URI. For example : To get billing information of 2015/03 specify " /v1/charges/transition/2015/03" in the URI.

The start time of charging is defined 0 o'clock at the beginning of specified month, and the closing time of charging is time at the end of the day returned by collected_at.

Example: When returned "collected_at" is 2017-05-15T00:00:00.000, the usage amount from 0 o'clock on May 1, 2017 until 24 o'clock of May 15 at 2017 is returned.

Request Headers

X-Auth-Token:

Specify the authentication token ID.

Data Type Cardinality
String 1..1

Request Parameter

start_date

Specify start date and time in search range to display Collection period.("collected_at").

(ISO8601 Format : YYYY-MM-DD'T'hh:mm:ss.sss)

CAUTION:

This parameter is for specifing the range of time of the charge, not specifing the starting time of the billing total. Charging information corresponding to collected_at falling within the range of start_date and end_date is returned.

Since collected_at is represented by the begining time (00:00:00) of the charge closing date, set the date and time 24 hours before the time you want to specify.

Data Type Cardinality
String 1..1[Mandatory]

end_date

Specify end date and time in search range to display Collection period.("collected_at").

(ISO8601 Format : YYYY-MM-DD'T'hh:mm:ss.sss)

CAUTION:

This parameter is for specifing the range of time of the charge, not specifing the closing time of the billing total. Charging information corresponding to collected_at falling within the range of start_date and end_date is returned.

Since collected_at is represented by the begining time (00:00:00) of the account closing date, set the date and time 24 hours before the time you want to specify.

Data Type Cardinality
String 1..1[Mandatory]

domain_id

Specify the domain ID in refine search criteria. The default domain ID obtained from the authentication token is used.

Data Type Cardinality
String 0..1

project_id

Specify the Project ID in refine search criteria. Specifying this returns the aggregated billing information of every project.

Specify the Project ID in refine search criteria.When specified, return billing information totalized only for the designated project. Sub_div of the response element in this case is "P".

If omitted, totalized all the projects in the domain specified by domain_id (obtained from the authentication token when domain_id is omitted) instead of individual for each project, and return the totalized billing information. Sub_div of the response information in this case is "D".

Whether the summary range is the entire domain or the specified project depends on the specification of this parameter regardless of the specification of domain_id.

Data Type Cardinality
String 0..1

product_id

Specify Product ID in refine search criteria.

Data Type Cardinality
String 0..1

service_id

Specify Service ID in refine search criteria.

Data Type Cardinality
String 0..1

region_id

Specify Region ID (where resources are deployed) in refine search criteria.

Data Type Cardinality
String 0..1

Response Headers

Status

Returns the status of the request.

As per below or according to the status described in [Common API Error Information].

200:
Successful completion
Data Type Cardinality
Int 1..1

Content-Type

application/json

Data Type Cardinality
String 1..1

Response Elements

last_modified

Last modified date and time (UTC) of this data.

Displayed in ISO-8601 format as follows.

YYYY-MM-DD'T'hh:mm:ss.sss

It does not specify time zone.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

billing_month

Billing of the required month will be displayed in below format.

"YYYY-MM".

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

collected_at

Collection period of the data. The data indicated are calculated on the basis of usage of from Day 1, 00:00 Hrs of the month to date that is specified in the element "billing_month".

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

sub_div

Sub division of billing. Depending on the category, the following string is returned.
Each Domain:
"D"
Each Project :
"P"
Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

domain_id

Billable Domain ID.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

project_id

Billable Project ID.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

line_seq

Line number on the description.

Data Type Cardinality Parent Element Child Element(s)
Number 1..1 None None

detail_div

Details on the description. Depending on the category, the following string is returned.
Fixed Amount :
01
Time Period :
02
Usage :
03
Discount :
04
SubTotal :
05
Adjust:
07
Total :
08
Comment :
99
Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

reseller_id

Reseller ID of the Subscriber

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

product_id

Billable Product ID

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

region_id

Billable Region ID

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

service_provider_id

Service Provider ID of the product

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

product_name

Array containing the product name for each language.

List of each element with object type has following members.
"lang"(String) :
Language Code(ISO639-1)
"value"(String) :
Product Name
Data Type Cardinality Parent Element Child Element(s)
Array 1..1 None None

comment

Array containing remarks information for each language.

List of each element with object type has following members.
"lang"(String) :
Language Code(ISO639-1)
"value"(String) :
Remarks
Data Type Cardinality Parent Element Child Element(s)
Array 1..1 None None

usage

Billing as per Usage

Data Type Cardinality Parent Element Child Element(s)
Number 1..1 None None

unit_price

Unit price of products

Data Type Cardinality Parent Element Child Element(s)
Number 1..1 None None

unit_name

Array containing units of usage for each language.

List of each element with object type has following members.
"lang"(String) :
Language Code(ISO639-1)
"value"(String) :
String that represents the unit.
Data Type Cardinality Parent Element Child Element(s)
Array 1..1 None None

charge

Billing Amount

Data Type Cardinality Parent Element Child Element(s)
Number 1..1 None None

currency_code

Currency code of the billing amount (ISO4217)

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None None

Example of Request


       GET /v1/charges/transition/2018/05?start_date=2018-05-02T00:00:00.000&end_date=2018-05-06T00:00:00.000&region_id=de-1
       & service_id=compute& product_id=VMXXXX -H 'X-Auth-Token:511ec1290.....' -H 'Content-Type:application/json' 
       -H 'Accept:application/json'    
     

Example of Response


HTTP/1.1 200 OK
Content-Type : application/json

[
{
"last_modified": "2018-05-03T06:06:34.600",
"billing_month": "2018-05",
"sub_div": "D",
"collected_at": "2018-05-02T00:00:00.000",
"domain_id": "59856ae83b.....",
"project_id": "",
"line_seq": 134,
"detail_div": "03",
"reseller_id": "jp.fujitsu.com",
"product_id": "VMXXXX",
"region_id": "de-1",
"service_provider_id": "fcx.fujitsu.com",
"service_id": "compute",
"product_name": [
{
"lang": "en",
"value": "Virtual Server S-1 type"
}
],
"comment": [
],
"usage": 352,
"unit_price": 7.88,
"unit_name": [
{
"lang": "en",
"value": "Number*Hours"
}
],
"charge": 2773.76,
"currency_code": "JPY"
},
{
"last_modified": "2018-05-04T06:06:31.029",
"billing_month": "2018-05",
"sub_div": "D",
"collected_at": "2018-05-03T00:00:00.000",
"domain_id": "59856ae83b.....",
"project_id": "",
"line_seq": 134,
"detail_div": "03",
"reseller_id": "jp.fujitsu.com",
"product_id": "VMXXXX",
"region_id": "de-1",
"service_provider_id": "fcx.fujitsu.com",
"service_id": "compute",
"product_name": [
{
"lang": "en",
"value": "Virtual Server S-1 type"
}
],
"comment": [
],
"usage": 528,
"unit_price": 7.88,
"unit_name": [
{
"lang": "en",
"value": "Number*Hours"
}
],
"charge": 4160.64,
"currency_code": "JPY"
},
{
"last_modified": "2018-05-05T06:06:54.581",
"billing_month": "2018-05",
"sub_div": "D",
"collected_at": "2018-05-04T00:00:00.000",
"domain_id": "59856ae83b.....",
"project_id": "",
"line_seq": 134,
"detail_div": "03",
"reseller_id": "jp.fujitsu.com",
"product_id": "VMXXXX",
"region_id": "de-1",
"service_provider_id": "fcx.fujitsu.com",
"service_id": "compute",
"product_name": [
{
"lang": "en",
"value": "Virtual Server S-1 type"
}
],
"comment": [
],
"usage": 704,
"unit_price": 7.88,
"unit_name": [

{
"lang": "en",
"value": "Number*Hours"
}
],
"charge": 5547.52,
"currency_code": "JPY"
},
{
"last_modified": "2018-05-06T06:07:09.723",
"billing_month": "2018-05",
"sub_div": "D",
"collected_at": "2018-05-05T00:00:00.000",
"domain_id": "59856ae83b.....",
"project_id": "",
"line_seq": 134,
"detail_div": "03",
"reseller_id": "jp.fujitsu.com",
"product_id": "VMXXXX",
"region_id": "de-1",
"service_provider_id": "fcx.fujitsu.com",
"service_id": "compute",
"product_name": [
{
"lang": "en",
"value": "Virtual Server S-1 type"
}
],
"comment": [
],
"usage": 880,
"unit_price": 7.88,
"unit_name": [
{
"lang": "en",
"value": "Number*Hours"
}
],
"charge": 6934.4,
"currency_code": "JPY"
},
{
"last_modified": "2018-05-07T06:07:30.022",
"billing_month": "2018-05",
"sub_div": "D",
"collected_at": "2018-05-06T00:00:00.000",
"domain_id": "59856ae83b.....",
"project_id": "",
"line_seq": 134,
"detail_div": "03",
"reseller_id": "jp.fujitsu.com",
"product_id": "VMXXXX",
"region_id": "de-1",
"service_provider_id": "fcx.fujitsu.com",
"service_id": "compute",
"product_name": [
{
"lang": "en",
"value": "Virtual Server S-1 type"
}
],
"comment": [

],
"usage": 1056,
"unit_price": 7.88,
"unit_name": [
{
"lang": "en",
"value": "Number*Hours"
}
],
"charge": 8321.28,
"currency_code": "JPY"
}
]