Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT Affiliate API Version 1 (DEPRECATED)

ADDEDIT Affiliate API Version 1

Updated on 2014-04-28
Current Version: Version 2
Deprecated Version: V1
Requests Allowed: GET&SOAP

 

Summary:

Returns "Affiliate ### Created" or "Affiliate ### Updated"


Resource/WSDL Page:

http://<your_domain_here>/api/1/addedit.asmx?op=Affiliate


Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50

Must be a valid API key (existing and NOT expired)

Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh

affiliate_id
Required
Type: INT
Length (Max/Min): NA

Affiliate ID  ["0" Create new affiliate /  "ID" Update affiliate] 0 creates, > 0 edits

Example Values: 123

affiliate_name
Required
Type: STRING
Length (Max/Min): 50

Affiliate Name

Example Values: Affiliate Name

account_status_id
Required
Type: BYTE
Length (Max/Min): NA

Affiliate Account Status ID

Example Values: 1

affiliate_tier_id
Required
Type: BYTE
Length (Max/Min): NA

Affiliate Tier ID. 0 to skip

Example Values: 1

hide_offers
Required
Type: BOOL
Length (Max/Min): NA

Hide Offers with no Campaigns in the Affiliate Portal? ["TRUE", "FALSE"]

Example Values: True

website
Required
Type: STRING
Length (Max/Min): 100

Affiliate Website

Example Values: www.affiliatewebsite.com

tax_class
Required
Type: STRING
Length (Max/Min): 30

Tax Class ["Corporation", "Individual/Sole Proprietor", "Partners/LLC/LLP", "Other"]

Example Values: Corporation

ssn_tax_id
Required
Type: STRING
Length (Max/Min): 20

SSN or Tax ID

Example Values: 123456789

vat_tax_required
Required
Type: BOOL
Length (Max/Min): NA

VAT Tax Required? ["TRUE", "FALSE"]

Example Values: True

swift_iban
Required
Type: STRING
Length (Max/Min): NA

SWIFT/IBAN ID.  Not used if tipalti is enabled

Example Values: 123456

payment_to
Required
Type: BYTE
Length (Max/Min): NA

Payment Entity ["0" = Company Name, "1" = Main Contact].  Not used if tipalti is enabled

Example Values: 0

payment_fee
Required
Type: DECIMAL
Length (Max/Min): NA

Payment Fee.  < 0 to skip

Example Values: 20.05

payment_min_threshold
Required
Type: DECIMAL
Length (Max/Min): NA

Minimum payment threshold.  < 0 to use the global setting

Example Values: 20.05

currency_id
Required
Type: BYTE
Length (Max/Min): NA

Payout Currency ID {See get.asmx > Currencies}.  0 to skip, used only for currency enabled clients

Example Values: 1

payment_setting_id
Required
Type: BYTE
Length (Max/Min): NA

Affiliate Payout Settings {See get.asmx > PaymentSettings}.  0 to skip

Example Values: 1

billing_cycle_id
Required
Type: BYTE
Length (Max/Min): NA

Billing Cycle ID {See get.asmx > BillingCycles}.  0 to skip

Example Values: 0

payment_type_id
Required
Type: BYTE
Length (Max/Min): NA

Payment Type ID {See get.asmx > PaymentTypes}.  If tipalti is enabled it uses tipalti else 0 to skip

Example Values: 1

payment_type_info
Required
Type: STRING
Length (Max/Min): 100

Payment Details.  Not used if tipalti is enabled

Example Values: 45

account_manager_id
Required
Type: INT
Length (max/Min): NA

0 to auto select account manager on creation, 0 to skip on edit

Example Values: 1234

address_street
Required
Type: STRING
Length (Max/Min): 60

Only used if all address fields are non-NULL and non-empty

Example Values: Pacific Coast Highway

address_street2
Required
Type: STRING
Length (Max/Min): 60

Only used if all address fields are non-NULL and non-empty

Example Values: Macarthur

address_city
Required
Type: STRING
Length (Max/Min): 30

Only used if all address fields are non-NULL and non-empty

Example Values: Newport Beach

address_state
Required
Type: STRING
Length (Max/Min): 20

Only used if all address fields are non-NULL and non-empty

Example Values: California

address_zip_code
Required
Type: STRING
Length (Max/Min): 10

Only used if all address fields are non-NULL and non-empty

Example Values: 92660

address_country
Required
Type: STRING
Length (Max/Min): 30

Only used if all address fields are non-NULL and non-empty

Example Values: United States

media_type_ids
Required
Type: STRING
Length (Max/Min): NA

Media Type IDs [can be comma-separated] {See get.asmx > GetMediaTypes}

Example Values: media type

price_format_ids
Required
Type: STRING
Length (Max/Min): NA

Price Format IDs [can be comma-separated] {See get.asmx > GetPriceFormats}

