> For the complete documentation index, see [llms.txt](https://docs.paytota.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paytota.com/payments/company-statements.md).

# Company Statements

## Schedule a statement generation

<mark style="color:green;">`POST`</mark> `{base url}/api/v1/company_statements/`

This request allows you to schedule statement generation for a company. The response will include an object with fields such as `id`, `status`, and `download_url`. These are the key fields to focus on.

#### Headers

| Name                                            | Type   | Description          |
| ----------------------------------------------- | ------ | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json     |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer               |
| Token<mark style="color:red;">\*</mark>         | String | **`{{secret key}}`** |

{% tabs %}
{% tab title="201: Created " %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Payload" %}

```json
{
  "format": "csv",
  "timezone": "UTC"
}
```

{% endtab %}

{% tab title="Response" %}
{% code overflow="wrap" fullWidth="false" %}

```json
{
  "format": "csv",
  "timezone": "UTC",
  "is_test": false,
  "company_uid": "706d0675-b131-468c-940d-bc0ea3599e7f",
  "query_string": "",
  "status": "pending",
  "download_url": null,
  "began_on": null,
  "finished_on": null,
  "created_on": 1698322275,
  "updated_on": 1698322275,
  "type": "statement_request",
  "id": "1dd24660-527d-422a-9bfa-937c5b752eb0"
}
```

{% endcode %}
{% endtab %}

{% tab title="Optional Parameters" %}

| Name                                | Description                                                                                                                                  |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **from** integer(query)             | Filter result set to only include values older or equal to the provided Unix timestamp                                                       |
| **to** integer(query)               | Filter result set to only include values younger than the provided Unix timestamp                                                            |
| **paid\_from** integer(query)       | Filter paid result set to only include values older or equal to the provided Unix timestamp                                                  |
| **paid\_to** integer(query)         | Filter paid result set to only include values younger than the provided Unix timestamp                                                       |
| **updated\_from** integer(query)    | Filter result set to only include values older or equal to the provided last modification time Unix timestamp                                |
| **updated\_to** integer(query)      | Filter result set to only include values younger than the provided last modification time Unix timestamp                                     |
| **brand\_id** string($uuid)(query)  | Filter result set to only include the specified brand UUID(s)                                                                                |
| **shop\_id** string($uuid)(query)   | Filter result set to only include the specified shop UUID(s)                                                                                 |
| **q** string($string)(query)        | Filter result set to only include results including a specified text (search over a ton of text fields)                                      |
| **products** string($string)(query) | Filter result set to only include results including a specified text in products                                                             |
| **total** string($float)(query)     | Filter result set to only include results with a total between min and max value. Must include 2 values, if any - (min, max).                |
| **currency** string(query)          | Filter result set to only include specified currency(ies)                                                                                    |
| **payment\_method** string(query)   | <p>Filter result set to only include specified payment methods(s). </p><p><em>Available values</em> : maestro, mastercard, unknown, visa</p> |

|                                                |                                                                                                                                                                                                                           |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **three\_d\_secure** string($bool)(query)      | Filter result set to only include results with a 3-D verification.                                                                                                                                                        |
| **country** string($ISO 3166-1 alpha-2)(query) | Filter result set to only include specified client country(ies) in ISO 3166-1 alpha-2 format                                                                                                                              |
| **status** string($string)(query)              | Filter result set to only include results with a specific status.                                                                                                                                                         |
| **product** string(query)                      | <p>Filter result set to only include specified products(s). </p><p><em>Available values</em> : bank\_payment, chargeback, custom\_payment, invoice, payout, payout\_balance\_transfer, purchase, refund, subscription</p> |
| {% endtab %}                                   |                                                                                                                                                                                                                           |
| {% endtabs %}                                  |                                                                                                                                                                                                                           |

## &#x20;Retrieve a statement by ID.

<mark style="color:blue;">`GET`</mark> `{base url}/api/v1/company_statements/{id}/`

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json            |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer **`{{secret key}}`** |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response" %}
{% code overflow="wrap" %}

```json5
{
  "format": "csv",
  "timezone": "UTC",
  "is_test": false,
  "company_uid": "706d0675-b131-468c-940d-bc0ea3599e7f",
  "query_string": "",
  "status": "success",
  "download_url": "https://paytota-private.s3.af-south-1.amazonaws.com/706d0675-b131-468c-940d-bc0ea3599e7f/src/statement/022b9a1f-1411-4d60-b7e9-4e7daaf6903b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA2DOUUV7G3EN%2F20231026%2Faf-south-1%2Fs3%2Faws4_request&X-Amz-Date=20231026T124044Z&X-Amz-pires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=e7fd9eda97b07abadb9caad3f555a9a06815db541a4bec11110a87ed699d",
  "began_on": 1698322277,
  "finished_on": 1698322277,
  "created_on": 1698322275,
  "updated_on": 1698322277,
  "type": "statement_request",
  "id": "1dd24660-527d-422a-9bfa-937c5b752eb0"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
