Quasi-Contracts Metadata
Get quasi-contract metadata for a company.
Returns metadata about quasi-contracts associated with the specified company.
Endpoint
GET /api/v1/companies/:company_id/quasi_contracts/meta
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
company_id | integer | path | The unique identifier of the company. |
Code Examples
Get quasi-contracts metadata
import requests
url = 'https://statsnet.co/api/v1/companies/12345/quasi_contracts/meta'
headers = {
'Authorization': 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers).json()
print(response)
const url = 'https://statsnet.co/api/v1/companies/12345/quasi_contracts/meta';
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://statsnet.co/api/v1/companies/12345/quasi_contracts/meta"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer sk_live_YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Response
Success response
{
"meta": [
{ "amount": 5000000, "count": 2, "year": 2024 },
{ "amount": 3200000, "count": 1, "year": 2023 }
],
"total": 3
}
Error Handling
Error response
{
"status": 403,
"message": "access denied"
}
This is a paid endpoint. It can also respond with 402 — {"status": 402, "message": "payment required"} — when the subscription is expired, canceled, or past due, and 429 — {"status": 429, "message": "quota exhausted"} — when the plan’s report quota for the current period is used up.