Passer au contenu principal
GET
/
openapi
/
v1
/
billing
/
bill
/
list
Consulter les factures
curl --request GET \
  --url https://api.highwayapi.ai/openapi/v1/billing/bill/list \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
import requests

url = "https://api.highwayapi.ai/openapi/v1/billing/bill/list"

headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};

fetch('https://api.highwayapi.ai/openapi/v1/billing/bill/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/openapi/v1/billing/bill/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.highwayapi.ai/openapi/v1/billing/bill/list"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.highwayapi.ai/openapi/v1/billing/bill/list")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.highwayapi.ai/openapi/v1/billing/bill/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "bills": [
    {
      "userId": "<string>",
      "startTime": "<string>",
      "endTime": "<string>",
      "billingMethod": "<string>",
      "productName": "<string>",
      "category": "<string>",
      "ownerID": "<string>",
      "billNum0": "<string>",
      "billNum1": "<string>",
      "basePrice0": "<string>",
      "basePrice1": "<string>",
      "discountPrice0": "<string>",
      "discountPrice1": "<string>",
      "amount": "<string>",
      "voucherAmount": "<string>",
      "payAmount": "<string>",
      "payAmountDisplay": "<string>",
      "pricePrecision": "<string>",
      "productId": "<string>"
    }
  ]
}

En-têtes de requête

Content-Type
string
requis
Valeurs énumérées : application/json
Authorization
string
requis
Format d’authentification Bearer : Bearer {{API Key}}.

Informations de réponse

cycleType
string
requis
Granularité du cycle de facturation. Options :
  • Hour : par heure
  • Day: par jour
  • Week : par semaine
  • Month : par mois
productCategory
string
requis
Type de produit. Options :
  • summary : facture récapitulative
  • llm : grand modèle de langage
productName
string
Nom du produit. Prend en charge la correspondance approximative.
startTime
string
Heure de début du cycle de facturation à consulter, horodatage (secondes), valeur par défaut : 0.
endTime
string
Heure de fin du cycle de facturation à consulter, horodatage (secondes), valeur par défaut : 0.
ownerId
string
Spécifiez l’ID de l’instance à consulter.

Paramètres des informations de réponse

bills
object[]
requis
Informations de facturation des instances à la demande.