|
| 1 | +# hostinger_api.ReachCampaignsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**get_campaign_details_v1**](ReachCampaignsApi.md#get_campaign_details_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details |
| 8 | +[**get_campaign_performance_v1**](ReachCampaignsApi.md#get_campaign_performance_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance |
| 9 | +[**list_campaigns_v1**](ReachCampaignsApi.md#list_campaigns_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns |
| 10 | + |
| 11 | + |
| 12 | +# **get_campaign_details_v1** |
| 13 | +> ReachV1CampaignsCampaignDetailsResource get_campaign_details_v1(profile_uuid, campaign_uuid) |
| 14 | +
|
| 15 | +Get campaign details |
| 16 | + |
| 17 | +Get a single campaign with its sender, subject, template reference, targeting and delivery |
| 18 | +progress. |
| 19 | + |
| 20 | +This describes how the campaign was set up and how far it has got. For opens, clicks and |
| 21 | +unsubscribes use the campaign statistics endpoint. |
| 22 | + |
| 23 | +### Example |
| 24 | + |
| 25 | +* Bearer Authentication (apiToken): |
| 26 | + |
| 27 | +```python |
| 28 | +import hostinger_api |
| 29 | +from hostinger_api.models.reach_v1_campaigns_campaign_details_resource import ReachV1CampaignsCampaignDetailsResource |
| 30 | +from hostinger_api.rest import ApiException |
| 31 | +from pprint import pprint |
| 32 | + |
| 33 | + |
| 34 | +# Configure Bearer authorization: apiToken |
| 35 | +configuration = hostinger_api.Configuration( |
| 36 | + access_token = os.environ["BEARER_TOKEN"] |
| 37 | +) |
| 38 | + |
| 39 | +# Enter a context with an instance of the API client |
| 40 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 41 | + # Create an instance of the API class |
| 42 | + api_instance = hostinger_api.ReachCampaignsApi(api_client) |
| 43 | + profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter |
| 44 | + campaign_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Campaign uuid parameter |
| 45 | + |
| 46 | + try: |
| 47 | + # Get campaign details |
| 48 | + api_response = api_instance.get_campaign_details_v1(profile_uuid, campaign_uuid) |
| 49 | + print("The response of ReachCampaignsApi->get_campaign_details_v1:\n") |
| 50 | + pprint(api_response) |
| 51 | + except Exception as e: |
| 52 | + print("Exception when calling ReachCampaignsApi->get_campaign_details_v1: %s\n" % e) |
| 53 | +``` |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +### Parameters |
| 58 | + |
| 59 | + |
| 60 | +Name | Type | Description | Notes |
| 61 | +------------- | ------------- | ------------- | ------------- |
| 62 | + **profile_uuid** | **str**| Profile uuid parameter | |
| 63 | + **campaign_uuid** | **str**| Campaign uuid parameter | |
| 64 | + |
| 65 | +### Return type |
| 66 | + |
| 67 | +[**ReachV1CampaignsCampaignDetailsResource**](ReachV1CampaignsCampaignDetailsResource.md) |
| 68 | + |
| 69 | +### Authorization |
| 70 | + |
| 71 | +[apiToken](../README.md#apiToken) |
| 72 | + |
| 73 | +### HTTP request headers |
| 74 | + |
| 75 | + - **Content-Type**: Not defined |
| 76 | + - **Accept**: application/json |
| 77 | + |
| 78 | +### HTTP response details |
| 79 | + |
| 80 | +| Status code | Description | Response headers | |
| 81 | +|-------------|-------------|------------------| |
| 82 | +**200** | Success response | - | |
| 83 | +**401** | Unauthenticated response | - | |
| 84 | +**500** | Error response | - | |
| 85 | + |
| 86 | +[[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) |
| 87 | + |
| 88 | +# **get_campaign_performance_v1** |
| 89 | +> ReachV1CampaignsCampaignStatisticsResource get_campaign_performance_v1(profile_uuid, campaign_uuid) |
| 90 | +
|
| 91 | +Get campaign performance |
| 92 | + |
| 93 | +Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the |
| 94 | +matching rates. |
| 95 | + |
| 96 | +Every count is unique contacts rather than raw events, so a contact who opens the same email |
| 97 | +five times is counted once. |
| 98 | + |
| 99 | +### Example |
| 100 | + |
| 101 | +* Bearer Authentication (apiToken): |
| 102 | + |
| 103 | +```python |
| 104 | +import hostinger_api |
| 105 | +from hostinger_api.models.reach_v1_campaigns_campaign_statistics_resource import ReachV1CampaignsCampaignStatisticsResource |
| 106 | +from hostinger_api.rest import ApiException |
| 107 | +from pprint import pprint |
| 108 | + |
| 109 | + |
| 110 | +# Configure Bearer authorization: apiToken |
| 111 | +configuration = hostinger_api.Configuration( |
| 112 | + access_token = os.environ["BEARER_TOKEN"] |
| 113 | +) |
| 114 | + |
| 115 | +# Enter a context with an instance of the API client |
| 116 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 117 | + # Create an instance of the API class |
| 118 | + api_instance = hostinger_api.ReachCampaignsApi(api_client) |
| 119 | + profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter |
| 120 | + campaign_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Campaign uuid parameter |
| 121 | + |
| 122 | + try: |
| 123 | + # Get campaign performance |
| 124 | + api_response = api_instance.get_campaign_performance_v1(profile_uuid, campaign_uuid) |
| 125 | + print("The response of ReachCampaignsApi->get_campaign_performance_v1:\n") |
| 126 | + pprint(api_response) |
| 127 | + except Exception as e: |
| 128 | + print("Exception when calling ReachCampaignsApi->get_campaign_performance_v1: %s\n" % e) |
| 129 | +``` |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +### Parameters |
| 134 | + |
| 135 | + |
| 136 | +Name | Type | Description | Notes |
| 137 | +------------- | ------------- | ------------- | ------------- |
| 138 | + **profile_uuid** | **str**| Profile uuid parameter | |
| 139 | + **campaign_uuid** | **str**| Campaign uuid parameter | |
| 140 | + |
| 141 | +### Return type |
| 142 | + |
| 143 | +[**ReachV1CampaignsCampaignStatisticsResource**](ReachV1CampaignsCampaignStatisticsResource.md) |
| 144 | + |
| 145 | +### Authorization |
| 146 | + |
| 147 | +[apiToken](../README.md#apiToken) |
| 148 | + |
| 149 | +### HTTP request headers |
| 150 | + |
| 151 | + - **Content-Type**: Not defined |
| 152 | + - **Accept**: application/json |
| 153 | + |
| 154 | +### HTTP response details |
| 155 | + |
| 156 | +| Status code | Description | Response headers | |
| 157 | +|-------------|-------------|------------------| |
| 158 | +**200** | Success response | - | |
| 159 | +**401** | Unauthenticated response | - | |
| 160 | +**500** | Error response | - | |
| 161 | + |
| 162 | +[[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) |
| 163 | + |
| 164 | +# **list_campaigns_v1** |
| 165 | +> ReachListCampaignsV1200Response list_campaigns_v1(profile_uuid, status=status, type=type, sort_direction=sort_direction, page=page, per_page=per_page) |
| 166 | +
|
| 167 | +List campaigns |
| 168 | + |
| 169 | +Get a paginated list of the campaigns in a profile. |
| 170 | + |
| 171 | +Each campaign carries its headline engagement rates. Filter by status to find drafts, |
| 172 | +scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the |
| 173 | +status `publish`. By default only regular campaigns are returned - pass `type` to get the |
| 174 | +emails sent by automations or the double opt-in confirmations instead. |
| 175 | + |
| 176 | +### Example |
| 177 | + |
| 178 | +* Bearer Authentication (apiToken): |
| 179 | + |
| 180 | +```python |
| 181 | +import hostinger_api |
| 182 | +from hostinger_api.models.reach_list_campaigns_v1200_response import ReachListCampaignsV1200Response |
| 183 | +from hostinger_api.rest import ApiException |
| 184 | +from pprint import pprint |
| 185 | + |
| 186 | + |
| 187 | +# Configure Bearer authorization: apiToken |
| 188 | +configuration = hostinger_api.Configuration( |
| 189 | + access_token = os.environ["BEARER_TOKEN"] |
| 190 | +) |
| 191 | + |
| 192 | +# Enter a context with an instance of the API client |
| 193 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 194 | + # Create an instance of the API class |
| 195 | + api_instance = hostinger_api.ReachCampaignsApi(api_client) |
| 196 | + profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter |
| 197 | + status = 'publish' # str | Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived. (optional) |
| 198 | + type = campaign # str | Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. (optional) (default to campaign) |
| 199 | + sort_direction = 'desc' # str | Order campaigns by creation date. Newest first unless set to `asc`. (optional) |
| 200 | + page = 1 # int | Page number (optional) |
| 201 | + per_page = 25 # int | Number of items per page (optional) (default to 25) |
| 202 | + |
| 203 | + try: |
| 204 | + # List campaigns |
| 205 | + api_response = api_instance.list_campaigns_v1(profile_uuid, status=status, type=type, sort_direction=sort_direction, page=page, per_page=per_page) |
| 206 | + print("The response of ReachCampaignsApi->list_campaigns_v1:\n") |
| 207 | + pprint(api_response) |
| 208 | + except Exception as e: |
| 209 | + print("Exception when calling ReachCampaignsApi->list_campaigns_v1: %s\n" % e) |
| 210 | +``` |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | +### Parameters |
| 215 | + |
| 216 | + |
| 217 | +Name | Type | Description | Notes |
| 218 | +------------- | ------------- | ------------- | ------------- |
| 219 | + **profile_uuid** | **str**| Profile uuid parameter | |
| 220 | + **status** | **str**| Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived. | [optional] |
| 221 | + **type** | **str**| Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. | [optional] [default to campaign] |
| 222 | + **sort_direction** | **str**| Order campaigns by creation date. Newest first unless set to `asc`. | [optional] |
| 223 | + **page** | **int**| Page number | [optional] |
| 224 | + **per_page** | **int**| Number of items per page | [optional] [default to 25] |
| 225 | + |
| 226 | +### Return type |
| 227 | + |
| 228 | +[**ReachListCampaignsV1200Response**](ReachListCampaignsV1200Response.md) |
| 229 | + |
| 230 | +### Authorization |
| 231 | + |
| 232 | +[apiToken](../README.md#apiToken) |
| 233 | + |
| 234 | +### HTTP request headers |
| 235 | + |
| 236 | + - **Content-Type**: Not defined |
| 237 | + - **Accept**: application/json |
| 238 | + |
| 239 | +### HTTP response details |
| 240 | + |
| 241 | +| Status code | Description | Response headers | |
| 242 | +|-------------|-------------|------------------| |
| 243 | +**200** | Success response | - | |
| 244 | +**401** | Unauthenticated response | - | |
| 245 | +**500** | Error response | - | |
| 246 | + |
| 247 | +[[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) |
| 248 | + |
0 commit comments