Skip to content

Latest commit

 

History

History
388 lines (252 loc) · 17.5 KB

File metadata and controls

388 lines (252 loc) · 17.5 KB

AffiliateApi

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

Method HTTP request Description
deleteAffiliate DELETE /affiliate/affiliates/{affiliate_oid} Delete an affiliate
getAffiliate GET /affiliate/affiliates/{affiliate_oid} Retrieve an affiliate
getAffiliatesByQuery POST /affiliate/affiliates/query Retrieve affiliates
getClicksByQuery POST /affiliate/clicks/query Retrieve clicks
getLedgersByQuery POST /affiliate/ledgers/query Retrieve ledger entries
insertAffiliate POST /affiliate/affiliates Insert an affiliate
sendAffiliateWelcomeEmail POST /affiliate/affiliates/{affiliate_oid}/welcome_email Send a welcome email to an affiliate
updateAffiliate PUT /affiliate/affiliates/{affiliate_oid} Update an affiliate

deleteAffiliate

deleteAffiliate(affiliateOid)

Delete an affiliate

Delete an affiliate on the UltraCart account. The affiliate is disabled within the active affiliate program; their ledger and click history is preserved.

Example

(No example for this operation).

Parameters

Name Type Description Notes
affiliateOid Integer The affiliate oid to delete.

Return type

null (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

getAffiliate

AffiliateResponse getAffiliate(affiliateOid, expand)

Retrieve an affiliate

Retrieves a single affiliate using the specified affiliate oid.

Example

(No example for this operation).

Parameters

Name Type Description Notes
affiliateOid Integer The affiliate oid to retrieve.
expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

AffiliateResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

getAffiliatesByQuery

AffiliatesResponse getAffiliatesByQuery(affiliateQuery, limit, offset, sort)

Retrieve affiliates

Retrieves a group of affiliates 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 affiliates 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

(No example for this operation).

Parameters

Name Type Description Notes
affiliateQuery AffiliateQuery Affiliate 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]
sort String The sort order of the affiliates. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. [optional]

Return type

AffiliatesResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

getClicksByQuery

AffiliateClicksResponse getClicksByQuery(clickQuery, limit, offset, expand)

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

package affiliate;

public class GetClicksByQuery {
    // The Affiliate API is internal.  We do not envision a merchant needing this API.
}

Parameters

Name Type Description Notes
clickQuery 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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

getLedgersByQuery

AffiliateLedgersResponse getLedgersByQuery(ledgerQuery, limit, offset, expand)

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

package affiliate;

public class GetLedgersByQuery {
  // The Affiliate API is internal.  We do not envision a merchant needing this API.
}

Parameters

Name Type Description Notes
ledgerQuery 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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

insertAffiliate

AffiliateResponse insertAffiliate(affiliate, sendWelcomeEmail, expand)

Insert an affiliate

Insert an affiliate on the UltraCart account. The affiliate is created within the merchant's active affiliate program.

Example

(No example for this operation).

Parameters

Name Type Description Notes
affiliate Affiliate Affiliate to insert
sendWelcomeEmail Boolean Whether to send a welcome email to the affiliate after it is created. Defaults to false. [optional] [default to false]
expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

AffiliateResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

sendAffiliateWelcomeEmail

sendAffiliateWelcomeEmail(affiliateOid)

Send a welcome email to an affiliate

Sends a welcome email to the specified affiliate using the welcome letter configured on the merchant's active affiliate program.

Example

(No example for this operation).

Parameters

Name Type Description Notes
affiliateOid Integer The affiliate oid to send the welcome email to.

Return type

null (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message

updateAffiliate

AffiliateResponse updateAffiliate(affiliateOid, affiliate, expand)

Update an affiliate

Update an affiliate on the UltraCart account. This is a full replacement of the affiliate; omitted fields are reset to their defaults, with the exception of password which is only changed when supplied.

Example

(No example for this operation).

Parameters

Name Type Description Notes
affiliateOid Integer The affiliate oid to update.
affiliate Affiliate Affiliate to update
expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

AffiliateResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Status Code 400: bad request input such as invalid json * UC-REST-ERROR - Contains human readable error message
401 Status Code 401: invalid credentials supplied * UC-REST-ERROR - Contains human readable error message
410 Status Code 410: Your authorized application has been disabled by UltraCart * UC-REST-ERROR - Contains human readable error message
429 Status Code 429: you have exceeded the allowed API call rate limit for your application. * UC-REST-ERROR - Contains human readable error message
500 Status Code 500: any server side error. the body will contain a generic server error message * UC-REST-ERROR - Contains human readable error message