Skip to content

Latest commit

 

History

History
487 lines (349 loc) · 15.8 KB

ResellerApi.md

File metadata and controls

487 lines (349 loc) · 15.8 KB

sib_api_v3_sdk.ResellerApi

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

Method HTTP request Description
add_credits POST /reseller/children/{childId}/credits/add Add Email and/or SMS credits to a specific child account
associate_ip_to_child POST /reseller/children/{childId}/ips/associate Associate a dedicated IP to the child
create_reseller_child POST /reseller/children Creates a reseller child
delete_reseller_child DELETE /reseller/children/{childId} Deletes a single reseller child based on the childId supplied
dissociate_ip_from_child POST /reseller/children/{childId}/ips/dissociate Dissociate a dedicated IP to the child
get_child_info GET /reseller/children/{childId} Gets the info about a specific child account
get_reseller_childs GET /reseller/children Gets the list of all reseller's children accounts
remove_credits POST /reseller/children/{childId}/credits/remove Remove Email and/or SMS credits from a specific child account
update_reseller_child PUT /reseller/children/{childId} Updates infos of reseller's child based on the childId supplied

add_credits

RemainingCreditModel add_credits(child_id, add_credits)

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

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child
add_credits = sib_api_v3_sdk.AddCredits() # AddCredits | Values to post to add credit to a specific child account

try:
    # Add Email and/or SMS credits to a specific child account
    api_response = api_instance.add_credits(child_id, add_credits)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResellerApi->add_credits: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child
add_credits 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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

associate_ip_to_child

associate_ip_to_child(child_id, ip_id)

Associate a dedicated IP to the child

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child
ip_id = sib_api_v3_sdk.ManageIp() # ManageIp | IP's id

try:
    # Associate a dedicated IP to the child
    api_instance.associate_ip_to_child(child_id, ip_id)
except ApiException as e:
    print("Exception when calling ResellerApi->associate_ip_to_child: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child
ip_id ManageIp IP's id

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_reseller_child

CreateModel create_reseller_child(reseller_child=reseller_child)

Creates a reseller child

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
reseller_child = sib_api_v3_sdk.CreateChild() # CreateChild | reseller child to add (optional)

try:
    # Creates a reseller child
    api_response = api_instance.create_reseller_child(reseller_child=reseller_child)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResellerApi->create_reseller_child: %s\n" % e)

Parameters

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

Return type

CreateModel

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_reseller_child

delete_reseller_child(child_id)

Deletes a single reseller child based on the childId supplied

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child

try:
    # Deletes a single reseller child based on the childId supplied
    api_instance.delete_reseller_child(child_id)
except ApiException as e:
    print("Exception when calling ResellerApi->delete_reseller_child: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

dissociate_ip_from_child

dissociate_ip_from_child(child_id, ip_id)

Dissociate a dedicated IP to the child

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child
ip_id = sib_api_v3_sdk.ManageIp() # ManageIp | IP's id

try:
    # Dissociate a dedicated IP to the child
    api_instance.dissociate_ip_from_child(child_id, ip_id)
except ApiException as e:
    print("Exception when calling ResellerApi->dissociate_ip_from_child: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child
ip_id ManageIp IP's id

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_child_info

GetChildInfo get_child_info(child_id)

Gets the info about a specific child account

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child

try:
    # Gets the info about a specific child account
    api_response = api_instance.get_child_info(child_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResellerApi->get_child_info: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child

Return type

GetChildInfo

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_reseller_childs

GetChildrenList get_reseller_childs()

Gets the list of all reseller's children accounts

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))

try:
    # Gets the list of all reseller's children accounts
    api_response = api_instance.get_reseller_childs()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResellerApi->get_reseller_childs: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetChildrenList

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_credits

RemainingCreditModel remove_credits(child_id, remove_credits)

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

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child
remove_credits = sib_api_v3_sdk.RemoveCredits() # RemoveCredits | Values to post to remove email or SMS credits from a specific child account

try:
    # Remove Email and/or SMS credits from a specific child account
    api_response = api_instance.remove_credits(child_id, remove_credits)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResellerApi->remove_credits: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child
remove_credits 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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_reseller_child

update_reseller_child(child_id, reseller_child)

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

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.ResellerApi(sib_api_v3_sdk.ApiClient(configuration))
child_id = 789 # int | id of reseller's child
reseller_child = sib_api_v3_sdk.UpdateChild() # UpdateChild | values to update in child profile

try:
    # Updates infos of reseller's child based on the childId supplied
    api_instance.update_reseller_child(child_id, reseller_child)
except ApiException as e:
    print("Exception when calling ResellerApi->update_reseller_child: %s\n" % e)

Parameters

Name Type Description Notes
child_id int id of reseller's child
reseller_child UpdateChild values to update in child profile

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]