# EmailReceiptsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getEmailReceipt**](#getemailreceipt) | **GET** /logs/email-receipts/{emailReceiptId} | Get an email receipt|
|[**getEmailReceipts**](#getemailreceipts) | **GET** /logs/email-receipts | List email receipts|

# **getEmailReceipt**
> GetEmailReceipt200Response getEmailReceipt()

Returns a single logged email receipt by ID, including its delivery status; requires read permission on logs.

### Example

```typescript
import {
    EmailReceiptsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new EmailReceiptsApi(configuration);

let emailReceiptId: string; //The emailReceipt identifier (default to undefined)

const { status, data } = await apiInstance.getEmailReceipt(
    emailReceiptId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **emailReceiptId** | [**string**] | The emailReceipt identifier | defaults to undefined|


### Return type

**GetEmailReceipt200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getEmailReceipts**
> GetEmailReceipts200Response getEmailReceipts()

Returns a paginated list of logged email receipts for the organization, optionally filtered by delivery status and searched by keyword; requires read permission on logs.

### Example

```typescript
import {
    EmailReceiptsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new EmailReceiptsApi(configuration);

let status: EmailReceiptStatus; //Filter by status (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getEmailReceipts(
    status,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **status** | **EmailReceiptStatus** | Filter by status | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetEmailReceipts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

