UltracartClient::AffiliateApi

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

Method HTTP request Description
get_clicks_by_query POST /affiliate/clicks/query Retrieve clicks
get_ledgers_by_query POST /affiliate/ledgers/query Retrieve ledger entries

get_clicks_by_query

AffiliateClicksResponse get_clicks_by_query(click_query, opts)

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

# load the gem
require 'ultracart_api'

# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::AffiliateApi.new_using_api_key(simple_key, false, false)


click_query = UltracartClient::AffiliateClickQuery.new # AffiliateClickQuery | Click query

opts = { 
  _limit: 10000, # Integer | The maximum number of records to return on this one API call. (Maximum 10000)
  _offset: 0, # Integer | Pagination of the record set.  Offset is a zero based index.
  _expand: '_expand_example' # String | The object expansion to perform on the result.  Only option is link.
}

begin
  #Retrieve clicks
  result = api_instance.get_clicks_by_query(click_query, opts)
  p result
rescue UltracartClient::ApiError => e
  puts "Exception when calling AffiliateApi->get_clicks_by_query: #{e}"
end

Parameters

Name Type Description Notes
click_query AffiliateClickQuery Click query
_limit Integer The maximum number of records to return on this one API call. (Maximum 10000) [optional] [default to 10000]
_offset Integer 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

get_ledgers_by_query

AffiliateLedgersResponse get_ledgers_by_query(ledger_query, opts)

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

# load the gem
require 'ultracart_api'

# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::AffiliateApi.new_using_api_key(simple_key, false, false)


ledger_query = UltracartClient::AffiliateLedgerQuery.new # AffiliateLedgerQuery | Ledger query

opts = { 
  _limit: 100, # Integer | The maximum number of records to return on this one API call. (Maximum 200)
  _offset: 0, # Integer | Pagination of the record set.  Offset is a zero based index.
  _expand: '_expand_example' # String | The object expansion to perform on the result.  Only option is link.
}

begin
  #Retrieve ledger entries
  result = api_instance.get_ledgers_by_query(ledger_query, opts)
  p result
rescue UltracartClient::ApiError => e
  puts "Exception when calling AffiliateApi->get_ledgers_by_query: #{e}"
end

Parameters

Name Type Description Notes
ledger_query AffiliateLedgerQuery Ledger query
_limit Integer The maximum number of records to return on this one API call. (Maximum 200) [optional] [default to 100]
_offset Integer 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