Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT Affiliate API Version 2

ADDEDIT Affiliate API V2

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/2/addedit.asmx?op=Affiliate


Parameters

Example Values: 

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

Must be a valid API key (existing and Not expired)
Example Values: Fo35NRAqvFLXoZxqB4aVMhh
affiliate_id
Required
Type: INT
Length (Max/Min): NA
0 creates, > 0 edits
Example Values: 123456
affiliate_name
Required
Type: STRING
Length (Max/Min): 50
Example Values: AffilateName
third_party_name
Required
Type: STRING
Length (Max/Min): 50
NULL or empty skips on edit
Example Values: ThirdPartyName
account_status_id
Required
Type: BYTE
Length (Max/Min): NA
Affiliate Account Status ID {See get.asmx > AccountStatuses}
Example Values: 1
inactive_reason_id
Required
Type: BYTE
Length (Max/Min): NA

0 to skip
Example Values: 0
affiliate_tier_id
Required
Type: BYTE
Length (Max/Min): NA
Affiliate Tier ID {See get.asmx > AffiliateTiers0 to skip
Example Values: 1
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
hide_offers
Required
Type: BOOL
Length (Max/Min): NA
Hide Offers with no Campaigns in the Affiliate Portal? ["TRUE", "FALSE"]
Example Values: True

website

Optional
Type: STRING
Length (Max/Min): 100

Affiliate Website
Example Values: www.affiliatewebsite.com

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

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

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

SSN or Tax ID
Example Values: 132456789

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

VAT Tax Required? ["True", "False"]
Example Values: True

swift_iban
Optional
Type: STRING
Length (Max/Min): 50

Swift/IBAN ID. Not used if tipalti is enabled
Example Values: swift
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: 1
payment_fee
Required
Type: DECIMAL
Length (Max/Min): NA

< 0 to clear setting value

Example Values: 20.05
payment_min_threshold
Required
Type: DECIMAL
Length (Max/Min): NA
< 0 to use the global setting
Example Values:  20.05
currency_id
Required
Type: BYTE
Length (Max/Min): NA
0 to skip, used only for currency enabled clients
Example Values: 1
payment_setting_id
Required
Type: BYTE
Length (Max/Min): NA
Use GET PaymentSettings API. 0 to skip
Example Values:  1
billing_cycle_id
Required
Type: BYTE
Length (Max/Min): NA
0 to skip
Example Values: 1
payment_type_id
Required
Type: BYTE
Length (Max/Min): NA
If tipalti is enabled it uses tipalti else 0 to skip
Example Values: 1
payment_type_info
Required
Type: STRING
Length (Max/Min): 100
Not used if tipalti is enabled
Example Values: payment type info
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

This should be a comma separated list of media type IDs. Use Get Media ID API

Example Values: Media types
price_format_ids
Required
Type: STRING
Length (Max/Min): NA

This should be a comma separated list of price format IDs. Use Get Price Format API. 

Example Values: price format
vertical_category_ids
Required
Type: STRING
Length (Max/Min): NA

Not currently available via API. 

Example Values: vertical category
country_codes
Required
Type: STRING
Length (Max/Min): NA
This should be a comma separated list of country codes
Use GETCountries API
Example Values: US,CA,MX
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: tag1,tag2
pixel_html
Required
Type: STRING
Length (Max/Min): NA
The HTML pixel that will be used for the Affiliate global pixel [Leaving this field blank will not update an existing pixel_html].  Used on creation, NULL or empty skips on edit
Example Values: 
postback_url
Required
Type: STRING
Length (Max/Min): 400
The URL that will be used for the Affiliate global postback URL [Leaving this field blank will not update an existing postback_url].  Used on creation, NULL or empty skips on edit
Example Values: 
postback_delay_ms
Required
Type: INT
Length (Max/Min): NA
Amount of time( in MS) the postback URL will wait before its fired.
Example Values: 1
fire_global_pixel
Required
Type: BOOL
Length (Max/Min): NA
Fire the global pixel?
Example Values: True
date_added
Required
Type: DateTime
Length (Max/Min): NA
Date Added [MM/DD/YYYY HH:MM:SS]
Example Values: 04/28/2014 12:45:24
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
Referral Affiliate ID {See export.asmx > Affiliates}.  0 to skip on edit
Example Values: 123456
referral_notes
Required
Type: STRING
Length (Max/Min): 50
Used on creation, NULL or empty skips on edit
Example Values: 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
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
https://demo-new.cakemarketing.com/api/2/addedit.asmx/Affiliate?api_key=3YmDJeT3VHTFhDqAjr2OlQ&amp;affiliate_id=0&amp;affiliate_name=Affiliate+Name+Here&amp;third_party_name=brad123&amp;account_status_id=1&amp;inactive_reason_id=0&amp;affiliate_tier_id=0&amp;account_manager_id=3505&amp;hide_offers=FALSE&amp;website=http%3A%2F%2Fbradsexample.com&amp;tax_class=Corporation&amp;ssn_tax_id=123456789&amp;vat_tax_required=FALSE&amp;swift_iban=12321321&amp;payment_to=0&amp;payment_fee=0&amp;payment_min_threshold=1500&amp;currency_id=1&amp;payment_setting_id=1&amp;billing_cycle_id=2&amp;payment_type_id=0&amp;payment_type_info=Here+is+some+payment+information+that+willl+allow+me+to+get+paid&amp;address_street=123+Main+Street&amp;address_street2=suite+250&amp;address_city=Fullerton&amp;address_state=CA&amp;address_zip_code=92831&amp;address_country=US&amp;media_type_ids=13%2C8&amp;price_format_ids=1%2C2%2C3&amp;vertical_category_ids=11%2C6%2C12&amp;country_codes=US%2CCA&amp;tags=NULL&amp;pixel_html=%3Ciframe+src%3D%22http%3A%2F%2Fdemotrk.cakemarketing.com%2Fp.ashx%3Fo%3D197%26t%3DTRANSACTION_ID%22+height%3D%221%22+width%3D%221%22+frameborder%3D%220%22%3E%3C%2Fiframe%3E&amp;postback_url=&amp;postback_delay_ms=0&amp;fire_global_pixel=False&amp;date_added=10%2F24%2F2006&amp;online_signup=FALSE&amp;signup_ip_address=&amp;referral_affiliate_id=0&amp;referral_notes=0&amp;terms_and_conditions_agreed=TRUE&amp;notes=Specialize+in+CPC+traffic

 

Sample XML Response:

 

<?xml version="1.0" encoding="utf-8"?>
<affiliate_addedit_response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/2/">
  <success>true</success>
  <message>Affiliate 1111318 Created</message>
  <affiliate_id>1111318</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 on create
Invalid Third Party Name
third_party_name exceeds 50 characters on create
Invalid Account Status
account_status_id equals 0 or it does not match an account status in the database on create
Invalid Inactive Reason
inactive_reason_id does not match an inactive reason in the database on create.
Invalid Affiliate Tier
affiliate_tier_id does not match an affiliate tier in the database on create
Invalid Website
website exceeds 100 characters on create
Invalid Tax Class
tax_class exceeds 30 characters on create
Invalid SSN/Tax ID
ssn_tax_id exceeds 20 characters on create
Invalid Swift IBAN
tipalti is not enabled and swift_iban exceeds 50 characters on create
Invalid Payment To
tipalti is not enabled and payment_to <0 or payment_to > 1 on create
Invalid Currency
the client has currency enabled and currency_id does not match a currency in the database on create
Invalid Payment Setting
payment_setting_id does not match a currency payment setting in the database on create
Invalid Billing Cycle
billing_cycle_id does not match a billing cycle in the database on create
Invalid Payment Type
payment_type_id does not match a payment_type in our database and tipalti is not enabled on create
Invalid Payment Type Info
payment_type_info exceeds 100 characters and tipalti is not enabled on create
Invalid Account Manager ID
account_manager_id does not match a contact in the database on create
Invalid Address Street
address_street exceeds 60 characters on create
Invalid Address Street 2
address_street2 exceeds 60 characters on create
Invalid Address City
address_city exceeds 30 characters on create
Invalid Address State
address_state exceeds 20 characters on create
Invalid Address Zip Code
address_zip_code exceeds 10 characters on create
Invalid Address Country
address_country exceeds 30 characters on create
Invalid Postback URL
postback_url exceeds 400 characters on create
Invalid Signup IP Address
online_signup is true and signup_up_address is NULL or empty or exceeds 15 characters on create
Invalid Referral Affiliate
referral_affiliate_id doesn't match an affiliate in the database on create
Invalid Referral Notes
referral_notes exceeds 50 characters on create
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 support@cakemarketing.com
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.