## List Event Fields

### cURL

```bash
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/events/fields \
  --header 'Authorization: Bearer <token>'
```

```python
import requests

url = "https://api.m3ter.com/organizations/{orgId}/events/fields"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.m3ter.com/organizations/{orgId}/events/fields', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.m3ter.com/organizations/{orgId}/events/fields",\
  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: Bearer <token>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

url := "https://api.m3ter.com/organizations/{orgId}/events/fields"

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

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
```

```java
HttpResponse<String> response = Unirest.get("https://api.m3ter.com/organizations/{orgId}/events/fields")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.m3ter.com/organizations/{orgId}/events/fields")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

### Response Codes

- **200** : Success
- **4XX** : Client Errors
- **5XX** : Server Errors

### Response Sample
```json
{
  "events": {
    "configuration.commitment.created": {
      "new.accountCode": "string",
      "new.accountId": "string",
      "new.accountingProductId": "string",
      "new.amount": "double",
      "new.amountFirstBill": "double",
      "new.amountPrePaid": "double",
      "new.amountSpent": "double",
      "new.billEpoch": "string",
      "new.billingInterval": "int",
      "new.billingOffset": "int",
      "new.billingPlanId": "string",
      "new.commitmentFeeBillInAdvance": "boolean",
      "new.commitmentFeeDescription": "string",
      "new.commitmentUsageDescription": "string",
      "new.contractId": "string",
      "new.currency": "string",
      "new.customFields": "map",
      "new.endDate": "string",
      "new.feeDates": "array",
      "new.id": "string",
      "new.overageDescription": "string",
      "new.overageSurchargePercent": "double",
      "new.productIds": "array",
      "new.startDate": "string"
    }
  }
}
```

### Authorization
- **Authorization**: String, header, required
- **m3ter** supports machine to machine authentication using the `clientCredentials` OAuth2 flow.

### Path Parameters
- **orgId**: String, required, unique identifier (UUID) of your Organization.

### Query Parameters
- **eventName**: String, name of the specific Event Type to filter.
