Constant Contact
Business Partners who apply the Constant Contact APIs may want to determine if a specific Constant Contact "User Name" (aka SiteOwner or Account Holder) is contained under their Partner Account.
While there is no direct API to make this kind of a partner hierarchy query, the
SiteOwner APIs can be used to answer the question. This posting describes one approach.
The basic approach is to provide the UserName in question to any one of the
"SiteOwner APIs" and evaluate the API response. If the UserName is contained in the Partner's account hierarchy, the API will provide a valid response. If the UserName is not in the Partner's hierarchy, the API will return an error.
More specifically:
The API you will need to use is found in the
SiteOwner APIs. The API you will need to use is API_GetSiteOwnerID. In order to use this API, you will need to make a GET request to the following URL, substituting the variables explained below:
http://api.constantcontact.com/0.1/API_GetSiteOwnerID.jsp?loginName=&loginPassword=&siteOwnerLoginName=
Parameters:
- - your partner user name
- - your partner password
- - the site owner's user name you need to test.
If the site owner already exists underneath your partner account, you will get a response similar to the following:
0
9999999999999
Status=Open
The 0 is a successful response code. The 999999999999 will be the ID of the site owner and status is the status of the site owner.
If the site owner does NOT exist underneath your partner account, you will get a response like the following:
500
loginName has no access to specified SiteOwner
From this point, your application can decide what to do with this UserName request. You can decide to provide the UserName access to your application or you can prevent it. If appropriate, you may want to send the UserName details to the Constant Contact Business Partner team and request that the account be moved into your account hierarchy (subject to the account ownership and movement restrictions).
Tom M
Group Product Manager – Content Editing
Constant Contact