Skip to content

Latest commit

 

History

History
772 lines (604 loc) · 26.2 KB

EcommerceApi.md

File metadata and controls

772 lines (604 loc) · 26.2 KB

sib_api_v3_sdk.Api.EcommerceApi

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

Method HTTP request Description
CreateBatchOrder POST /orders/status/batch Maintains a batch of orders
CreateOrder POST /orders/status Maintains every transactional status of the order
CreateUpdateBatchCategory POST /categories/batch Create the categories in a batch
CreateUpdateBatchProducts POST /products/batch Creates the products in a batch
CreateUpdateCategory POST /categories Create/Update a category
CreateUpdateProduct POST /products Create/Update a product
EcommerceActivatePost POST /ecommerce/activate Fulfills the eCommerce pre-requisites
GetCategories GET /categories Return all your categories
GetCategoryInfo GET /categories/{id} Get a category details
GetProductInfo GET /products/{id} Get a product's details
GetProducts GET /products Return all your products

CreateBatchOrder

void CreateBatchOrder (OrderBatch orderBatch)

Maintains a batch of orders

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateBatchOrderExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var orderBatch = new OrderBatch(); // OrderBatch | 

            try
            {
                // Maintains a batch of orders
                apiInstance.CreateBatchOrder(orderBatch);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateBatchOrder: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
orderBatch OrderBatch

Return type

void (empty response body)

Authorization

api-key, partner-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]

CreateOrder

void CreateOrder (Order order)

Maintains every transactional status of the order

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateOrderExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var order = new Order(); // Order | 

            try
            {
                // Maintains every transactional status of the order
                apiInstance.CreateOrder(order);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateOrder: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
order Order

Return type

void (empty response body)

Authorization

api-key, partner-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]

CreateUpdateBatchCategory

CreateUpdateBatchCategoryModel CreateUpdateBatchCategory (CreateUpdateBatchCategory createUpdateBatchCategory)

Create the categories in a batch

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateUpdateBatchCategoryExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var createUpdateBatchCategory = new CreateUpdateBatchCategory(); // CreateUpdateBatchCategory | Values to create a batch of categories

            try
            {
                // Create the categories in a batch
                CreateUpdateBatchCategoryModel result = apiInstance.CreateUpdateBatchCategory(createUpdateBatchCategory);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateUpdateBatchCategory: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
createUpdateBatchCategory CreateUpdateBatchCategory Values to create a batch of categories

Return type

CreateUpdateBatchCategoryModel

Authorization

api-key, partner-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]

CreateUpdateBatchProducts

CreateUpdateBatchProductsModel CreateUpdateBatchProducts (CreateUpdateBatchProducts createUpdateBatchProducts)

Creates the products in a batch

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateUpdateBatchProductsExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var createUpdateBatchProducts = new CreateUpdateBatchProducts(); // CreateUpdateBatchProducts | Values to create a batch of products

            try
            {
                // Creates the products in a batch
                CreateUpdateBatchProductsModel result = apiInstance.CreateUpdateBatchProducts(createUpdateBatchProducts);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateUpdateBatchProducts: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
createUpdateBatchProducts CreateUpdateBatchProducts Values to create a batch of products

Return type

CreateUpdateBatchProductsModel

Authorization

api-key, partner-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]

CreateUpdateCategory

CreateCategoryModel CreateUpdateCategory (CreateUpdateCategory createUpdateCategory)

Create/Update a category

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateUpdateCategoryExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var createUpdateCategory = new CreateUpdateCategory(); // CreateUpdateCategory | Values to create/update a category

            try
            {
                // Create/Update a category
                CreateCategoryModel result = apiInstance.CreateUpdateCategory(createUpdateCategory);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateUpdateCategory: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
createUpdateCategory CreateUpdateCategory Values to create/update a category

Return type

CreateCategoryModel

Authorization

api-key, partner-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]

CreateUpdateProduct

CreateProductModel CreateUpdateProduct (CreateUpdateProduct createUpdateProduct)

Create/Update a product

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateUpdateProductExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var createUpdateProduct = new CreateUpdateProduct(); // CreateUpdateProduct | Values to create/update a product

            try
            {
                // Create/Update a product
                CreateProductModel result = apiInstance.CreateUpdateProduct(createUpdateProduct);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.CreateUpdateProduct: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
createUpdateProduct CreateUpdateProduct Values to create/update a product

Return type

CreateProductModel

Authorization

api-key, partner-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]

EcommerceActivatePost

void EcommerceActivatePost ()

Fulfills the eCommerce pre-requisites

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class EcommerceActivatePostExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();

            try
            {
                // **Fulfills the eCommerce pre-requisites**
                apiInstance.EcommerceActivatePost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.EcommerceActivatePost: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

api-key, partner-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]

GetCategories

GetCategories GetCategories (long? limit = null, long? offset = null, string sort = null, List ids = null)

Return all your categories

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetCategoriesExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var limit = 789;  // long? | Number of documents per page (optional)  (default to 50)
            var offset = 789;  // long? | Index of the first document in the page (optional)  (default to 0)
            var sort = sort_example;  // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional)  (default to desc)
            var ids = new List<string>(); // List<string> | Filter by category ids (optional) 

            try
            {
                // Return all your categories
                GetCategories result = apiInstance.GetCategories(limit, offset, sort, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.GetCategories: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
limit long? Number of documents per page [optional] [default to 50]
offset long? Index of the first document in the page [optional] [default to 0]
sort string Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [optional] [default to desc]
ids List<string> Filter by category ids [optional]

Return type

GetCategories

Authorization

api-key, partner-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]

GetCategoryInfo

GetCategoryDetails GetCategoryInfo (string id)

Get a category details

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetCategoryInfoExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var id = id_example;  // string | Category ID

            try
            {
                // Get a category details
                GetCategoryDetails result = apiInstance.GetCategoryInfo(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.GetCategoryInfo: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string Category ID

Return type

GetCategoryDetails

Authorization

api-key, partner-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]

GetProductInfo

GetProductDetails GetProductInfo (string id)

Get a product's details

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetProductInfoExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var id = id_example;  // string | Product ID

            try
            {
                // Get a product's details
                GetProductDetails result = apiInstance.GetProductInfo(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.GetProductInfo: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string Product ID

Return type

GetProductDetails

Authorization

api-key, partner-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]

GetProducts

GetProducts GetProducts (long? limit = null, long? offset = null, string sort = null, List ids = null)

Return all your products

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetProductsExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new EcommerceApi();
            var limit = 789;  // long? | Number of documents per page (optional)  (default to 50)
            var offset = 789;  // long? | Index of the first document in the page (optional)  (default to 0)
            var sort = sort_example;  // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional)  (default to desc)
            var ids = new List<string>(); // List<string> | Filter by product ids (optional) 

            try
            {
                // Return all your products
                GetProducts result = apiInstance.GetProducts(limit, offset, sort, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EcommerceApi.GetProducts: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
limit long? Number of documents per page [optional] [default to 50]
offset long? Index of the first document in the page [optional] [default to 0]
sort string Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [optional] [default to desc]
ids List<string> Filter by product ids [optional]

Return type

GetProducts

Authorization

api-key, partner-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]