Skip to content

Commit 9a6e1c5

Browse files
authored
Merge pull request #19 from sendinblue/feature_contact-attribute-api-updates
Contact attribute + SendSms + ErrorModel spec updates
2 parents 3d4af1a + 1224c92 commit 9a6e1c5

File tree

183 files changed

+1008
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+1008
-388
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,16 @@ All URIs are relative to *https://api.sendinblue.com/v3*
110110
Class | Method | HTTP request | Description
111111
------------ | ------------- | ------------- | -------------
112112
*SibApiV3Sdk.AccountApi* | [**getAccount**](docs/AccountApi.md#getAccount) | **GET** /account | Get your account informations, plans and credits details
113-
*SibApiV3Sdk.AttributesApi* | [**createAttribute**](docs/AttributesApi.md#createAttribute) | **POST** /contacts/attributes | Creates contact attributes
114-
*SibApiV3Sdk.AttributesApi* | [**deleteAttribute**](docs/AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute
113+
*SibApiV3Sdk.AttributesApi* | [**createAttribute**](docs/AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
114+
*SibApiV3Sdk.AttributesApi* | [**deleteAttribute**](docs/AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
115115
*SibApiV3Sdk.AttributesApi* | [**getAttributes**](docs/AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
116+
*SibApiV3Sdk.AttributesApi* | [**updateAttribute**](docs/AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
116117
*SibApiV3Sdk.ContactsApi* | [**addContactToList**](docs/ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
117-
*SibApiV3Sdk.ContactsApi* | [**createAttribute**](docs/ContactsApi.md#createAttribute) | **POST** /contacts/attributes | Creates contact attributes
118+
*SibApiV3Sdk.ContactsApi* | [**createAttribute**](docs/ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
118119
*SibApiV3Sdk.ContactsApi* | [**createContact**](docs/ContactsApi.md#createContact) | **POST** /contacts | Create a contact
119120
*SibApiV3Sdk.ContactsApi* | [**createFolder**](docs/ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder
120121
*SibApiV3Sdk.ContactsApi* | [**createList**](docs/ContactsApi.md#createList) | **POST** /contacts/lists | Create a list
121-
*SibApiV3Sdk.ContactsApi* | [**deleteAttribute**](docs/ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute
122+
*SibApiV3Sdk.ContactsApi* | [**deleteAttribute**](docs/ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
122123
*SibApiV3Sdk.ContactsApi* | [**deleteFolder**](docs/ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
123124
*SibApiV3Sdk.ContactsApi* | [**deleteList**](docs/ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list
124125
*SibApiV3Sdk.ContactsApi* | [**getAttributes**](docs/ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
@@ -134,6 +135,7 @@ Class | Method | HTTP request | Description
134135
*SibApiV3Sdk.ContactsApi* | [**importContacts**](docs/ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
135136
*SibApiV3Sdk.ContactsApi* | [**removeContactToList**](docs/ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
136137
*SibApiV3Sdk.ContactsApi* | [**requestContactExport**](docs/ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
138+
*SibApiV3Sdk.ContactsApi* | [**updateAttribute**](docs/ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
137139
*SibApiV3Sdk.ContactsApi* | [**updateContact**](docs/ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
138140
*SibApiV3Sdk.ContactsApi* | [**updateFolder**](docs/ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
139141
*SibApiV3Sdk.ContactsApi* | [**updateList**](docs/ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
@@ -217,7 +219,7 @@ Class | Method | HTTP request | Description
217219
- [SibApiV3Sdk.AddCredits](docs/AddCredits.md)
218220
- [SibApiV3Sdk.AddRemoveContactToList](docs/AddRemoveContactToList.md)
219221
- [SibApiV3Sdk.CreateAttribute](docs/CreateAttribute.md)
220-
- [SibApiV3Sdk.CreateAttributeEnumemaration](docs/CreateAttributeEnumemaration.md)
222+
- [SibApiV3Sdk.CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md)
221223
- [SibApiV3Sdk.CreateChild](docs/CreateChild.md)
222224
- [SibApiV3Sdk.CreateContact](docs/CreateContact.md)
223225
- [SibApiV3Sdk.CreateEmailCampaign](docs/CreateEmailCampaign.md)
@@ -340,6 +342,8 @@ Class | Method | HTTP request | Description
340342
- [SibApiV3Sdk.SendTestEmail](docs/SendTestEmail.md)
341343
- [SibApiV3Sdk.SendTestSms](docs/SendTestSms.md)
342344
- [SibApiV3Sdk.SendTransacSms](docs/SendTransacSms.md)
345+
- [SibApiV3Sdk.UpdateAttribute](docs/UpdateAttribute.md)
346+
- [SibApiV3Sdk.UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md)
343347
- [SibApiV3Sdk.UpdateCampaignStatus](docs/UpdateCampaignStatus.md)
344348
- [SibApiV3Sdk.UpdateChild](docs/UpdateChild.md)
345349
- [SibApiV3Sdk.UpdateContact](docs/UpdateContact.md)

docs/AttributesApi.md

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes | Creates contact attributes
8-
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute
7+
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
8+
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
99
[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
10+
[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
1011

1112

1213
<a name="createAttribute"></a>
1314
# **createAttribute**
14-
> CreateModel createAttribute(createAttribute)
15+
> createAttribute(attributeCategory, attributeName, createAttribute)
1516
16-
Creates contact attributes
17+
Creates contact attribute
1718

1819
### Example
1920
```javascript
@@ -28,10 +29,14 @@ apiKey.apiKey = 'YOUR API KEY';
2829

2930
var apiInstance = new SibApiV3Sdk.AttributesApi();
3031

32+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
33+
34+
var attributeName = "attributeName_example"; // String | Name of the attribute
35+
3136
var createAttribute = new SibApiV3Sdk.CreateAttribute(); // CreateAttribute | Values to create an attribute
3237

33-
apiInstance.createAttribute(createAttribute).then(function(data) {
34-
console.log('API called successfully. Returned data: ' + data);
38+
apiInstance.createAttribute(attributeCategory, attributeName, createAttribute).then(function() {
39+
console.log('API called successfully.');
3540
}, function(error) {
3641
console.error(error);
3742
});
@@ -42,11 +47,13 @@ apiInstance.createAttribute(createAttribute).then(function(data) {
4247

4348
Name | Type | Description | Notes
4449
------------- | ------------- | ------------- | -------------
50+
**attributeCategory** | **String**| Category of the attribute |
51+
**attributeName** | **String**| Name of the attribute |
4552
**createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute |
4653

4754
### Return type
4855

49-
[**CreateModel**](CreateModel.md)
56+
null (empty response body)
5057

5158
### Authorization
5259

@@ -59,7 +66,7 @@ Name | Type | Description | Notes
5966

6067
<a name="deleteAttribute"></a>
6168
# **deleteAttribute**
62-
> deleteAttribute(attributeId)
69+
> deleteAttribute(attributeCategory, attributeName)
6370
6471
Deletes an attribute
6572

@@ -76,9 +83,11 @@ apiKey.apiKey = 'YOUR API KEY';
7683

7784
var apiInstance = new SibApiV3Sdk.AttributesApi();
7885

79-
var attributeId = 789; // Number | id of the attribute
86+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
87+
88+
var attributeName = "attributeName_example"; // String | Name of the existing attribute
8089

81-
apiInstance.deleteAttribute(attributeId).then(function() {
90+
apiInstance.deleteAttribute(attributeCategory, attributeName).then(function() {
8291
console.log('API called successfully.');
8392
}, function(error) {
8493
console.error(error);
@@ -90,7 +99,8 @@ apiInstance.deleteAttribute(attributeId).then(function() {
9099

91100
Name | Type | Description | Notes
92101
------------- | ------------- | ------------- | -------------
93-
**attributeId** | **Number**| id of the attribute |
102+
**attributeCategory** | **String**| Category of the attribute |
103+
**attributeName** | **String**| Name of the existing attribute |
94104

95105
### Return type
96106

@@ -147,3 +157,57 @@ This endpoint does not need any parameter.
147157
- **Content-Type**: application/json
148158
- **Accept**: application/json
149159

160+
<a name="updateAttribute"></a>
161+
# **updateAttribute**
162+
> updateAttribute(attributeCategory, attributeName, updateAttribute)
163+
164+
Updates contact attribute
165+
166+
### Example
167+
```javascript
168+
var SibApiV3Sdk = require('sib-api-v3-sdk');
169+
var defaultClient = SibApiV3Sdk.ApiClient.instance;
170+
171+
// Configure API key authorization: api-key
172+
var apiKey = defaultClient.authentications['api-key'];
173+
apiKey.apiKey = 'YOUR API KEY';
174+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
175+
//apiKey.apiKeyPrefix = 'Token';
176+
177+
var apiInstance = new SibApiV3Sdk.AttributesApi();
178+
179+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
180+
181+
var attributeName = "attributeName_example"; // String | Name of the existing attribute
182+
183+
var updateAttribute = new SibApiV3Sdk.UpdateAttribute(); // UpdateAttribute | Values to update an attribute
184+
185+
apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute).then(function() {
186+
console.log('API called successfully.');
187+
}, function(error) {
188+
console.error(error);
189+
});
190+
191+
```
192+
193+
### Parameters
194+
195+
Name | Type | Description | Notes
196+
------------- | ------------- | ------------- | -------------
197+
**attributeCategory** | **String**| Category of the attribute |
198+
**attributeName** | **String**| Name of the existing attribute |
199+
**updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute |
200+
201+
### Return type
202+
203+
null (empty response body)
204+
205+
### Authorization
206+
207+
[api-key](../README.md#api-key)
208+
209+
### HTTP request headers
210+
211+
- **Content-Type**: application/json
212+
- **Accept**: application/json
213+

docs/ContactsApi.md

Lines changed: 78 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ All URIs are relative to *https://api.sendinblue.com/v3*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**addContactToList**](ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
8-
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes | Creates contact attributes
8+
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
99
[**createContact**](ContactsApi.md#createContact) | **POST** /contacts | Create a contact
1010
[**createFolder**](ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder
1111
[**createList**](ContactsApi.md#createList) | **POST** /contacts/lists | Create a list
12-
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute
12+
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
1313
[**deleteFolder**](ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
1414
[**deleteList**](ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list
1515
[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
@@ -25,6 +25,7 @@ Method | HTTP request | Description
2525
[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
2626
[**removeContactToList**](ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
2727
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
28+
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
2829
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
2930
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
3031
[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
@@ -83,9 +84,9 @@ Name | Type | Description | Notes
8384

8485
<a name="createAttribute"></a>
8586
# **createAttribute**
86-
> CreateModel createAttribute(createAttribute)
87+
> createAttribute(attributeCategory, attributeName, createAttribute)
8788
88-
Creates contact attributes
89+
Creates contact attribute
8990

9091
### Example
9192
```javascript
@@ -100,10 +101,14 @@ apiKey.apiKey = 'YOUR API KEY';
100101

101102
var apiInstance = new SibApiV3Sdk.ContactsApi();
102103

104+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
105+
106+
var attributeName = "attributeName_example"; // String | Name of the attribute
107+
103108
var createAttribute = new SibApiV3Sdk.CreateAttribute(); // CreateAttribute | Values to create an attribute
104109

105-
apiInstance.createAttribute(createAttribute).then(function(data) {
106-
console.log('API called successfully. Returned data: ' + data);
110+
apiInstance.createAttribute(attributeCategory, attributeName, createAttribute).then(function() {
111+
console.log('API called successfully.');
107112
}, function(error) {
108113
console.error(error);
109114
});
@@ -114,11 +119,13 @@ apiInstance.createAttribute(createAttribute).then(function(data) {
114119

115120
Name | Type | Description | Notes
116121
------------- | ------------- | ------------- | -------------
122+
**attributeCategory** | **String**| Category of the attribute |
123+
**attributeName** | **String**| Name of the attribute |
117124
**createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute |
118125

119126
### Return type
120127

121-
[**CreateModel**](CreateModel.md)
128+
null (empty response body)
122129

123130
### Authorization
124131

@@ -275,7 +282,7 @@ Name | Type | Description | Notes
275282

276283
<a name="deleteAttribute"></a>
277284
# **deleteAttribute**
278-
> deleteAttribute(attributeId)
285+
> deleteAttribute(attributeCategory, attributeName)
279286
280287
Deletes an attribute
281288

@@ -288,13 +295,15 @@ var defaultClient = SibApiV3Sdk.ApiClient.instance;
288295
var apiKey = defaultClient.authentications['api-key'];
289296
apiKey.apiKey = 'YOUR API KEY';
290297
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
291-
//apiKey.apiKeyPrefix = 'Token';
298+
//api-key.apiKeyPrefix = 'Token';
292299

293300
var apiInstance = new SibApiV3Sdk.ContactsApi();
294301

295-
var attributeId = 789; // Number | id of the attribute
302+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
296303

297-
apiInstance.deleteAttribute(attributeId).then(function() {
304+
var attributeName = "attributeName_example"; // String | Name of the existing attribute
305+
306+
apiInstance.deleteAttribute(attributeCategory, attributeName).then(function() {
298307
console.log('API called successfully.');
299308
}, function(error) {
300309
console.error(error);
@@ -306,7 +315,8 @@ apiInstance.deleteAttribute(attributeId).then(function() {
306315

307316
Name | Type | Description | Notes
308317
------------- | ------------- | ------------- | -------------
309-
**attributeId** | **Number**| id of the attribute |
318+
**attributeCategory** | **String**| Category of the attribute |
319+
**attributeName** | **String**| Name of the existing attribute |
310320

311321
### Return type
312322

@@ -576,7 +586,8 @@ var apiInstance = new SibApiV3Sdk.ContactsApi();
576586

577587
var opts = {
578588
'limit': 50, // Number | Number of documents per page
579-
'offset': 0 // Number | Index of the first document of the page
589+
'offset': 0, // Number | Index of the first document of the page
590+
'modifiedSince': new Date("2013-10-20T19:20:30+01:00") // Date | Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
580591
};
581592
apiInstance.getContacts(opts).then(function(data) {
582593
console.log('API called successfully. Returned data: ' + data);
@@ -1061,6 +1072,60 @@ Name | Type | Description | Notes
10611072

10621073
[api-key](../README.md#api-key)
10631074

1075+
### HTTP request headers
1076+
1077+
- **Content-Type**: application/json
1078+
- **Accept**: application/json
1079+
1080+
<a name="updateAttribute"></a>
1081+
# **updateAttribute**
1082+
> updateAttribute(attributeCategory, attributeName, updateAttribute)
1083+
1084+
Updates contact attribute
1085+
1086+
### Example
1087+
```javascript
1088+
var SibApiV3Sdk = require('sib-api-v3-sdk');
1089+
var defaultClient = SibApiV3Sdk.ApiClient.instance;
1090+
1091+
// Configure API key authorization: api-key
1092+
var apiKey = defaultClient.authentications['api-key'];
1093+
apiKey.apiKey = 'YOUR API KEY';
1094+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
1095+
//apiKey.apiKeyPrefix = 'Token';
1096+
1097+
var apiInstance = new SibApiV3Sdk.ContactsApi();
1098+
1099+
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
1100+
1101+
var attributeName = "attributeName_example"; // String | Name of the existing attribute
1102+
1103+
var updateAttribute = new SibApiV3Sdk.UpdateAttribute(); // UpdateAttribute | Values to update an attribute
1104+
1105+
apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute).then(function() {
1106+
console.log('API called successfully.');
1107+
}, function(error) {
1108+
console.error(error);
1109+
});
1110+
1111+
```
1112+
1113+
### Parameters
1114+
1115+
Name | Type | Description | Notes
1116+
------------- | ------------- | ------------- | -------------
1117+
**attributeCategory** | **String**| Category of the attribute |
1118+
**attributeName** | **String**| Name of the existing attribute |
1119+
**updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute |
1120+
1121+
### Return type
1122+
1123+
null (empty response body)
1124+
1125+
### Authorization
1126+
1127+
[api-key](../README.md#api-key)
1128+
10641129
### HTTP request headers
10651130

10661131
- **Content-Type**: application/json

0 commit comments

Comments
 (0)