Example Values: price format

vertical_category_ids
Required
Type: STRING
Length (Max/Min): NA

Vertical Category IDs [can be comma-separated] {See get.asmx > GetVerticalCategories}

Example Values: vertical category

country_codes
Required
Type: STRING
Length (Max/Min): NA

This should be a comma separated list of country codes

Example Values:

tags
Required
Type: STRING
Length (Max/Min): NA

This should be a comma separated list of tag names, each tag name cannot exceed 50 characters

Example Values:

date_added
Required
Type: DATETIME
Length (Max/Min): NA

Date added [MM/DD/YYYY HH:MM:SS]

Example Values: 04/28/2014 12:30:09

online_signup
Required
Type: BOOL
Length (Max/Min): NA

Example Values: True

signup_ip_address
Required
Type: STRING
Length (Max/Min): 15

Required if online_signup is true

Example Values: 12.34.567.89

referral_affiliate_id
Required
Type: INT
Length (max/Min): NA

0 to skip on edit

Example Values: 1234

referral_notes
Required
Type: STRING
Length (Max/Min): 50

Used on creation, NULL or empty skips on edit

Example Values: Referral Notes

terms_and_conditions_agreed
Required
Type: BOOL
Length (Max/Min): NA

Agreed to the Terms and Conditions? ["TRUE", "FALSE"]

Example Values: True

notes
Required
Type: STRING
Length (Max/Min): NA

Freeform notes.  Used on creation, NULL or empty skips on edit

Example Values: Notes

 

**Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value). 

 

Example Request

GET

http://demo.cakemarketing.com/api/1/addedit.asmx/Affiliate?api_key=dNJFmId9rI&affiliate_id=0&affiliate_name=Brads+Example&account_status_id=1&affiliate_tier_id=0&hide_offers=FALSE&website=http%3A%2F%2Fgoogle.com&tax_class=Individual%2FSole+Proprietor&ssn_tax_id=611404141&vat_tax_required=FALSE&swift_iban=123456&payment_to=0&payment_fee=30&payment_min_threshold=900&currency_id=1&payment_setting_id=1&billing_cycle_id=1&payment_type_id=1&payment_type_info=am+cool&address_street=3200+e+palm+drive&address_street2=&address_city=fullerton&address_state=ca&address_zip_code=92802&address_country=USA&media_type_ids=15&price_format_ids=1&vertical_category_ids=10&country_codes=US&tags=boom&date_added=10%2F1%2F2012&online_signup=TRUE&signup_ip_address=65.60.119.2&referral_affiliate_id=0&referral_notes=&terms_and_conditions_agreed=TRUE&notes=Notes Here&account_manager_id=1122

 

Sample XML Response:

<affiliate_addedit_response>
<success>true</success>
<message>Affiliate 1111121 Created</message>
<affiliate_id>1111121</affiliate_id>
</affiliate_addedit_response>

 

Example Error Messages: 

Error Message

Likely Cause

Invalid API Key

API key does not exist or is expired

Invalid Affiliate Name

affiliate_name is NULL or empty or exceeds 50 characters

Invalid Account Status

account_status_id equals 0 or it does not match an account status in the database

Invalid Affiliate Tier

affiliate_tier_id does not match an affiliate tier in the dashboard

Invalid website

website exceeds 100 characters

Invalid Tax Class

tax_class exceeds 30 characters

Invalid SSN/Tax ID

ssn_tax_id exceeds 20 characters

Invalid Swift IBAN

tipalti is not enabled and swift_iban exceeds 50 characters

Invalid Payment To

tipalti is not enabled and payment_to < 0 or payment_to > 1

Invalid Currency

the client has currency enabled and currency_id does not match a currency in the database

Invalid Payment Setting

payment_setting_id does not match a currency payment setting in the database

Invalid Payment Type Info

payment_type_info exceeds 100 characters and tipalti is not enabled

Invalid Account Manager ID

account_manager_id does not match a contact in the database

Invalid Address Street

address_street exceeds 60 characters

Invalid Address Street 2

address_street2 exceeds 60 characters

Invalid Address City

address_city exceeds 30 characters

Invalid Address Zip Code

address_zip_code exceeds 10 characters

Invalid Address Country

address_country exceeds 30 characters

Invalid Signup IP Address

online_signup is true and signup_ip_address is NULL or empty pr exceeds 15 characters

Invalid Referral Affiliate

referral_affiliate_id doesn't match an affiliate in the database

Invalid Referral Notes

referral_notes exceeds 50 characters

Invalid Affiliate ID

affiliate_id doesn't match an affiliate in the database

Invalid Account Manager ID

account_manager_id doesn't match a contact in the database

Invalid Contact ID

account_manager_id doesn't match a valid contact in the database

An error occured, please contact [email protected]

General error if anything fails

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.