{"id":1299,"date":"2023-08-22T16:15:04","date_gmt":"2023-08-22T16:15:04","guid":{"rendered":"https:\/\/flirtback.com\/blog\/?p=1299"},"modified":"2024-03-27T08:29:21","modified_gmt":"2024-03-27T08:29:21","slug":"affiliate-postbacks-documentation","status":"publish","type":"post","link":"https:\/\/flirtback.com\/blog\/affiliate-postbacks-documentation\/","title":{"rendered":"Affiliate Postback Documentation"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Affiliate Postback Documentation<\/h1>\n\n\n\n<p>Postbacks are used to notify you when a user signs up or makes a purchase. You can use these postbacks to track your earnings and conversions in your own system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p>You can use template parameters in postback URLs with the name that matches a parameter from the URL on the first user visit. You can use as many parameters as you want to, all will be passed back with the postback.<\/p>\n\n\n\n<p>Example first visit URL: <code>https:\/\/flirtback.com\/creators?clickId=campaign-id&amp;<em>tracking_id1=external-id<\/em><\/code><\/p>\n\n\n\n<p>You can format a postback URL like <code>https:\/\/example.com\/postback?id=<em>{tracking_id1}<\/em><\/code> which will result in the postback being sent to <code>https:\/\/example.com\/postback?id=<em>external-id<\/em><\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Registration postback<\/h3>\n\n\n\n<p>Registration postback will be sent as a <strong>POST<\/strong> request after a user registers through one of your campaigns.<\/p>\n\n\n\n<p>Example request payload:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n  \"campaign_id\": \"campaign-id\",\n  \"user_id\": \"f58f73f810130db11699045cb58eb6c837a9a1b0\",\n  \"country\": \"US\",\n  \"created_at\": \"2023-08-22T13:52:57.000000Z\",\n  \"initial_url_params\": {\n    \"clickId\": \"campaign-id\",\n    \"tracking_id1\": \"external-id\"\n  }\n}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Sales postback<\/h3>\n\n\n\n<p>Sales postback will be sent as a <strong>POST<\/strong> request after a user registered through one of your campaigns makes a purchase or is billed for a recurring payment.<\/p>\n\n\n\n<p>Example request payload:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n  \"campaign_id\": \"campaign-id\",\n  \"user_id\": \"f58f73f810130db11699045cb58eb6c837a9a1b0\",\n  \"sale_id\": \"665f5d7674d75ec6a52ae95d2e72ad9e126be170\",\n  \"sale_amount\": 9.17,\n  \"affiliate_amount\": 1.38,\n  \"currency\": \"EUR\",\n  \"recurring\": false,\n  \"country\": \"US\",\n  \"created_at\": \"2023-08-22T15:05:01.000000Z\",\n  \"initial_url_params\": {\n    \"clickId\": \"campaign-id\",\n    \"tracking_id1\": \"external-id\"\n  }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Affiliate Postback Documentation Postbacks are used to notify you when a user signs up or makes a purchase. You can use these postbacks to track your earnings and conversions in your own system. Parameters You can use template parameters in postback URLs with the name that matches a parameter from the URL on the first [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1349,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1299","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/posts\/1299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/comments?post=1299"}],"version-history":[{"count":8,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/posts\/1299\/revisions"}],"predecessor-version":[{"id":1307,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/posts\/1299\/revisions\/1307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/media\/1349"}],"wp:attachment":[{"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/media?parent=1299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/categories?post=1299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flirtback.com\/blog\/wp-json\/wp\/v2\/tags?post=1299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}