Skip to content

Latest commit

 

History

History
269 lines (206 loc) · 7.4 KB

PostLetterApi.md

File metadata and controls

269 lines (206 loc) · 7.4 KB

IO.ClickSend.ClickSend.Api.PostLetterApi

All URIs are relative to https://rest.clicksend.com/v3

Method HTTP request Description
PostLettersExportGet GET /post/letters/history/export export post letter history
PostLettersHistoryGet GET /post/letters/history Get all post letter history
PostLettersPricePost POST /post/letters/price Calculate post letter price
PostLettersSendPost POST /post/letters/send Send post letter

PostLettersExportGet

string PostLettersExportGet (string filename)

export post letter history

export post letter history

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class PostLettersExportGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PostLetterApi();
            var filename = filename_example;  // string | Filename to export to

            try
            {
                // export post letter history
                string result = apiInstance.PostLettersExportGet(filename);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PostLetterApi.PostLettersExportGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
filename string Filename to export to

Return type

string

Authorization

BasicAuth

HTTP request headers

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

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

PostLettersHistoryGet

string PostLettersHistoryGet (int? page = null, int? limit = null)

Get all post letter history

Get all post letter history

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class PostLettersHistoryGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PostLetterApi();
            var page = 56;  // int? | Page number (optional)  (default to 1)
            var limit = 56;  // int? | Number of records per page (optional)  (default to 10)

            try
            {
                // Get all post letter history
                string result = apiInstance.PostLettersHistoryGet(page, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PostLetterApi.PostLettersHistoryGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Page number [optional] [default to 1]
limit int? Number of records per page [optional] [default to 10]

Return type

string

Authorization

BasicAuth

HTTP request headers

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

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

PostLettersPricePost

string PostLettersPricePost (PostLetter body)

Calculate post letter price

Calculate post letter price

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class PostLettersPricePostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PostLetterApi();
            var body = new PostLetter(); // PostLetter | PostLetter model

            try
            {
                // Calculate post letter price
                string result = apiInstance.PostLettersPricePost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PostLetterApi.PostLettersPricePost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body PostLetter PostLetter model

Return type

string

Authorization

BasicAuth

HTTP request headers

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

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

PostLettersSendPost

string PostLettersSendPost (PostLetter body)

Send post letter

Send post letter

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class PostLettersSendPostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PostLetterApi();
            var body = new PostLetter(); // PostLetter | PostLetter model

            try
            {
                // Send post letter
                string result = apiInstance.PostLettersSendPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PostLetterApi.PostLettersSendPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body PostLetter PostLetter model

Return type

string

Authorization

BasicAuth

HTTP request headers

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

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