Events
Get event history for a company.
Returns a paginated list of events (changes) recorded for the specified company, including changes to officers, addresses, status, and other attributes.
Endpoint
GET /api/v1/companies/:company_id/events
Parameters
| Parameter | Type | In | Description |
|---|---|---|---|
company_id | integer | path | The unique identifier of the company. |
page | integer | query | Page number (default: 1). |
limit | integer | query | Records per page (default: 100). |
Code Examples
Get company events
import requests
url = 'https://statsnet.co/api/v1/companies/12345/events'
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/events';
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/events"
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
{
"events": [
{
"id": 1,
"jurisdiction": "kz",
"date": "2024-03-01T00:00:00Z",
"attr": "status",
"before": "Active",
"after": "Liquidated",
"identifier": "302233483"
}
],
"meta": [
{ "type": "status", "count": 1 },
{ "type": "address", "count": 3 }
],
"total": 4,
"pagination_total": 4,
"pagination_offset": 0
}
Error Handling
Error response
{
"status": 403,
"message": "access denied"
}