# Club Automation

## Gaining API access

To get API credentials to access Club Automation data you will either need to be Daxko partner or, if you are Club Automation customer, you'll need to contact your Daxko rep.

{% embed url="<https://docs.partners.daxko.com/#getting-api-access>" %}

## Require credentials

To authenticate with Club Automation's APIs you'll need a `client_id` (corresponds to the API client), `client_secret`, and `scope_id` (corresponds to the Club Automation instance you are accessing). These are [entered in the Middle app connection](/middle-docs/building-workflows.md#app-connection).

| key             | value                                                                                                                                                                                                                                         |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client_id`     | This will be the username you were provided when your API credentials were generated.                                                                                                                                                         |
| `client_secret` | This will be the password you were provided when your API credentials were generated. **Your password should be securely stored and should only be required when you first generate your access token.**                                      |
| `scope`         | This is the ID for the customer/client you are trying to programmatically interact with. *Note that, while you may have access to multiple clients in your account, you will need to generate a new token for each client you are accessing.* |
| `grant_type`    | This will always be set to `client_credentials`when getting a new token.                                                                                                                                                                      |

{% embed url="<https://docs.partners.daxko.com/tutorials/authentication/#getting-a-new-set-of-jwt-credentials>" %}

## Sales data

Middle uses Club Automation's reports API to pull sales data. Middle uses the `BETA - Financial Sales Revenue` report.

{% hint style="warning" %}
You'll need to confirm that your API client has access to the reports API
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.middle.app/middle-docs/guides/app-reference/club-automation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
