cURL
curl --request POST \
--url https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id} \
--header 'Content-Type: application/json' \
--header 'X-Valyx-Signature: <x-valyx-signature>' \
--data '
{
"feeComponentId": "<string>",
"ratecardRelations": [
{
"ratecardId": "<string>"
}
]
}
'import requests
url = "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}"
payload = {
"feeComponentId": "<string>",
"ratecardRelations": [{ "ratecardId": "<string>" }]
}
headers = {
"X-Valyx-Signature": "<x-valyx-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Valyx-Signature': '<x-valyx-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({feeComponentId: '<string>', ratecardRelations: [{ratecardId: '<string>'}]})
};
fetch('https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'X-Valyx-Signature': '<x-valyx-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({feeComponentId: '<string>', ratecardRelations: [{ratecardId: '<string>'}]})
};
fetch('https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}"
payload := strings.NewReader("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Valyx-Signature", "<x-valyx-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")
.header("X-Valyx-Signature", "<x-valyx-signature>")
.header("Content-Type", "application/json")
.body("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeComponentId' => '<string>',
'ratecardRelations' => [
[
'ratecardId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/feeComponent/ratecard/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Valyx-Signature"] = '<x-valyx-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"feeComponentId": "<string>",
"ratecardRelations": [["ratecardId": "<string>"]]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Valyx-Signature": "<x-valyx-signature>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
val request = Request.Builder()
.url("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")
.post(body)
.addHeader("X-Valyx-Signature", "<x-valyx-signature>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()using RestSharp;
var options = new RestClientOptions("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Valyx-Signature", "<x-valyx-signature>");
request.AddJsonBody("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(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
Select RateCard for a fee component in a contract
POST
/
billing
/
contract
/
feeComponent
/
ratecard
/
{contract_id}
cURL
curl --request POST \
--url https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id} \
--header 'Content-Type: application/json' \
--header 'X-Valyx-Signature: <x-valyx-signature>' \
--data '
{
"feeComponentId": "<string>",
"ratecardRelations": [
{
"ratecardId": "<string>"
}
]
}
'import requests
url = "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}"
payload = {
"feeComponentId": "<string>",
"ratecardRelations": [{ "ratecardId": "<string>" }]
}
headers = {
"X-Valyx-Signature": "<x-valyx-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Valyx-Signature': '<x-valyx-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({feeComponentId: '<string>', ratecardRelations: [{ratecardId: '<string>'}]})
};
fetch('https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'X-Valyx-Signature': '<x-valyx-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({feeComponentId: '<string>', ratecardRelations: [{ratecardId: '<string>'}]})
};
fetch('https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}"
payload := strings.NewReader("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Valyx-Signature", "<x-valyx-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")
.header("X-Valyx-Signature", "<x-valyx-signature>")
.header("Content-Type", "application/json")
.body("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feeComponentId' => '<string>',
'ratecardRelations' => [
[
'ratecardId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/feeComponent/ratecard/{contract_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Valyx-Signature"] = '<x-valyx-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"feeComponentId": "<string>",
"ratecardRelations": [["ratecardId": "<string>"]]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Valyx-Signature": "<x-valyx-signature>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}")
val request = Request.Builder()
.url("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}")
.post(body)
.addHeader("X-Valyx-Signature", "<x-valyx-signature>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()using RestSharp;
var options = new RestClientOptions("https://api.valyx.com/billing/contract/feeComponent/ratecard/{contract_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Valyx-Signature", "<x-valyx-signature>");
request.AddJsonBody("{\n \"feeComponentId\": \"<string>\",\n \"ratecardRelations\": [\n {\n \"ratecardId\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(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
An optional fields mask
Auth key to authenticate the request
Path Parameters
Body
application/json
⌘I