Constant Contact
Interact with the Constant Contact API (v2) using SQL Server
- Install the SQLHTTP database on your SQL Server
- Obtain an API Key and Token from Constant Contact
- Create the stored procedures documented below
- Execute the following SQL statement:
1 2 3 4 5 |
EXEC usp_ConstantContact_v2_Auth_Init @Profile = 'enter-profile-name-of-your-choosing', @APIKey = 'your-constant-contact-api-key-here', @Token = 'your-constant-contact-token-here' |
1 2 3 4 5 6 7 8 9 10 11 |
CREATE PROCEDURE usp_ConstantContact_v2_Auth_Init(@Profile nvarchar(100), @APIKey varchar(50), @Token varchar(50)) AS EXEC SQLHTTP.net.AuthParamSet @Profile = @Profile, @Name = 'APIKey', @Value = @APIKey EXEC SQLHTTP.net.AuthParamSet @Profile = @Profile, @Name = 'Token', @Value = @Token GO |
1 2 3 4 5 6 7 8 9 10 |
CREATE PROCEDURE usp_ConstantContact_v2_Auth_Header( @Profile nvarchar(100), @HttpSessionID uniqueidentifier) AS DECLARE @AuthorizationHeaderValue varchar(MAX) SET @AuthorizationHeaderValue = 'Bearer ' + SQLHTTP.net.AuthParam(@Profile, 'Token') EXEC SQLHTTP.net.RequestHeaderSet @HTTPSessionID, 'Authorization', @AuthorizationHeaderValue GO |
- Account Info – Fetch
- Account Info – Update
- Account Verified-Email-Address – Create
- Account Verified-Email-Addresses – Fetch
- Contact – Create
- Contact – Fetch
- Contact – Unsubscribe
- Contact List – Create
- Contact List – Delete
- Contact List – Fetch
- Contact List – Update
- Contact Lists – Fetch
- Contacts – Fetch
- Email-Marketing Campaign – Create
- Email-Marketing Campaign – Delete
- Email-Marketing Campaign – Fetch
- Email-Marketing Campaign – Preview
- Email-Marketing Campaign – Update
- Email-Marketing Campaign Schedule – Create
- Email-Marketing Campaign Test – Create
- Email-Marketing Campaigns – Fetch
- Event – Create
- Event – Fetch
- Event – Patch
- Event – Update
- Event Fee – Create
- Event Fee – Delete
- Event Fee – Fetch
- Event Fee – Update
- Event Fees – Fetch
- Event Item – Create
- Event Item – Delete
- Event Item – Fetch
- Event Item – Update
- Event Item Attribute – Create
- Event Item Attribute – Delete
- Event Item Attribute – Fetch
- Event Item Attribute – Update
- Event Item Attributes – Fetch
- Event Items – Fetch
- Event Promocode – Create
- Event Promocode – Delete
- Event Promocode – Fetch
- Event Promocode – Update
- Event Promocodes – Fetch
- Event Registrant – Fetch
- Event Registrants – Fetch
- Events – Fetch
- Library File – Delete
- Library File Upload-Status – Fetch
- Library Files – Move
- Library Folder – Create
- Library Folder – Delete
- Library Folder – Fetch
- Library Folder – Update
- Library Folders Trash Files – Delete
- Library Info – Fetch
IMPORTANT DISCLAIMER
CODE/SQL ON THESE PAGES ARE PROVIDED AS-IS AND ARE AVAILABLE FOR ILLUSTRATIVE PURPOSES ONLY.
USERS ARE REQUIRED TO ABIDE BY THE TERMS AND CONDITIONS FOR USING REFERENCED THIRD PARTY WEBSITES AND/OR APIs FROM THEIR RESPECTIVE WEBSITES. WE DO NOT CONDONE ANY VIOLATION OF THIRD PARTY WEBSITES AND/OR APIs TERMS AND CONDITIONS USING OUR SOFTWARE.
USERS SHALL BE SOLELY RESPONSIBLE AND BE SOLELY LIABLE FOR VIOLATION OF ANY RULES SPECIFIED BY THIRD PARTIES FOR USING THEIR WEBSITES AND/OR APIs, OR INFRINGEMENT OF RIGHTS OF SUCH THIRD PARTIES.