cURL
curl --request GET \
--url https://api.valyx.com/billing/contract/filter \
--header 'X-Valyx-Signature: <x-valyx-signature>'import requests
url = "https://api.valyx.com/billing/contract/filter"
headers = {"X-Valyx-Signature": "<x-valyx-signature>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Valyx-Signature': '<x-valyx-signature>'}};
fetch('https://api.valyx.com/billing/contract/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'X-Valyx-Signature': '<x-valyx-signature>'}};
fetch('https://api.valyx.com/billing/contract/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyx.com/billing/contract/filter"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Valyx-Signature", "<x-valyx-signature>")
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.valyx.com/billing/contract/filter")
.header("X-Valyx-Signature", "<x-valyx-signature>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyx.com/billing/contract/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Valyx-Signature: <x-valyx-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.valyx.com/billing/contract/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Valyx-Signature"] = '<x-valyx-signature>'
response = http.request(request)
puts response.read_bodyimport Foundation
let url = URL(string: "https://api.valyx.com/billing/contract/filter")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["X-Valyx-Signature": "<x-valyx-signature>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.valyx.com/billing/contract/filter")
.get()
.addHeader("X-Valyx-Signature", "<x-valyx-signature>")
.build()
val response = client.newCall(request).execute()using RestSharp;
var options = new RestClientOptions("https://api.valyx.com/billing/contract/filter");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Valyx-Signature", "<x-valyx-signature>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"error": "<string>",
"message": "<string>",
"data": {
"totalDocs": 123,
"docs": [
{
"id": {},
"customerId": {},
"contractNumber": {},
"contractTitle": {},
"contractPeriod": {},
"renewalPeriod": {},
"noteContract": {},
"billingFrequency": {},
"usageBillingCycle": {},
"estimateCycle": {},
"billingTime": {},
"startDate": {},
"virtualStartDate": {},
"endDate": {},
"nextBillingDate": {},
"billingDiscounts": {},
"isPreusage": {},
"billingReportLimit": {},
"contractLimit": {},
"creditTermId": {},
"poNumber": {},
"placeOfSupply": {},
"billingAddress": {},
"shippingAddress": {},
"totalInvoicedAmount": {},
"noteInvoice": {},
"terms": {},
"advanceConfig": {},
"invoiceSplitConfig": {},
"gstin": {},
"companyGstin": {},
"currency": {},
"currencyId": {},
"companyId": {},
"createdBy": {},
"updatedBy": {},
"status": {},
"autoRenew": {}
}
],
"hasNext": true,
"hasPrev": true,
"pageNumber": 123,
"pageSize": 123,
"totalPages": 123,
"prevPageNumber": 123,
"nextPageNumber": 123
}
}APIs
Filter Contracts
GET
/
billing
/
contract
/
filter
cURL
curl --request GET \
--url https://api.valyx.com/billing/contract/filter \
--header 'X-Valyx-Signature: <x-valyx-signature>'import requests
url = "https://api.valyx.com/billing/contract/filter"
headers = {"X-Valyx-Signature": "<x-valyx-signature>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Valyx-Signature': '<x-valyx-signature>'}};
fetch('https://api.valyx.com/billing/contract/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'X-Valyx-Signature': '<x-valyx-signature>'}};
fetch('https://api.valyx.com/billing/contract/filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyx.com/billing/contract/filter"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Valyx-Signature", "<x-valyx-signature>")
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.valyx.com/billing/contract/filter")
.header("X-Valyx-Signature", "<x-valyx-signature>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyx.com/billing/contract/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Valyx-Signature: <x-valyx-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.valyx.com/billing/contract/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Valyx-Signature"] = '<x-valyx-signature>'
response = http.request(request)
puts response.read_bodyimport Foundation
let url = URL(string: "https://api.valyx.com/billing/contract/filter")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["X-Valyx-Signature": "<x-valyx-signature>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.valyx.com/billing/contract/filter")
.get()
.addHeader("X-Valyx-Signature", "<x-valyx-signature>")
.build()
val response = client.newCall(request).execute()using RestSharp;
var options = new RestClientOptions("https://api.valyx.com/billing/contract/filter");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Valyx-Signature", "<x-valyx-signature>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"error": "<string>",
"message": "<string>",
"data": {
"totalDocs": 123,
"docs": [
{
"id": {},
"customerId": {},
"contractNumber": {},
"contractTitle": {},
"contractPeriod": {},
"renewalPeriod": {},
"noteContract": {},
"billingFrequency": {},
"usageBillingCycle": {},
"estimateCycle": {},
"billingTime": {},
"startDate": {},
"virtualStartDate": {},
"endDate": {},
"nextBillingDate": {},
"billingDiscounts": {},
"isPreusage": {},
"billingReportLimit": {},
"contractLimit": {},
"creditTermId": {},
"poNumber": {},
"placeOfSupply": {},
"billingAddress": {},
"shippingAddress": {},
"totalInvoicedAmount": {},
"noteInvoice": {},
"terms": {},
"advanceConfig": {},
"invoiceSplitConfig": {},
"gstin": {},
"companyGstin": {},
"currency": {},
"currencyId": {},
"companyId": {},
"createdBy": {},
"updatedBy": {},
"status": {},
"autoRenew": {}
}
],
"hasNext": true,
"hasPrev": true,
"pageNumber": 123,
"pageSize": 123,
"totalPages": 123,
"prevPageNumber": 123,
"nextPageNumber": 123
}
}Headers
Auth key for fetching ledger entries
An optional fields mask
Query Parameters
Customer ID of the customer
Buyer ID of the customer
Value of the contract duration (if contract duration is 3 years, value will be 3)
Unit of the contract duration (if contract duration is 3 years, unit will be YEAR)
Value of the billing frequency (if billing frequency is 2 months, value will be 2)
Unit of the billing frequency (if billing frequency is 2 months, unit will be MONTH)
Start date of the next billing date filter
End date of the next billing date filter
Available options:
ACTIVE, DRAFT, CANCELLED, EXPIRED ⌘I