Skip to content

Latest commit

 

History

History
459 lines (310 loc) · 13.2 KB

File metadata and controls

459 lines (310 loc) · 13.2 KB

SibApiV3Sdk.ResellerApi

All URIs are relative to https://api.sendinblue.com/v3

Method HTTP request Description
addCredits POST /reseller/children/{childAuthKey}/credits/add Add Email and/or SMS credits to a specific child account
associateIpToChild POST /reseller/children/{childAuthKey}/ips/associate Associate a dedicated IP to the child
createResellerChild POST /reseller/children Creates a reseller child
deleteResellerChild DELETE /reseller/children/{childAuthKey} Deletes a single reseller child based on the childAuthKey supplied
dissociateIpFromChild POST /reseller/children/{childAuthKey}/ips/dissociate Dissociate a dedicated IP to the child
getChildInfo GET /reseller/children/{childAuthKey} Gets the info about a specific child account
getResellerChilds GET /reseller/children Gets the list of all reseller's children accounts
removeCredits POST /reseller/children/{childAuthKey}/credits/remove Remove Email and/or SMS credits from a specific child account
updateResellerChild PUT /reseller/children/{childAuthKey} Updates infos of reseller's child based on the childAuthKey supplied

addCredits

RemainingCreditModel addCredits(childAuthKey, addCredits)

Add Email and/or SMS credits to a specific child account

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

var addCredits = new SibApiV3Sdk.AddCredits(); // AddCredits | Values to post to add credit to a specific child account

apiInstance.addCredits(childAuthKey, addCredits).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child
addCredits AddCredits Values to post to add credit to a specific child account

Return type

RemainingCreditModel

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

associateIpToChild

associateIpToChild(childAuthKey, ip)

Associate a dedicated IP to the child

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

var ip = new SibApiV3Sdk.ManageIp(); // ManageIp | IP to associate

apiInstance.associateIpToChild(childAuthKey, ip).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child
ip ManageIp IP to associate

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createResellerChild

CreateReseller createResellerChild(opts)

Creates a reseller child

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var opts = { 
  'resellerChild': new SibApiV3Sdk.CreateChild() // CreateChild | reseller child to add
};
apiInstance.createResellerChild(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
resellerChild CreateChild reseller child to add [optional]

Return type

CreateReseller

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteResellerChild

deleteResellerChild(childAuthKey)

Deletes a single reseller child based on the childAuthKey supplied

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

apiInstance.deleteResellerChild(childAuthKey).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

dissociateIpFromChild

dissociateIpFromChild(childAuthKey, ip)

Dissociate a dedicated IP to the child

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

var ip = new SibApiV3Sdk.ManageIp(); // ManageIp | IP to dissociate

apiInstance.dissociateIpFromChild(childAuthKey, ip).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child
ip ManageIp IP to dissociate

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getChildInfo

GetChildInfo getChildInfo(childAuthKey)

Gets the info about a specific child account

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

apiInstance.getChildInfo(childAuthKey).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child

Return type

GetChildInfo

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getResellerChilds

GetChildrenList getResellerChilds()

Gets the list of all reseller's children accounts

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();
apiInstance.getResellerChilds().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

GetChildrenList

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

removeCredits

RemainingCreditModel removeCredits(childAuthKey, removeCredits)

Remove Email and/or SMS credits from a specific child account

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

var removeCredits = new SibApiV3Sdk.RemoveCredits(); // RemoveCredits | Values to post to remove email or SMS credits from a specific child account

apiInstance.removeCredits(childAuthKey, removeCredits).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child
removeCredits RemoveCredits Values to post to remove email or SMS credits from a specific child account

Return type

RemainingCreditModel

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateResellerChild

updateResellerChild(childAuthKey, resellerChild)

Updates infos of reseller's child based on the childAuthKey supplied

Example

var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new SibApiV3Sdk.ResellerApi();

var childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child

var resellerChild = new SibApiV3Sdk.UpdateChild(); // UpdateChild | values to update in child profile

apiInstance.updateResellerChild(childAuthKey, resellerChild).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
childAuthKey String auth key of reseller's child
resellerChild UpdateChild values to update in child profile

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json