Skip to main content
GET
/
billing
/
org
/
v1
/
erp-invoices
cURL
curl --request GET \
  --url https://api.gcore.com/billing/org/v1/erp-invoices \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.gcore.com/billing/org/v1/erp-invoices"

headers = {"Authorization": "<api-key>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.gcore.com/billing/org/v1/erp-invoices', 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.gcore.com/billing/org/v1/erp-invoices",
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: <api-key>"
],
]);

$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.gcore.com/billing/org/v1/erp-invoices"

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

req.Header.Add("Authorization", "<api-key>")

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.gcore.com/billing/org/v1/erp-invoices")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.gcore.com/billing/org/v1/erp-invoices")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "count": 123,
  "results": [
    {
      "id": 123,
      "name": "<string>",
      "currency": "<string>",
      "invoice_date": "2023-12-25",
      "invoice_date_due": "2023-12-25",
      "billing_period_from": "2023-12-25",
      "billing_period_to": "2023-12-25",
      "amount_untaxed": "<string>",
      "amount_tax": "<string>",
      "amount_total": "<string>",
      "client_id": -1,
      "payer_id": 123,
      "invoice_id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100"
}

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

billing_period_from__from
string<date>

Billing period from (inclusive)

billing_period_to__to
string<date>

Billing period to (inclusive)

client_id
number

Filter by client ID

currency
string

Filter by currency code

invoice_date__from
string<date>

Invoice date from (inclusive)

invoice_date__to
string<date>

Invoice date to (inclusive)

limit
integer

Number of results to return per page. Maximum is 100.

move_type
enum<string>

Filter by move type: out_invoice or out_refund

  • out_invoice - out_invoice
  • out_refund - out_refund
Available options:
out_invoice,
out_refund
offset
integer

The initial index from which to return the results.

order_by
enum<string>[]

Ordering of the results.

For ascending sort order use field.asc, for descending sort order use field.desc.

For sorting by multiple parameters write them as comma separated string: client_id.asc,id.desc.

Final stable tiebreak ordering by primary key is added except when queryset DISTINCT ON is used or pk sorting used.

  • id.asc - Id
  • id.desc - Id (descending)
  • invoice_date.asc - Invoice date
  • invoice_date.desc - Invoice date (descending)
  • amount_total.asc - Amount total
  • amount_total.desc - Amount total (descending)
  • created_at.asc - Created at
  • created_at.desc - Created at (descending)
  • name.asc - Name
  • name.desc - Name (descending)
Available options:
amount_total.asc,
amount_total.desc,
created_at.asc,
created_at.desc,
id.asc,
id.desc,
invoice_date.asc,
invoice_date.desc,
name.asc,
name.desc
ordering
enum<string>[]

Ordering of the results.

This field is left for compatibility and can be deprecated in future versions. Use order_by instead.

Default sort order is ascending. Put - before value for descending sort order: -id.

For sorting by multiple parameters write them as comma separated string: -client_id,id.

Final stable tiebreak ordering by primary key is added except when queryset DISTINCT ON is used or pk sorting used.

  • id - Id
  • -id - Id (descending)
  • invoice_date - Invoice date
  • -invoice_date - Invoice date (descending)
  • amount_total - Amount total
  • -amount_total - Amount total (descending)
  • created_at - Created at
  • -created_at - Created at (descending)
  • name - Name
  • -name - Name (descending)
Available options:
-amount_total,
-created_at,
-id,
-invoice_date,
-name,
amount_total,
created_at,
id,
invoice_date,
name
payer_id
number

Filter by payer ID

payment_state
enum<string>

Filter by payment state

  • not_paid - not_paid
  • paid - paid
  • partial - partial
  • reversed - reversed
  • in_payment - in_payment
Available options:
in_payment,
not_paid,
paid,
partial,
reversed

Response

Request successful.

count
integer
required
Example:

123

results
object[]
required
next
string<uri> | null
Example:

"http://api.example.org/accounts/?offset=400&limit=100"

previous
string<uri> | null
Example:

"http://api.example.org/accounts/?offset=200&limit=100"