{
"message": "The 'sale' event with the id 'evt_123' already exists."
}
Assign sales and commissions to your promoters. To track sales and generate commissions correctly, you need to use this API call each time a non-zero amount sale is processed in your system, even if it comes from a recurring charge or one-time charge.
To avoid fraudulent sales, we don’t use JS conversion pixels to track sales, which are very unreliable and can be easily faked. Instead, we use server-side tracking for all sales to ensure that a sale is tracked only when you actually receive money in your billing account.
To maintain the same standards with the API, we recommend making the sale API call (this call) only when you receive confirmation of the sale from your billing provider, such as from a webhook, an IPN, or a success response from an API charge call.
You just need to pass the sale amount (before taxes) and we’ll take care of the rest. The commissions/rewards will be calculated based on that amount and the plan ID, in case you use the plan-level rewards feature.
Using email or UID parameters, we identify the lead/customer who generated the sale, which also helps us determine the promoter who owns the reward/commission.
The lead is added to our system either by the client signup tracking script when the user signs up or by calling the signup API endpoint. There is also the option to bypass the signup tracking by using TID or ref_id parameters, which will create the lead and assign the sale in one go.
If we don’t find the lead in our system, it means that the sale is not a referral sale and you’ll get a 204 response. You don’t have to identify which sale is from referrals and which is not; we’ll take care of that.
For zero-decimal currencies like JPY, amount and mrr parameters should be sent as whole values.
For other currencies, amount and mrr parameter values should be in cents, i.e., you will need to multiply the value by 100 before sending the request.
Authorizations
X-API-KEY
string
header
required
Query Parameters
email
string
required if uid is null
Email of the lead/sign-up
uid
string
required if email is null
uid of the lead added on signup tracking
event_id
string
required
Transaction or sale event ID. It's required to avoid generating duplicate sales in case you mistakenly send the same API call multiple times.
amount
string
required
The sale amount in cents. It's used to calculate commissions/rewards.
For zero-decimal currencies like JPY, amount and mrr parameters should be sent as whole values.
For other currencies, amount and mrr parameter values should be in cents, i.e., you will need to multiply the value by 100 before sending the request.
quantity
string
Number of subscriptions/items refunded. If it's only one you can skip this parameter.
plan
string
Customer plan ID from the billing provider. It's used to calculate rewards in case you use plan-level rewards feature.
currency
string
This field is only required if the currency of the sale is not the same as the one set on FirstPromoter settings. We'll automatically convert the amount from this currency to the default one set on your FirstPromoter account.
mrr
string
Sets the Monthly Recurring Revenue generated by the customer. It's used only for calculating the MRR generated by the program, not for calculating the commissions.
promo_code
string
For promo code/coupon code tracking. If you gave a unique coupon to a promoter and you added it on his promotion, you can pass it here and it will CREATE a new lead and a sale for that promoter (if it doesn't exist already).
billing_country
string
Customer's billing country as an ISO 3166-1 alpha-2 code (e.g. US). Alpha-3 codes and English country names are also accepted. Unrecognized values are ignored. Shown as the referral and commission country in the dashboard.
tid
string
You can avoid a signup tracking call by providing the _fprom_tid cookie value (visitor tracking id) read on your system
ref_id
string
You can avoid signup tracking call by providing the ref_id(referral id) of the promoter
skip_email_notification
boolean
Set this to true to skip email notifications. Default is false.
created_at
string<date-time>
ISO 8601 date string of when the sale occurred. Defaults to now.
subscription_id
string
Subscription ID from your billing provider. Stored in the lead metadata.
start_recurring_reward_in
integer
Number of days to delay the first commission. The sale will be scheduled and tracked at now + start_recurring_reward_in days.
recurring_reward_frequency
integer
Interval in days between recurring commission events. Used together with start_recurring_reward_in.
max_recurring
integer
Maximum number of recurring commission events to generate. Requires recurring_reward_frequency to be set.
ecom_sale
boolean
Set to true for e-commerce one-time sales (non-subscription).
Response
Sale tracked successfully
id
integer
Example:
33847194
type
string
Example:
"sale"
amount_cents
integer
Example:
1000
reward
object
Show child attributes
lead
object
Show child attributes
promoter
object
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FirstPromoter Docs","description":"FirstPromoter developer docs: set up affiliate and referral tracking, connect billing and payout providers, receive webhooks, and use the REST API and MCP server.","colors":{"primary":"#2497F3","light":"#42A5F5","dark":"#1A1C25"},"logo":{"light":"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=17d35344b27497f795682da8932295c9","dark":"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=ef23e747176d9a87b5ddf122595793f8"},"favicon":"https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/favicon.png?fit=max\u0026auto=format\u0026n=rNk-Jdvp2vdjAvd9\u0026q=85\u0026s=7faf17e323609b0fef661b9a9fe49ebc","navbar":{"links":[{"href":"mailto:support@firstpromoter.com","label":"Support"},{"href":"https://github.com/firstpromoter/skills","label":"GitHub skills"}],"primary":{"type":"button","label":"Dashboard","href":"https://login.firstpromoter.com/"}},"footer":{"socials":{"x":"https://x.com/firstpromoter","linkedin":"https://www.linkedin.com/company/first-promoter","facebook":"https://www.facebook.com/firstpromoter","github":"https://github.com/firstpromoter"},"links":[{"header":"Product","items":[{"label":"Features","href":"https://firstpromoter.com/features"},{"label":"Integrations","href":"https://firstpromoter.com/integrations"},{"label":"Pricing","href":"https://firstpromoter.com/pricing"},{"label":"Changelog","href":"https://changelog.firstpromoter.com/"},{"label":"Stripe app","href":"https://marketplace.stripe.com/apps/firstpromoter"}]},{"header":"Company","items":[{"label":"About us","href":"https://firstpromoter.com/about-us"},{"label":"Careers","href":"https://firstpromoter.com/careers"},{"label":"Blog","href":"https://firstpromoter.com/blog"},{"label":"Case studies","href":"https://firstpromoter.com/casestudy"},{"label":"Affiliate program","href":"https://firstpromoter.com/affiliate-program"}]},{"header":"Help","items":[{"label":"Help center","href":"https://help.firstpromoter.com/en"},{"label":"Contact support","href":"mailto:support@firstpromoter.com"},{"label":"Log in","href":"https://app.firstpromoter.com/login"}]},{"header":"Legal","items":[{"label":"Privacy policy","href":"https://firstpromoter.com/privacy"},{"label":"Terms of service","href":"https://firstpromoter.com/terms"}]}]},"search":{"prompt":"Search guides, integrations and API endpoints..."},"seo":{"metatags":{"canonical":"https://docs.firstpromoter.com"},"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude","cursor","mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"firstpromoter","hasAudioNarration":false,"actualSubdomain":"firstpromoter","customDomains":["docs.firstpromoter.com"],"gitSource":{"type":"github","owner":"firstpromoter","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b094b0e4bf8de670637d408","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Documentation","count":259},{"language":"default","tag":"API Reference","count":83},{"language":"default","tag":"Integration Options","count":43},{"language":"default","tag":"Affiliate API Reference","count":36},{"language":"default","tag":"Promoters","count":25},{"language":"default","tag":"Platform","count":23},{"language":"default","tag":"Custom","count":9},{"language":"default","tag":"Webhooks","count":9},{"language":"default","tag":"Reports","count":8},{"language":"default","tag":"Payouts","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference-v1/tracking-api/sales","slug":"/api-reference-v1/tracking-api/sales","pageMetadata":{"title":"Tracking sales and commissions","description":"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter's commission (legacy v1 API).","openapi":"openapi-tracking POST /sale","href":"/api-reference-v1/tracking-api/sales"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter’s commission (legacy v1 API).\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Note,Tip}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_components.p,{children:[`Assign sales and commissions to your promoters. To track sales and generate commissions correctly, you need to use this API call each time a non-zero amount sale is processed in your system, even if it comes from a recurring charge or one-time charge. `,_jsxs(Note,{children:[`To avoid fraudulent sales, we don’t use JS conversion pixels to track sales, which are very unreliable and can be easily faked. Instead, we use server-side tracking for all sales to ensure that a sale is tracked only when you actually receive money in your billing account. `,_jsx(`br`,{}),_jsx(`br`,{}),`To maintain the same standards with the API, we recommend making the sale API call (this call) only when you receive confirmation of the sale from your billing provider, such as from a webhook, an IPN, or a success response from an API charge call.`,_jsx(`br`,{}),_jsx(`br`,{}),`You just need to pass the sale amount (before taxes) and we’ll take care of the rest. The commissions/rewards will be calculated based on that amount and the plan ID, in case you use the plan-level rewards feature.`]}),` Using email or UID parameters, we identify the lead/customer who generated the sale, which also helps us determine the promoter who owns the reward/commission. `,_jsx(`br`,{}),_jsx(`br`,{}),`The lead is added to our system either by the client signup tracking script when the user signs up or by calling the signup API endpoint. There is also the option to bypass the signup tracking by using TID or ref_id parameters, which will create the lead and assign the sale in one go.`,_jsx(`br`,{}),_jsx(`br`,{}),_jsx(_components.strong,{children:`If we don’t find the lead in our system, it means that the sale is not a referral sale and you’ll get a 204 response. You don’t have to identify which sale is from referrals and which is not; we’ll take care of that.`}),` `,_jsxs(Tip,{children:[_jsx(_components.strong,{children:`For zero-decimal`}),` currencies like `,_jsx(_components.code,{children:`JPY`}),`, `,_jsx(_components.code,{children:`amount`}),` and `,_jsx(_components.code,{children:`mrr`}),` parameters should be sent as `,_jsx(_components.strong,{children:`whole values`}),`. `,_jsx(`br`,{}),_jsx(`br`,{}),_jsx(_components.strong,{children:`For other currencies`}),`, `,_jsx(_components.code,{children:`amount`}),` and `,_jsx(_components.code,{children:`mrr`}),` parameter values should be in cents, i.e., you will need to `,_jsx(_components.strong,{children:`multiply the value by 100`}),` before sending the request.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Tracking sales and commissions","description":"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter's commission (legacy v1 API).","openapi":"openapi-tracking POST /sale","href":"/api-reference-v1/tracking-api/sales"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/firstpromoter/8ad42af542d542c7/downloadables/fpr-prox.js"],"openApiReferenceData":{"operation":{"description":"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter's commission (legacy v1 API).","parameters":["a6763943-f494-4e68-9aed-065452ba5e5d","b4489c2d-de39-453a-9d32-28af338ba057","4dd26bb7-66f4-4251-93fa-ebb29a13f2e2","a294723a-0e80-41ba-b0f8-25c17c19bf97","623d6ad8-06a5-46eb-95e0-5f9527a4fe83","34d55c21-a4d5-48ba-94ae-d574b6bdf278","919bbe65-56cf-433f-b9f5-934237a96059","af67bb55-bbb6-4b32-9f7a-27975fa333b4","4f1a7f20-b3a9-496d-a88a-7d35c85f62bf","22e5a5ad-66ee-466b-a4b9-934b35f728b8","c586b8e5-86e2-45e6-b7b3-bcf4f49f6bfc","9fe68e6c-ef9d-48c0-a65f-e66a9021b3c9","d1205f85-906b-4448-ac31-98266a225d80","ae131b69-7d1a-4a25-8d1a-35b7f886db84","675fe39c-e3cc-4813-b373-7d5c65a78738","9201bb8a-ff08-4ed0-8d47-3d18e8001299","689329d1-5573-4e03-bcde-8753f596077d","130fd4db-bc7b-44e4-89ff-8a44aca4e2a2","1d893098-5e45-45c9-b89e-ef4e1558851e"],"responses":{"200":"f4acc49c-4da5-4f1f-a673-4fad4d2197d4","204":"00344aee-0c0a-4e3e-92b3-e1d9715de9a4","400":"feed266c-cf11-4d5a-a5ea-112617e513b4","409":"f89e29da-3e70-46dc-afc1-13d55b51cbaf"},"method":"post","type":"path","servers":["74884482-9112-44c8-8f60-9908b3c0be80"],"security":["2caa02b8-9a52-4447-9157-ef0a0f32335e"],"path":"/sale","baseUrlOptions":["https://firstpromoter.com/api/v1/track"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a6763943-f494-4e68-9aed-065452ba5e5d":{"name":"email","in":"query","description":"`required if uid is null` \n\n Email of the lead/sign-up","schema":{"type":"string","description":"`required if uid is null` \n\n Email of the lead/sign-up","uniqueKey":"","typeLabel":"string"}},"b4489c2d-de39-453a-9d32-28af338ba057":{"name":"uid","in":"query","description":"`required if email is null` \n\n uid of the lead added on signup tracking","schema":{"type":"string","description":"`required if email is null` \n\n uid of the lead added on signup tracking","uniqueKey":"","typeLabel":"string"}},"4dd26bb7-66f4-4251-93fa-ebb29a13f2e2":{"name":"event_id","in":"query","required":true,"description":"Transaction or sale event ID. It's required to avoid generating duplicate sales in case you mistakenly send the same API call multiple times.","schema":{"type":"string","isRequired":true,"description":"Transaction or sale event ID. It's required to avoid generating duplicate sales in case you mistakenly send the same API call multiple times.","uniqueKey":"","typeLabel":"string"}},"a294723a-0e80-41ba-b0f8-25c17c19bf97":{"name":"amount","in":"query","required":true,"description":"The sale amount in cents. It's used to calculate commissions/rewards. \n \n **For zero-decimal** currencies like `JPY`, `amount` and `mrr` parameters should be sent as **whole values**. \n \n **For other currencies**, `amount` and `mrr` parameter values should be in cents, i.e., you will need to **multiply the value by 100** before sending the request.","schema":{"type":"string","isRequired":true,"description":"The sale amount in cents. It's used to calculate commissions/rewards. \n \n **For zero-decimal** currencies like `JPY`, `amount` and `mrr` parameters should be sent as **whole values**. \n \n **For other currencies**, `amount` and `mrr` parameter values should be in cents, i.e., you will need to **multiply the value by 100** before sending the request.","uniqueKey":"","typeLabel":"string"}},"623d6ad8-06a5-46eb-95e0-5f9527a4fe83":{"name":"quantity","in":"query","description":"Number of subscriptions/items refunded. If it's only one you can skip this parameter.","schema":{"type":"string","description":"Number of subscriptions/items refunded. If it's only one you can skip this parameter.","uniqueKey":"","typeLabel":"string"}},"34d55c21-a4d5-48ba-94ae-d574b6bdf278":{"name":"plan","in":"query","description":"Customer plan ID from the billing provider. It's used to calculate rewards in case you use plan-level rewards feature.","schema":{"type":"string","description":"Customer plan ID from the billing provider. It's used to calculate rewards in case you use plan-level rewards feature.","uniqueKey":"","typeLabel":"string"}},"919bbe65-56cf-433f-b9f5-934237a96059":{"name":"currency","in":"query","description":"This field is only required if the currency of the sale is not the same as the one set on FirstPromoter settings. We'll automatically convert the amount from this currency to the default one set on your FirstPromoter account.","schema":{"type":"string","description":"This field is only required if the currency of the sale is not the same as the one set on FirstPromoter settings. We'll automatically convert the amount from this currency to the default one set on your FirstPromoter account.","uniqueKey":"","typeLabel":"string"}},"af67bb55-bbb6-4b32-9f7a-27975fa333b4":{"name":"mrr","in":"query","description":"Sets the Monthly Recurring Revenue generated by the customer. It's used only for calculating the MRR generated by the program, not for calculating the commissions.","schema":{"type":"string","description":"Sets the Monthly Recurring Revenue generated by the customer. It's used only for calculating the MRR generated by the program, not for calculating the commissions.","uniqueKey":"","typeLabel":"string"}},"4f1a7f20-b3a9-496d-a88a-7d35c85f62bf":{"name":"promo_code","in":"query","description":"For promo code/coupon code tracking. If you gave a unique coupon to a promoter and you added it on his promotion, you can pass it here and it will CREATE a new lead and a sale for that promoter (if it doesn't exist already).","schema":{"type":"string","description":"For promo code/coupon code tracking. If you gave a unique coupon to a promoter and you added it on his promotion, you can pass it here and it will CREATE a new lead and a sale for that promoter (if it doesn't exist already).","uniqueKey":"","typeLabel":"string"}},"22e5a5ad-66ee-466b-a4b9-934b35f728b8":{"name":"billing_country","in":"query","description":"Customer's billing country as an ISO 3166-1 alpha-2 code (e.g. `US`). Alpha-3 codes and English country names are also accepted. Unrecognized values are ignored. Shown as the referral and commission country in the dashboard.","schema":{"type":"string","description":"Customer's billing country as an ISO 3166-1 alpha-2 code (e.g. `US`). Alpha-3 codes and English country names are also accepted. Unrecognized values are ignored. Shown as the referral and commission country in the dashboard.","uniqueKey":"","typeLabel":"string"}},"c586b8e5-86e2-45e6-b7b3-bcf4f49f6bfc":{"name":"tid","in":"query","description":"You can avoid a signup tracking call by providing the `_fprom_tid` cookie value (visitor tracking id) read on your system","schema":{"type":"string","description":"You can avoid a signup tracking call by providing the `_fprom_tid` cookie value (visitor tracking id) read on your system","uniqueKey":"","typeLabel":"string"}},"9fe68e6c-ef9d-48c0-a65f-e66a9021b3c9":{"name":"ref_id","in":"query","description":"You can avoid signup tracking call by providing the `ref_id`(referral id) of the promoter","schema":{"type":"string","description":"You can avoid signup tracking call by providing the `ref_id`(referral id) of the promoter","uniqueKey":"","typeLabel":"string"}},"d1205f85-906b-4448-ac31-98266a225d80":{"name":"skip_email_notification","in":"query","description":"Set this to `true` to skip email notifications. Default is `false`.","schema":{"type":"boolean","description":"Set this to `true` to skip email notifications. Default is `false`.","uniqueKey":"","typeLabel":"boolean"}},"ae131b69-7d1a-4a25-8d1a-35b7f886db84":{"name":"created_at","in":"query","description":"ISO 8601 date string of when the sale occurred. Defaults to now.","schema":{"type":"string","format":"date-time","description":"ISO 8601 date string of when the sale occurred. Defaults to now.","uniqueKey":"","typeLabel":"string\u003cdate-time>"}},"675fe39c-e3cc-4813-b373-7d5c65a78738":{"name":"subscription_id","in":"query","description":"Subscription ID from your billing provider. Stored in the lead metadata.","schema":{"type":"string","description":"Subscription ID from your billing provider. Stored in the lead metadata.","uniqueKey":"","typeLabel":"string"}},"9201bb8a-ff08-4ed0-8d47-3d18e8001299":{"name":"start_recurring_reward_in","in":"query","description":"Number of days to delay the first commission. The sale will be scheduled and tracked at `now + start_recurring_reward_in` days.","schema":{"type":"integer","description":"Number of days to delay the first commission. The sale will be scheduled and tracked at `now + start_recurring_reward_in` days.","uniqueKey":"","typeLabel":"integer"}},"689329d1-5573-4e03-bcde-8753f596077d":{"name":"recurring_reward_frequency","in":"query","description":"Interval in days between recurring commission events. Used together with `start_recurring_reward_in`.","schema":{"type":"integer","description":"Interval in days between recurring commission events. Used together with `start_recurring_reward_in`.","uniqueKey":"","typeLabel":"integer"}},"130fd4db-bc7b-44e4-89ff-8a44aca4e2a2":{"name":"max_recurring","in":"query","description":"Maximum number of recurring commission events to generate. Requires `recurring_reward_frequency` to be set.","schema":{"type":"integer","description":"Maximum number of recurring commission events to generate. Requires `recurring_reward_frequency` to be set.","uniqueKey":"","typeLabel":"integer"}},"1d893098-5e45-45c9-b89e-ef4e1558851e":{"name":"ecom_sale","in":"query","description":"Set to `true` for e-commerce one-time sales (non-subscription).","schema":{"type":"boolean","description":"Set to `true` for e-commerce one-time sales (non-subscription).","uniqueKey":"","typeLabel":"boolean"}}},"responses":{"f4acc49c-4da5-4f1f-a673-4fad4d2197d4":{"description":"Sale tracked successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","example":33847194,"uniqueKey":"id","typeLabel":"integer"},"type":{"type":"string","example":"sale","uniqueKey":"type","typeLabel":"string"},"amount_cents":{"type":"integer","example":1000,"uniqueKey":"amount_cents","typeLabel":"integer"},"reward":{"type":"object","properties":{"id":{"type":"integer","example":10940014,"uniqueKey":"reward.id","typeLabel":"integer"},"status":{"type":"string","example":"approved","uniqueKey":"reward.status","typeLabel":"string"},"amount":{"type":"integer","example":200,"uniqueKey":"reward.amount","typeLabel":"integer"},"unit":{"type":"string","example":"cash","uniqueKey":"reward.unit","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","example":"2024-09-11T14:22:12.160Z","uniqueKey":"reward.created_at","typeLabel":"string\u003cdate-time>"},"lead":{"type":"object","properties":{"id":{"type":"integer","example":20738339,"uniqueKey":"reward.lead.id","typeLabel":"integer"},"state":{"type":"string","example":"cancelled","uniqueKey":"reward.lead.state","typeLabel":"string"},"email":{"type":"string","example":"hello@testmintli.com","uniqueKey":"reward.lead.email","typeLabel":"string"},"uid":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.uid.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.uid.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.uid","typeLabel":"string | null"},"customer_since":{"type":"string","format":"date-time","example":"2024-09-11T14:22:12.160Z","uniqueKey":"reward.lead.customer_since","typeLabel":"string\u003cdate-time>"},"cancelled_at":{"type":"string","format":"date-time","example":"2024-09-11T15:07:46.174Z","uniqueKey":"reward.lead.cancelled_at","typeLabel":"string\u003cdate-time>"},"plan_name":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.plan_name.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.plan_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.plan_name","typeLabel":"string | null"},"suspicion":{"type":"string","example":"no_suspicion","uniqueKey":"reward.lead.suspicion","typeLabel":"string"},"username":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.username.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.username.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.username","typeLabel":"string | null"},"website":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.website.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.website.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.website","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","example":"2024-09-09T16:22:44.168Z","uniqueKey":"reward.lead.created_at","typeLabel":"string\u003cdate-time>"},"split_promotion_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.split_promotion_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.split_promotion_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.split_promotion_id","typeLabel":"string | null"},"custom_fields":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.custom_fields.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.custom_fields","typeLabel":"string | null"},"split_percentage_value":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.split_percentage_value.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.split_percentage_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.split_percentage_value","typeLabel":"string | null"},"visitor_sub_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.lead.visitor_sub_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.lead.visitor_sub_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.lead.visitor_sub_id","typeLabel":"string | null"}},"uniqueKey":"reward.lead","typeLabel":"object"},"event_id":{"type":"string","example":"test_sale_12340987","uniqueKey":"reward.event_id","typeLabel":"string"},"conversion_amount":{"type":"integer","example":1000,"uniqueKey":"reward.conversion_amount","typeLabel":"integer"},"tier_level":{"type":"integer","example":1,"uniqueKey":"reward.tier_level","typeLabel":"integer"},"split_type":{"oneOf":[{"type":"string","example":null,"uniqueKey":"reward.split_type.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"reward.split_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"reward.split_type","typeLabel":"string | null"}},"uniqueKey":"reward","typeLabel":"object"},"lead":{"type":"object","properties":{"id":{"type":"integer","example":20738339,"uniqueKey":"lead.id","typeLabel":"integer"},"state":{"type":"string","example":"cancelled","uniqueKey":"lead.state","typeLabel":"string"},"email":{"type":"string","example":"hello@testmintli.com","uniqueKey":"lead.email","typeLabel":"string"},"uid":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.uid.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.uid.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.uid","typeLabel":"string | null"},"customer_since":{"type":"string","format":"date-time","example":"2024-09-11T14:22:12.160Z","uniqueKey":"lead.customer_since","typeLabel":"string\u003cdate-time>"},"cancelled_at":{"type":"string","format":"date-time","example":"2024-09-11T15:07:46.174Z","uniqueKey":"lead.cancelled_at","typeLabel":"string\u003cdate-time>"},"plan_name":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.plan_name.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.plan_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.plan_name","typeLabel":"string | null"},"suspicion":{"type":"string","example":"no_suspicion","uniqueKey":"lead.suspicion","typeLabel":"string"},"username":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.username.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.username.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.username","typeLabel":"string | null"},"website":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.website.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.website.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.website","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","example":"2024-09-09T16:22:44.168Z","uniqueKey":"lead.created_at","typeLabel":"string\u003cdate-time>"},"split_promotion_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.split_promotion_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.split_promotion_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.split_promotion_id","typeLabel":"string | null"},"custom_fields":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.custom_fields.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.custom_fields","typeLabel":"string | null"},"split_percentage_value":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.split_percentage_value.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.split_percentage_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.split_percentage_value","typeLabel":"string | null"},"visitor_sub_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"lead.visitor_sub_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"lead.visitor_sub_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.visitor_sub_id","typeLabel":"string | null"}},"uniqueKey":"lead","typeLabel":"object"},"promoter":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the promoter","example":3920164,"uniqueKey":"promoter.id","typeLabel":"integer"},"status":{"type":"string","description":"Status of the promoter","example":"active","uniqueKey":"promoter.status","typeLabel":"string"},"cust_id":{"type":"string","example":"","uniqueKey":"promoter.cust_id","typeLabel":"string"},"email":{"type":"string","description":"Email of the promoter","example":"peluwydo@mailinator.com","uniqueKey":"promoter.email","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"ISO date of when the promoter was created","example":"2022-04-26T15:28:24.800Z","uniqueKey":"promoter.created_at","typeLabel":"string\u003cdate-time>"},"temp_password":{"oneOf":[{"type":"string","description":"Temporary password created for the promoter","example":"xxxxxxxxxx","uniqueKey":"promoter.temp_password.oneOf.0","typeLabel":"string"},{"type":"null","description":"Temporary password created for the promoter","example":"xxxxxxxxxx","uniqueKey":"promoter.temp_password.oneOf.1","typeLabel":"null"}],"uniqueKey":"promoter.temp_password","typeLabel":"string | null"},"default_promotion_id":{"type":"integer","example":4210919,"uniqueKey":"promoter.default_promotion_id","typeLabel":"integer"},"pref":{"type":"string","example":"db1znwe","uniqueKey":"promoter.pref","typeLabel":"string"},"default_ref_id":{"type":"string","description":"Default referral id of the promoter","example":"8yi2epelut","uniqueKey":"promoter.default_ref_id","typeLabel":"string"},"note":{"oneOf":[{"type":"string","description":"A note/description of promoter","example":"This is a note","uniqueKey":"promoter.note.oneOf.0","typeLabel":"string"},{"type":"null","description":"A note/description of promoter","example":"This is a note","uniqueKey":"promoter.note.oneOf.1","typeLabel":"null"}],"uniqueKey":"promoter.note","typeLabel":"string | null"},"w8_form_url":{"oneOf":[{"type":"string","description":"Url of the w8 form","example":null,"uniqueKey":"promoter.w8_form_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Url of the w8 form","example":null,"uniqueKey":"promoter.w8_form_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"promoter.w8_form_url","typeLabel":"string | null"},"w9_form_url":{"oneOf":[{"type":"string","description":"Url of the w9 form","example":null,"uniqueKey":"promoter.w9_form_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Url of the w9 form","example":null,"uniqueKey":"promoter.w9_form_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"promoter.w9_form_url","typeLabel":"string | null"},"parent_promoter_id":{"type":"integer","description":"Parent promoter id","example":577918,"uniqueKey":"promoter.parent_promoter_id","typeLabel":"integer"},"earnings_balance":{"type":"object","description":"Earning balance of the promoter","properties":{"cash":{"type":"integer","example":50744,"uniqueKey":"promoter.earnings_balance.cash","typeLabel":"integer"}},"uniqueKey":"promoter.earnings_balance","typeLabel":"object"},"current_balance":{"type":"object","description":"Current balance of the promoter","properties":{"cash":{"type":"integer","example":20044,"uniqueKey":"promoter.current_balance.cash","typeLabel":"integer"}},"uniqueKey":"promoter.current_balance","typeLabel":"object"},"paid_balance":{"type":"object","description":"Paid balance of the promoter","properties":{"cash":{"type":"integer","example":30700,"uniqueKey":"promoter.paid_balance.cash","typeLabel":"integer"}},"uniqueKey":"promoter.paid_balance","typeLabel":"object"},"auth_token":{"type":"string","description":"Authentication token generated when the promoter was created","example":"xxxxxxxxxxxxxx","uniqueKey":"promoter.auth_token","typeLabel":"string"}},"uniqueKey":"promoter","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":33847194,"type":"sale","amount_cents":1000,"reward":{"id":10940014,"status":"approved","amount":200,"unit":"cash","created_at":"2024-09-11T14:22:12.160Z","lead":{"id":20738339,"state":"cancelled","email":"hello@testmintli.com","uid":null,"customer_since":"2024-09-11T14:22:12.160Z","cancelled_at":"2024-09-11T15:07:46.174Z","plan_name":null,"suspicion":"no_suspicion","username":null,"website":null,"created_at":"2024-09-09T16:22:44.168Z","split_promotion_id":null,"custom_fields":null,"split_percentage_value":null,"visitor_sub_id":null},"event_id":"test_sale_12340987","conversion_amount":1000,"tier_level":1,"split_type":null},"lead":{"id":20738339,"state":"cancelled","email":"hello@testmintli.com","uid":null,"customer_since":"2024-09-11T14:22:12.160Z","cancelled_at":"2024-09-11T15:07:46.174Z","plan_name":null,"suspicion":"no_suspicion","username":null,"website":null,"created_at":"2024-09-09T16:22:44.168Z","split_promotion_id":null,"custom_fields":null,"split_percentage_value":null,"visitor_sub_id":null},"promoter":{"id":3920164,"status":"active","cust_id":"","email":"peluwydo@mailinator.com","created_at":"2022-04-26T15:28:24.800Z","temp_password":"xxxxxxxxxx","default_promotion_id":4210919,"pref":"db1znwe","default_ref_id":"8yi2epelut","note":"This is a note","w8_form_url":null,"w9_form_url":null,"parent_promoter_id":577918,"earnings_balance":{"cash":50744},"current_balance":{"cash":20044},"paid_balance":{"cash":30700},"auth_token":"xxxxxxxxxxxxxx"}}}},"exampleType":"generated"}},"exampleType":"generated"},"00344aee-0c0a-4e3e-92b3-e1d9715de9a4":{"description":"No Content — the lead was not found, meaning this is not a referral sale. No commission is generated.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"feed266c-cf11-4d5a-a5ea-112617e513b4":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Error. Amount blank or invalid.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Error. Amount blank or invalid."}}},"exampleType":"generated"}},"exampleType":"generated"},"f89e29da-3e70-46dc-afc1-13d55b51cbaf":{"description":"Conflict — a sale event with this `event_id` already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"The 'sale' event with the id 'evt_123' already exists.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The 'sale' event with the id 'evt_123' already exists."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2caa02b8-9a52-4447-9157-ef0a0f32335e":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"74884482-9112-44c8-8f60-9908b3c0be80":{"url":"https://firstpromoter.com/api/v1/track"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-KEY","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"X-API-KEY","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"X-API-KEY"}],"title":"apiKeyAuth"}]},"originalFileLocation":"api-reference-v1/tracking-api/openapi-tracking.json"},"subdomain":"firstpromoter","siteName":"FirstPromoter Docs","title":"Tracking sales and commissions - FirstPromoter Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v2":{"href":"/introduction","matchLevel":4},"v1":{"href":"/api-reference-v1/tracking-api/sales","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-20T13:53:59.715Z","originalFileLocation":"api-reference-v1/tracking-api/sales.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter\u0026#x27;s commission (legacy v1 API).\">\u003cmeta data-mint-head name=\"application-name\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tracking sales and commissions - FirstPromoter Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter\u0026#x27;s commission (legacy v1 API).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://firstpromoter.mintlify.site/_mintlify/api/og/v2?division=Tracking\u0026amp;title=Tracking+sales+and+commissions\u0026amp;description=Record+each+non-zero+sale+for+a+referred+customer+so+FirstPromoter+calculates+the+promoter%27s+commission+%28legacy+v1+API%29.\u0026amp;theme=fff9650e72028c28308bb6bc\u0026amp;signature=6868c9649d289fe585770724e281b14693fa5226cc336f496828963e0e3313ac\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Tracking sales and commissions - FirstPromoter Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter\u0026#x27;s commission (legacy v1 API).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firstpromoter.mintlify.site/_mintlify/api/og/v2?division=Tracking\u0026amp;title=Tracking+sales+and+commissions\u0026amp;description=Record+each+non-zero+sale+for+a+referred+customer+so+FirstPromoter+calculates+the+promoter%27s+commission+%28legacy+v1+API%29.\u0026amp;theme=fff9650e72028c28308bb6bc\u0026amp;signature=6868c9649d289fe585770724e281b14693fa5226cc336f496828963e0e3313ac\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/firstpromoter/NHAuOTz7uXRLkEOr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FirstPromoter Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2497F3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference-v1/tracking-api/sales.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.firstpromoter.com/#organization\",\"name\":\"FirstPromoter Docs\",\"url\":\"https://docs.firstpromoter.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/firstpromoter/Qml53iAwCwPGiKRZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Qml53iAwCwPGiKRZ\u0026q=85\u0026s=17d35344b27497f795682da8932295c9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.firstpromoter.com#website\",\"name\":\"FirstPromoter Docs\",\"url\":\"https://docs.firstpromoter.com\",\"publisher\":{\"@id\":\"https://docs.firstpromoter.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales#webpage\",\"url\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales\",\"name\":\"Tracking sales and commissions\",\"description\":\"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter's commission (legacy v1 API).\",\"dateModified\":\"2026-11-20T13:53:59.715Z\",\"isPartOf\":{\"@id\":\"https://docs.firstpromoter.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tracking\",\"item\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/leads-and-signups\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tracking sales and commissions\",\"item\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales#apireference\",\"headline\":\"Tracking sales and commissions\",\"name\":\"Tracking sales and commissions\",\"description\":\"Record each non-zero sale for a referred customer so FirstPromoter calculates the promoter's commission (legacy v1 API).\",\"url\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales\",\"mainEntityOfPage\":{\"@id\":\"https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales#webpage\"},\"dateModified\":\"2026-11-20T13:53:59.715Z\",\"publisher\":{\"@id\":\"https://docs.firstpromoter.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.firstpromoter.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FirstPromoter Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"FirstPromoter Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference-v1/tracking-api/sales.md","siteName":"FirstPromoter Docs","nav":{"global":null,"versions":[{"version":"v2","pages":[{"title":"v2","href":"/introduction"}]},{"version":"v1","anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","boost":0.5,"pages":[{"title":"Introduction","href":"/api-reference-v1/introduction"},{"title":"Authentication","href":"/api-reference-v1/authentication"}]},{"group":"Tracking","boost":0.5,"pages":[{"title":"Tracking leads and sign-ups","openapi":"openapi-tracking POST /signup","href":"/api-reference-v1/tracking-api/leads-and-signups"},{"title":"Tracking subscribers","description":"Attribute a newsletter or free-plan subscriber to a promoter before they sign up for a paid plan (legacy v1 API).","openapi":"openapi-tracking POST /subscriber","href":"/api-reference-v1/tracking-api/subscriber"},{"title":"Tracking sales and commissions","openapi":"openapi-tracking POST /sale","href":"/api-reference-v1/tracking-api/sales"},{"title":"Tracking refunds and negative commissions","description":"Record a refund for a referred customer so FirstPromoter generates the matching negative commission (legacy v1 API).","openapi":"openapi-tracking POST /refund","href":"/api-reference-v1/tracking-api/refund"},{"title":"Tracking cancellations","openapi":"openapi-tracking POST /cancellation","href":"/api-reference-v1/tracking-api/cancellation"}]},{"group":"Leads","boost":0.5,"pages":[{"title":"Modify existing lead/customer","openapi":"openapi-leads PUT /update","href":"/api-reference-v1/leads-api/update"},{"title":"List leads/customers","openapi":"openapi-leads GET /list","href":"/api-reference-v1/leads-api/list"},{"title":"Show leads and customers details","openapi":"openapi-leads GET /show","href":"/api-reference-v1/leads-api/show"},{"title":"Delete lead/customer","openapi":"openapi-leads DELETE /delete","href":"/api-reference-v1/leads-api/delete"}]},{"group":"Promoters","boost":0.5,"pages":[{"title":"Create a new promoter","openapi":"openapi-promoters POST /create","href":"/api-reference-v1/promoters-api/create"},{"title":"Modify existing promoter","openapi":"openapi-promoters PUT /update","href":"/api-reference-v1/promoters-api/update"},{"title":"List promoters","openapi":"openapi-promoters GET /list","href":"/api-reference-v1/promoters-api/list"},{"title":"Show promoter details and balance","openapi":"openapi-promoters GET /show","href":"/api-reference-v1/promoters-api/show-details"},{"title":"Move/switch a promoter from one campaign to another","openapi":"openapi-promoters POST /move_to_campaign","href":"/api-reference-v1/promoters-api/move-to-campaign"},{"title":"Add a promoter to a campaign","openapi":"openapi-promoters POST /add_to_campaign","href":"/api-reference-v1/promoters-api/add-to-campaign"},{"title":"Reset promoter's authentication token","openapi":"openapi-promoters PUT /refresh_token","href":"/api-reference-v1/promoters-api/refresh-token"},{"title":"Delete a promoter","openapi":"openapi-promoters DELETE /delete","href":"/api-reference-v1/promoters-api/delete"}]},{"group":"Rewards","boost":0.5,"pages":[{"title":"Create new reward","openapi":"openapi-rewards POST /create","href":"/api-reference-v1/rewards-api/create"},{"title":"List rewards and commissions","openapi":"openapi-rewards GET /list","href":"/api-reference-v1/rewards-api/list"},{"title":"Update a reward or commission","openapi":"openapi-rewards PUT /update","href":"/api-reference-v1/rewards-api/update"}]},{"group":"Payouts","boost":0.5,"pages":[{"title":"List payouts","openapi":"openapi-payouts GET /list","href":"/api-reference-v1/payouts-api/list"},{"title":"Create a new payout","openapi":"openapi-payouts POST /create","href":"/api-reference-v1/payouts-api/create"},{"title":"Change payouts status","openapi":"openapi-payouts PUT /update","href":"/api-reference-v1/payouts-api/update"}]},{"group":"Reports","boost":0.5,"pages":[{"title":"Overview reports","openapi":"openapi-reports GET /overview","href":"/api-reference-v1/reports-api/overview"},{"title":"Campaign reports","openapi":"openapi-reports GET /campaigns","href":"/api-reference-v1/reports-api/campaign"},{"title":"Promoter reports","openapi":"openapi-reports GET /promoters","href":"/api-reference-v1/reports-api/promoter"}]}]}]},{"anchor":"API Reference","icon":"webhook","href":"https://docs.firstpromoter.com/api-reference-v1/introduction"},{"anchor":"Help Center","icon":"square-question","href":"https://help.firstpromoter.com/en/"}]}]},"basePath":"","title":"Tracking sales and commissions - FirstPromoter Docs","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CyAr6xD1.js","snippetPresets-BSqedH3o.js","utils-DXfQSZU_.js","style-to-object-BY3JEAdk.js","utils-DiMyLQC-.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DvPCxzT8.js","conditional-requirements-CFM0id0Q.js","cloneDeep-dx7iM-7h.js","_Uint8Array-DpQIK2Aw.js","isObject-FP1Yky1u.js","ApiExamples-B2sy5qvP.js","usePlaygroundInputsStore-BDc5FJKB.js","shallow-DxZq5uhD.js","isEqual-Bl_IuwU4.js","CodeSnippets-D1UoeS-I.js","CodeSnippet-C87it1Zg.js","use-playground-group-access-DyECiQ2v.js","Page-wigwbDGe.js","api-description-markdown-DHZIfeWZ.js","DynamicMarkdown-D8KwOkxZ.js","SectionHeading-uish4Ed2.js","MethodPill-DR7O5MCP.js","getPastedJson-D2WQib0m.js","Check2Icon-CUuzblYS.js","axios-CsQoIw0U.js","Markdown-K6_WYP3x.js","AssistantPageLink-BrppVW5v.js","dist-OmDnwAnM.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}