Skip to content

Latest commit

 

History

History
154 lines (114 loc) · 6.53 KB

AffiliateApi.md

File metadata and controls

154 lines (114 loc) · 6.53 KB

com.ultracart.admin.v2.Api.AffiliateApi

All URIs are relative to https://secure.ultracart.com/rest/v2

Method HTTP request Description
GetClicksByQuery POST /affiliate/clicks/query Retrieve clicks
GetLedgersByQuery POST /affiliate/ledgers/query Retrieve ledger entries

GetClicksByQuery

AffiliateClicksResponse GetClicksByQuery (AffiliateClickQuery clickQuery, int? limit = null, int? offset = null, string expand = null)

Retrieve clicks

Retrieves a group of clicks from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the clicks returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Example

using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;

namespace Example
{
    public class GetClicksByQueryExample
    {
        public void main()
        {

            // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new AffiliateApi(simpleKey);

            var clickQuery = new AffiliateClickQuery(); // AffiliateClickQuery | Click query
            var limit = 56;  // int? | The maximum number of records to return on this one API call. (Maximum 10000) (optional)  (default to 10000)
            var offset = 56;  // int? | Pagination of the record set.  Offset is a zero based index. (optional)  (default to 0)
            var expand = expand_example;  // string | The object expansion to perform on the result.  Only option is link. (optional) 

            try
            {
                // Retrieve clicks
                AffiliateClicksResponse result = apiInstance.GetClicksByQuery(clickQuery, limit, offset, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AffiliateApi.GetClicksByQuery: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
clickQuery AffiliateClickQuery Click query
limit int? The maximum number of records to return on this one API call. (Maximum 10000) [optional] [default to 10000]
offset int? Pagination of the record set. Offset is a zero based index. [optional] [default to 0]
expand string The object expansion to perform on the result. Only option is link. [optional]

Return type

AffiliateClicksResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

GetLedgersByQuery

AffiliateLedgersResponse GetLedgersByQuery (AffiliateLedgerQuery ledgerQuery, int? limit = null, int? offset = null, string expand = null)

Retrieve ledger entries

Retrieves a group of ledger entries from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the ledgers returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Example

using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;

namespace Example
{
    public class GetLedgersByQueryExample
    {
        public void main()
        {

            // Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var api = new AffiliateApi(simpleKey);

            var ledgerQuery = new AffiliateLedgerQuery(); // AffiliateLedgerQuery | Ledger query
            var limit = 56;  // int? | The maximum number of records to return on this one API call. (Maximum 200) (optional)  (default to 100)
            var offset = 56;  // int? | Pagination of the record set.  Offset is a zero based index. (optional)  (default to 0)
            var expand = expand_example;  // string | The object expansion to perform on the result.  Only option is link. (optional) 

            try
            {
                // Retrieve ledger entries
                AffiliateLedgersResponse result = apiInstance.GetLedgersByQuery(ledgerQuery, limit, offset, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AffiliateApi.GetLedgersByQuery: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ledgerQuery AffiliateLedgerQuery Ledger query
limit int? The maximum number of records to return on this one API call. (Maximum 200) [optional] [default to 100]
offset int? Pagination of the record set. Offset is a zero based index. [optional] [default to 0]
expand string The object expansion to perform on the result. Only option is link. [optional]

Return type

AffiliateLedgersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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