{"id":24579,"date":"2026-08-26T12:57:05","date_gmt":"2026-08-26T12:57:05","guid":{"rendered":"https:\/\/couponaffiliates.com\/?post_type=docs&#038;p=24579"},"modified":"2026-08-26T13:01:35","modified_gmt":"2026-08-26T13:01:35","password":"","slug":"api-webhooks","status":"publish","type":"docs","link":"https:\/\/couponaffiliates.com\/es\/docs\/api-webhooks\/","title":{"rendered":"API &amp; Webhooks"},"content":{"rendered":"<h2 class=\"wp-block-heading\">REST API<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Coupon Affiliates has a comprehensive REST API, so your affiliate data no longer has to live only inside WordPress. You can pull statistics into an external dashboard, sync affiliates and referrals with another system, wire your program into an automation tool, or point an AI assistant at it and ask it questions about your affiliates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will find it under <strong>Coupon Affiliates &gt; Admin Tools &gt; API<\/strong>. The API stays switched off until you enable it, and individual endpoints can be turned on and off from the same page, so nothing is exposed that you have not deliberately allowed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In short:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Endpoints<\/strong> for affiliates, coupons, referred orders, clicks, registrations, reports, payouts, activity events, and a &#8220;me&#8221; endpoint that an affiliate&#8217;s own integration can call.<\/li>\n\n\n\n<li><strong>API keys with scopes.<\/strong> Create a key, choose whether it can read, write, or manage the API itself, give it an optional expiry date, and revoke it at any time. WordPress application passwords work too.<\/li>\n\n\n\n<li><strong>Permissions are inherited.<\/strong> A key acts as a specific user, so administrators can read everything, while a key issued for an affiliate only ever sees that affiliate&#8217;s own coupons, statistics and payouts.<\/li>\n\n\n\n<li><strong>An OpenAPI document<\/strong> is generated for your own site, so tools that understand OpenAPI (including most AI assistants) can discover the endpoints themselves.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The API is included in the free version. The full endpoint reference, authentication details, request examples and webhook payloads are all in the documentation:<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-very-light-gray-background-color has-background wp-element-button\" href=\"https:\/\/couponaffiliates.com\/es\/api-docs\/\">View the API documentation<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Webhooks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than polling the API for changes, PRO users can have your site tell another service the moment something happens.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add a webhook, choose which events it should receive, and a signed JSON payload is sent to your URL whenever one of them fires: a referral being attributed, commission being added or removed, a registration being submitted, approved or declined, and payouts being requested, paid, cancelled or reversed. Multi-level commission events are included as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every delivery is signed with HMAC-SHA256 so the receiving end can verify it really came from your store, failed deliveries are retried with a backoff, and there is a &#8220;Send test&#8221; button to check your endpoint before you rely on it.<\/p>","protected":false},"excerpt":{"rendered":"<p>REST API Coupon Affiliates has a comprehensive REST API, so your affiliate data no longer has to live only inside WordPress. You can pull statistics into an external dashboard, sync affiliates and referrals with another system, wire your program into an automation tool, or point an AI assistant at it and ask it questions about [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":"","_links_to":"","_links_to_target":""},"doc_category":[136],"doc_tag":[],"class_list":["post-24579","docs","type-docs","status-publish","hentry","doc_category-developers","wpbf-post"],"year_month":"2026-08","word_count":361,"total_views":"8","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"Elliot Sowersby","author_link":"#"},"doc_category_info":[{"term_name":"Developers","term_url":"https:\/\/couponaffiliates.com\/es\/docs-category\/developers\/"}],"doc_tag_info":[],"taxonomy_info":{"doc_category":[{"value":136,"label":"Developers"}]},"featured_image_src_large":false,"comment_info":0,"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/docs\/24579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/comments?post=24579"}],"version-history":[{"count":6,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/docs\/24579\/revisions"}],"predecessor-version":[{"id":24588,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/docs\/24579\/revisions\/24588"}],"wp:attachment":[{"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/media?parent=24579"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/doc_category?post=24579"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/couponaffiliates.com\/es\/wp-json\/wp\/v2\/doc_tag?post=24579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}