|
| 1 | +# sib_api_v3_sdk.AttributesApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.sendinblue.com/v3* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact attributes |
| 8 | +[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute |
| 9 | +[**get_attributes**](AttributesApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes |
| 10 | + |
| 11 | + |
| 12 | +# **create_attribute** |
| 13 | +> CreateModel create_attribute(create_attribute) |
| 14 | +
|
| 15 | +Creates contact attributes |
| 16 | + |
| 17 | +### Example |
| 18 | +```python |
| 19 | +from __future__ import print_function |
| 20 | +import time |
| 21 | +import sib_api_v3_sdk |
| 22 | +from sib_api_v3_sdk.rest import ApiException |
| 23 | +from pprint import pprint |
| 24 | + |
| 25 | +# Configure API key authorization: api-key |
| 26 | +sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY' |
| 27 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 28 | +# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer' |
| 29 | + |
| 30 | +# create an instance of the API class |
| 31 | +api_instance = sib_api_v3_sdk.AttributesApi() |
| 32 | +create_attribute = sib_api_v3_sdk.CreateAttribute() # CreateAttribute | Values to create an attribute |
| 33 | + |
| 34 | +try: |
| 35 | + # Creates contact attributes |
| 36 | + api_response = api_instance.create_attribute(create_attribute) |
| 37 | + pprint(api_response) |
| 38 | +except ApiException as e: |
| 39 | + print("Exception when calling AttributesApi->create_attribute: %s\n" % e) |
| 40 | +``` |
| 41 | + |
| 42 | +### Parameters |
| 43 | + |
| 44 | +Name | Type | Description | Notes |
| 45 | +------------- | ------------- | ------------- | ------------- |
| 46 | + **create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | |
| 47 | + |
| 48 | +### Return type |
| 49 | + |
| 50 | +[**CreateModel**](CreateModel.md) |
| 51 | + |
| 52 | +### Authorization |
| 53 | + |
| 54 | +[api-key](../README.md#api-key) |
| 55 | + |
| 56 | +### HTTP request headers |
| 57 | + |
| 58 | + - **Content-Type**: application/json |
| 59 | + - **Accept**: application/json |
| 60 | + |
| 61 | +[[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) |
| 62 | + |
| 63 | +# **delete_attribute** |
| 64 | +> delete_attribute(attribute_id) |
| 65 | +
|
| 66 | +Deletes an attribute |
| 67 | + |
| 68 | +### Example |
| 69 | +```python |
| 70 | +from __future__ import print_function |
| 71 | +import time |
| 72 | +import sib_api_v3_sdk |
| 73 | +from sib_api_v3_sdk.rest import ApiException |
| 74 | +from pprint import pprint |
| 75 | + |
| 76 | +# Configure API key authorization: api-key |
| 77 | +sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY' |
| 78 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 79 | +# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer' |
| 80 | + |
| 81 | +# create an instance of the API class |
| 82 | +api_instance = sib_api_v3_sdk.AttributesApi() |
| 83 | +attribute_id = 'attribute_id_example' # str | id of the attribute |
| 84 | + |
| 85 | +try: |
| 86 | + # Deletes an attribute |
| 87 | + api_instance.delete_attribute(attribute_id) |
| 88 | +except ApiException as e: |
| 89 | + print("Exception when calling AttributesApi->delete_attribute: %s\n" % e) |
| 90 | +``` |
| 91 | + |
| 92 | +### Parameters |
| 93 | + |
| 94 | +Name | Type | Description | Notes |
| 95 | +------------- | ------------- | ------------- | ------------- |
| 96 | + **attribute_id** | **str**| id of the attribute | |
| 97 | + |
| 98 | +### Return type |
| 99 | + |
| 100 | +void (empty response body) |
| 101 | + |
| 102 | +### Authorization |
| 103 | + |
| 104 | +[api-key](../README.md#api-key) |
| 105 | + |
| 106 | +### HTTP request headers |
| 107 | + |
| 108 | + - **Content-Type**: application/json |
| 109 | + - **Accept**: application/json |
| 110 | + |
| 111 | +[[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) |
| 112 | + |
| 113 | +# **get_attributes** |
| 114 | +> GetAttributes get_attributes() |
| 115 | +
|
| 116 | +Lists all attributes |
| 117 | + |
| 118 | +### Example |
| 119 | +```python |
| 120 | +from __future__ import print_function |
| 121 | +import time |
| 122 | +import sib_api_v3_sdk |
| 123 | +from sib_api_v3_sdk.rest import ApiException |
| 124 | +from pprint import pprint |
| 125 | + |
| 126 | +# Configure API key authorization: api-key |
| 127 | +sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY' |
| 128 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 129 | +# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer' |
| 130 | + |
| 131 | +# create an instance of the API class |
| 132 | +api_instance = sib_api_v3_sdk.AttributesApi() |
| 133 | + |
| 134 | +try: |
| 135 | + # Lists all attributes |
| 136 | + api_response = api_instance.get_attributes() |
| 137 | + pprint(api_response) |
| 138 | +except ApiException as e: |
| 139 | + print("Exception when calling AttributesApi->get_attributes: %s\n" % e) |
| 140 | +``` |
| 141 | + |
| 142 | +### Parameters |
| 143 | +This endpoint does not need any parameter. |
| 144 | + |
| 145 | +### Return type |
| 146 | + |
| 147 | +[**GetAttributes**](GetAttributes.md) |
| 148 | + |
| 149 | +### Authorization |
| 150 | + |
| 151 | +[api-key](../README.md#api-key) |
| 152 | + |
| 153 | +### HTTP request headers |
| 154 | + |
| 155 | + - **Content-Type**: application/json |
| 156 | + - **Accept**: application/json |
| 157 | + |
| 158 | +[[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) |
| 159 | + |
0 commit comments