{
"message": "Referral corresponding to email or uid parameter not found or promoter is banned.",
"code": "not_found"
}
{
"message": "The 'sale' event with the id 'test_sale_12340987' 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, then it means that the sale is not a referral sale, you’ll get a 404 response. Also, if the promoter is banned, you’ll get a 404 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
Authorization
string
header
required
API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys
Headers
Account-ID
string
required
Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations
Body
application/json
Option 1
Option 2
email
string
required
Email of the lead/sign-up. Required if uid is not provided.
event_id
string
required
Transaction or sale event ID. Required to avoid duplicate sales.
amount
integer
required
The sale amount in cents. For zero-decimal currencies like JPY, amount should be whole values.
uid
string
uid of the lead added on signup tracking. Required if email is not provided.
quantity
integer
Number of subscriptions/items. Optional if quantity is 1.
plan
string
Customer plan ID from billing provider. Used for plan-level rewards.
currency
string
Required only if different from FirstPromoter settings default currency.
mrr
string
Monthly Recurring Revenue generated by the customer.
promo_code
string
For promo code tracking.
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.
Example:
"US"
tid
string
Visitor tracking ID from _fprom_tid cookie.
ref_id
string
Referral ID of the promoter.
skip_email_notification
boolean
Set true to skip email notifications. Default is false.
Response
Sale tracked successfully
id
integer
Example:
45831949
etype
string
Example:
"sale"
sale_amount
integer
Example:
2000
original_sale_amount
integer
Example:
2000
original_sale_currency
string | null
Example:
null
event_id
string | null
Example:
null
plan_id
string | null
Example:
null
billing_period
string | null
Example:
null
created_at
string<date-time>
Example:
"2025-04-25T09:39:42.289Z"
referral
object
Show child attributes
commissions
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.4347","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":"control","enabled":true,"payload":{"type":"string","value":"control"},"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-v2/api-admin/tracking-api/sales","slug":"/api-reference-v2/api-admin/tracking-api/sales","pageMetadata":{"title":"Tracking sales and commissions","description":"Record each non-zero sale for a referred customer so FirstPromoter calculates commissions for the promoter.","openapi":"openapi-v2-tracking POST /sale","href":"/api-reference-v2/api-admin/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 commissions for the promoter.\"\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, then it means that the sale is not a referral sale, you’ll get a 404 response. Also, if the promoter is banned, you’ll get a 404 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 commissions for the promoter.","openapi":"openapi-v2-tracking POST /sale","href":"/api-reference-v2/api-admin/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 commissions for the promoter.","parameters":["26c3d4c3-f0ce-41ce-b98b-d892ad75228b"],"requestBody":"39505fc3-ebee-44ef-8056-db25be4a27e8","responses":{"200":"e519d193-23a3-438f-b33b-c3405d5ea55c","400":"02e31107-9569-47aa-b70b-1425e32ae9b8","404":"cc4def77-655f-42c1-a138-8b70b0e710ac","409":"77d97293-7ca4-4954-b881-96acca25ba19"},"method":"post","type":"path","servers":["27b22f66-6dd3-4979-a4da-c08d25b99526"],"security":["1485d0a3-93c6-4f07-89d6-fcd3e2644ad4"],"path":"/sale","baseUrlOptions":["https://api.firstpromoter.com/api/v2/track"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"26c3d4c3-f0ce-41ce-b98b-d892ad75228b":{"name":"Account-ID","in":"header","required":true,"description":"Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations","schema":{"type":"string","isRequired":true,"description":"Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["event_id","amount","email"],"properties":{"email":{"type":"string","description":"Email of the lead/sign-up. Required if uid is not provided.","isRequired":true,"uniqueKey":"oneOf.0.email","typeLabel":"string"},"event_id":{"type":"string","description":"Transaction or sale event ID. Required to avoid duplicate sales.","isRequired":true,"uniqueKey":"oneOf.0.event_id","typeLabel":"string"},"amount":{"type":"integer","description":"The sale amount in cents. For zero-decimal currencies like JPY, amount should be whole values.","isRequired":true,"uniqueKey":"oneOf.0.amount","typeLabel":"integer"},"uid":{"type":"string","description":"uid of the lead added on signup tracking. Required if email is not provided.","uniqueKey":"oneOf.0.uid","typeLabel":"string"},"quantity":{"type":"integer","description":"Number of subscriptions/items. Optional if quantity is 1.","uniqueKey":"oneOf.0.quantity","typeLabel":"integer"},"plan":{"type":"string","description":"Customer plan ID from billing provider. Used for plan-level rewards.","uniqueKey":"oneOf.0.plan","typeLabel":"string"},"currency":{"type":"string","description":"Required only if different from FirstPromoter settings default currency.","uniqueKey":"oneOf.0.currency","typeLabel":"string"},"mrr":{"type":"string","description":"Monthly Recurring Revenue generated by the customer.","uniqueKey":"oneOf.0.mrr","typeLabel":"string"},"promo_code":{"type":"string","description":"For promo code tracking.","uniqueKey":"oneOf.0.promo_code","typeLabel":"string"},"billing_country":{"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.","example":"US","uniqueKey":"oneOf.0.billing_country","typeLabel":"string"},"tid":{"type":"string","description":"Visitor tracking ID from _fprom_tid cookie.","uniqueKey":"oneOf.0.tid","typeLabel":"string"},"ref_id":{"type":"string","description":"Referral ID of the promoter.","uniqueKey":"oneOf.0.ref_id","typeLabel":"string"},"skip_email_notification":{"type":"boolean","description":"Set true to skip email notifications. Default is false.","uniqueKey":"oneOf.0.skip_email_notification","typeLabel":"boolean"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["event_id","amount","uid"],"properties":{"uid":{"type":"string","description":"uid of the lead added on signup tracking. Required if email is not provided.","isRequired":true,"uniqueKey":"oneOf.1.uid","typeLabel":"string"},"event_id":{"type":"string","description":"Transaction or sale event ID. Required to avoid duplicate sales.","isRequired":true,"uniqueKey":"oneOf.1.event_id","typeLabel":"string"},"amount":{"type":"integer","description":"The sale amount in cents. For zero-decimal currencies like JPY, amount should be whole values.","isRequired":true,"uniqueKey":"oneOf.1.amount","typeLabel":"integer"},"email":{"type":"string","description":"Email of the lead/sign-up. Required if uid is not provided.","uniqueKey":"oneOf.1.email","typeLabel":"string"},"quantity":{"type":"integer","description":"Number of subscriptions/items. Optional if quantity is 1.","uniqueKey":"oneOf.1.quantity","typeLabel":"integer"},"plan":{"type":"string","description":"Customer plan ID from billing provider. Used for plan-level rewards.","uniqueKey":"oneOf.1.plan","typeLabel":"string"},"currency":{"type":"string","description":"Required only if different from FirstPromoter settings default currency.","uniqueKey":"oneOf.1.currency","typeLabel":"string"},"mrr":{"type":"string","description":"Monthly Recurring Revenue generated by the customer.","uniqueKey":"oneOf.1.mrr","typeLabel":"string"},"promo_code":{"type":"string","description":"For promo code tracking.","uniqueKey":"oneOf.1.promo_code","typeLabel":"string"},"billing_country":{"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.","example":"US","uniqueKey":"oneOf.1.billing_country","typeLabel":"string"},"tid":{"type":"string","description":"Visitor tracking ID from _fprom_tid cookie.","uniqueKey":"oneOf.1.tid","typeLabel":"string"},"ref_id":{"type":"string","description":"Referral ID of the promoter.","uniqueKey":"oneOf.1.ref_id","typeLabel":"string"},"skip_email_notification":{"type":"boolean","description":"Set true to skip email notifications. Default is false.","uniqueKey":"oneOf.1.skip_email_notification","typeLabel":"boolean"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"email":"\u003cstring>","event_id":"\u003cstring>","amount":123,"uid":"\u003cstring>","quantity":123,"plan":"\u003cstring>","currency":"\u003cstring>","mrr":"\u003cstring>","promo_code":"\u003cstring>","billing_country":"US","tid":"\u003cstring>","ref_id":"\u003cstring>","skip_email_notification":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"e519d193-23a3-438f-b33b-c3405d5ea55c":{"description":"Sale tracked successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","example":45831949,"uniqueKey":"id","typeLabel":"integer"},"etype":{"type":"string","example":"sale","uniqueKey":"etype","typeLabel":"string"},"sale_amount":{"type":"integer","example":2000,"uniqueKey":"sale_amount","typeLabel":"integer"},"original_sale_amount":{"type":"integer","example":2000,"uniqueKey":"original_sale_amount","typeLabel":"integer"},"original_sale_currency":{"oneOf":[{"type":"string","example":null,"uniqueKey":"original_sale_currency.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"original_sale_currency.oneOf.1","typeLabel":"null"}],"uniqueKey":"original_sale_currency","typeLabel":"string | null"},"event_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"event_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"event_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"event_id","typeLabel":"string | null"},"plan_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"plan_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"plan_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan_id","typeLabel":"string | null"},"billing_period":{"oneOf":[{"type":"string","example":null,"uniqueKey":"billing_period.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"billing_period.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing_period","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","example":"2025-04-25T09:39:42.289Z","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"referral":{"type":"object","properties":{"id":{"type":"integer","example":29203686,"uniqueKey":"referral.id","typeLabel":"integer"},"email":{"type":"string","example":"testme@test1.com","uniqueKey":"referral.email","typeLabel":"string"},"uid":{"oneOf":[{"type":"string","example":null,"uniqueKey":"referral.uid.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"referral.uid.oneOf.1","typeLabel":"null"}],"uniqueKey":"referral.uid","typeLabel":"string | null"}},"uniqueKey":"referral","typeLabel":"object"},"commissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":13533003,"uniqueKey":"commissions.items.[INDEX].id","typeLabel":"integer"},"status":{"type":"string","example":"approved","uniqueKey":"commissions.items.[INDEX].status","typeLabel":"string"},"metadata":{"type":"object","example":{},"uniqueKey":"commissions.items.[INDEX].metadata","typeLabel":"object"},"is_self_referral":{"type":"boolean","example":false,"uniqueKey":"commissions.items.[INDEX].is_self_referral","typeLabel":"boolean"},"commission_type":{"type":"string","example":"sale","uniqueKey":"commissions.items.[INDEX].commission_type","typeLabel":"string"},"created_by_user_email":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].created_by_user_email.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].created_by_user_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].created_by_user_email","typeLabel":"string | null"},"created_by_user_at":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].created_by_user_at.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].created_by_user_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].created_by_user_at","typeLabel":"string | null"},"sale_amount":{"type":"integer","example":2000,"uniqueKey":"commissions.items.[INDEX].sale_amount","typeLabel":"integer"},"original_sale_amount":{"type":"integer","example":2000,"uniqueKey":"commissions.items.[INDEX].original_sale_amount","typeLabel":"integer"},"original_sale_currency":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].original_sale_currency.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].original_sale_currency.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].original_sale_currency","typeLabel":"string | null"},"event_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].event_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].event_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].event_id","typeLabel":"string | null"},"plan_id":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].plan_id.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].plan_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].plan_id","typeLabel":"string | null"},"tier":{"type":"integer","example":1,"uniqueKey":"commissions.items.[INDEX].tier","typeLabel":"integer"},"internal_note":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].internal_note.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].internal_note.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].internal_note","typeLabel":"string | null"},"external_note":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].external_note.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].external_note.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].external_note","typeLabel":"string | null"},"unit":{"type":"string","example":"cash","uniqueKey":"commissions.items.[INDEX].unit","typeLabel":"string"},"fraud_check":{"type":"string","example":"no_suspicion","uniqueKey":"commissions.items.[INDEX].fraud_check","typeLabel":"string"},"amount":{"type":"integer","example":400,"uniqueKey":"commissions.items.[INDEX].amount","typeLabel":"integer"},"is_paid":{"type":"boolean","example":false,"uniqueKey":"commissions.items.[INDEX].is_paid","typeLabel":"boolean"},"is_split":{"type":"boolean","example":false,"uniqueKey":"commissions.items.[INDEX].is_split","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","example":"2025-04-25T09:39:42Z","uniqueKey":"commissions.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"status_updated_at":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].status_updated_at.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].status_updated_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].status_updated_at","typeLabel":"string | null"},"promoter_campaign":{"type":"object","properties":{"id":{"type":"integer","example":14850130,"uniqueKey":"commissions.items.[INDEX].promoter_campaign.id","typeLabel":"integer"},"campaign_id":{"type":"integer","example":28004,"uniqueKey":"commissions.items.[INDEX].promoter_campaign.campaign_id","typeLabel":"integer"},"promoter_id":{"type":"integer","example":8262622,"uniqueKey":"commissions.items.[INDEX].promoter_campaign.promoter_id","typeLabel":"integer"},"created_at":{"type":"string","format":"date-time","example":"2025-01-16T18:16:41Z","uniqueKey":"commissions.items.[INDEX].promoter_campaign.created_at","typeLabel":"string\u003cdate-time>"},"promoter":{"type":"object","properties":{"id":{"type":"integer","example":8262622,"uniqueKey":"commissions.items.[INDEX].promoter_campaign.promoter.id","typeLabel":"integer"},"email":{"type":"string","example":"test@promoter.com","uniqueKey":"commissions.items.[INDEX].promoter_campaign.promoter.email","typeLabel":"string"},"name":{"type":"string","example":"Test Promoter","uniqueKey":"commissions.items.[INDEX].promoter_campaign.promoter.name","typeLabel":"string"}},"uniqueKey":"commissions.items.[INDEX].promoter_campaign.promoter","typeLabel":"object"},"campaign":{"type":"object","properties":{"id":{"type":"integer","example":28004,"uniqueKey":"commissions.items.[INDEX].promoter_campaign.campaign.id","typeLabel":"integer"},"name":{"type":"string","example":"Quinn Ramirez","uniqueKey":"commissions.items.[INDEX].promoter_campaign.campaign.name","typeLabel":"string"},"color":{"type":"string","example":"#EC4899","uniqueKey":"commissions.items.[INDEX].promoter_campaign.campaign.color","typeLabel":"string"}},"uniqueKey":"commissions.items.[INDEX].promoter_campaign.campaign","typeLabel":"object"}},"uniqueKey":"commissions.items.[INDEX].promoter_campaign","typeLabel":"object"},"referral":{"type":"object","properties":{"id":{"type":"integer","example":29203686,"uniqueKey":"commissions.items.[INDEX].referral.id","typeLabel":"integer"},"email":{"type":"string","example":"testme@test1.com","uniqueKey":"commissions.items.[INDEX].referral.email","typeLabel":"string"},"uid":{"oneOf":[{"type":"string","example":null,"uniqueKey":"commissions.items.[INDEX].referral.uid.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"commissions.items.[INDEX].referral.uid.oneOf.1","typeLabel":"null"}],"uniqueKey":"commissions.items.[INDEX].referral.uid","typeLabel":"string | null"}},"uniqueKey":"commissions.items.[INDEX].referral","typeLabel":"object"},"reward":{"type":"object","properties":{"id":{"type":"integer","example":157427,"uniqueKey":"commissions.items.[INDEX].reward.id","typeLabel":"integer"},"name":{"type":"string","example":"20% recurring commission","uniqueKey":"commissions.items.[INDEX].reward.name","typeLabel":"string"}},"uniqueKey":"commissions.items.[INDEX].reward","typeLabel":"object"}},"uniqueKey":"commissions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"commissions","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":45831949,"etype":"sale","sale_amount":2000,"original_sale_amount":2000,"original_sale_currency":null,"event_id":null,"plan_id":null,"billing_period":null,"created_at":"2025-04-25T09:39:42.289Z","referral":{"id":29203686,"email":"testme@test1.com","uid":null},"commissions":[{"id":13533003,"status":"approved","metadata":{},"is_self_referral":false,"commission_type":"sale","created_by_user_email":null,"created_by_user_at":null,"sale_amount":2000,"original_sale_amount":2000,"original_sale_currency":null,"event_id":null,"plan_id":null,"tier":1,"internal_note":null,"external_note":null,"unit":"cash","fraud_check":"no_suspicion","amount":400,"is_paid":false,"is_split":false,"created_at":"2025-04-25T09:39:42Z","status_updated_at":null,"promoter_campaign":{"id":14850130,"campaign_id":28004,"promoter_id":8262622,"created_at":"2025-01-16T18:16:41Z","promoter":{"id":8262622,"email":"test@promoter.com","name":"Test Promoter"},"campaign":{"id":28004,"name":"Quinn Ramirez","color":"#EC4899"}},"referral":{"id":29203686,"email":"testme@test1.com","uid":null},"reward":{"id":157427,"name":"20% recurring commission"}}]}}},"exampleType":"generated"}},"exampleType":"generated"},"02e31107-9569-47aa-b70b-1425e32ae9b8":{"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"},"cc4def77-655f-42c1-a138-8b70b0e710ac":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Referral corresponding to email or uid parameter not found or promoter is banned.","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","example":"not_found","uniqueKey":"code","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Referral corresponding to email or uid parameter not found or promoter is banned.","code":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"77d97293-7ca4-4954-b881-96acca25ba19":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"The 'sale' event with the id 'test_sale_12340987' already exists.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The 'sale' event with the id 'test_sale_12340987' already exists."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1485d0a3-93c6-4f07-89d6-fcd3e2644ad4":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"27b22f66-6dd3-4979-a4da-c08d25b99526":{"url":"https://api.firstpromoter.com/api/v2/track"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference-v2/api-admin/tracking-api/openapi-v2-tracking.json"},"subdomain":"firstpromoter","siteName":"FirstPromoter Docs","title":"Tracking sales and commissions - FirstPromoter Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v2":{"href":"/api-reference-v2/api-admin/tracking-api/sales","matchLevel":0},"v1":{"href":"/introduction","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-11-20T13:53:59.715Z","originalFileLocation":"api-reference-v2/api-admin/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 commissions for the promoter.\">\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 commissions for the promoter.\">\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-v2/api-admin/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+Api\u0026amp;title=Tracking+sales+and+commissions\u0026amp;description=Record+each+non-zero+sale+for+a+referred+customer+so+FirstPromoter+calculates+commissions+for+the+promoter.\u0026amp;theme=fff9650e72028c28308bb6bc\u0026amp;signature=e56fbae64d8cbcade9d29b7e7a8e9a014554e7d29c8399a5cb195aaf861e3298\">\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 commissions for the promoter.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firstpromoter.mintlify.site/_mintlify/api/og/v2?division=Tracking+Api\u0026amp;title=Tracking+sales+and+commissions\u0026amp;description=Record+each+non-zero+sale+for+a+referred+customer+so+FirstPromoter+calculates+commissions+for+the+promoter.\u0026amp;theme=fff9650e72028c28308bb6bc\u0026amp;signature=e56fbae64d8cbcade9d29b7e7a8e9a014554e7d29c8399a5cb195aaf861e3298\">\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-v2/api-admin/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-v2/api-admin/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-v2/api-admin/tracking-api/sales#webpage\",\"url\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales\",\"name\":\"Tracking sales and commissions\",\"description\":\"Record each non-zero sale for a referred customer so FirstPromoter calculates commissions for the promoter.\",\"dateModified\":\"2026-11-20T13:53:59.715Z\",\"isPartOf\":{\"@id\":\"https://docs.firstpromoter.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tracking Api\",\"item\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/leads-and-signups\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tracking sales and commissions\",\"item\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/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 commissions for the promoter.\",\"url\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales\",\"mainEntityOfPage\":{\"@id\":\"https://docs.firstpromoter.com/api-reference-v2/api-admin/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-v2/api-admin/tracking-api/sales.md","siteName":"FirstPromoter Docs","nav":{"global":null,"versions":[{"version":"v2","anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"FirstPromoter API v2 Introduction","sidebarTitle":"Introduction","href":"/api-reference-v2/api-admin/introduction"},{"title":"FirstPromoter API v2 Authentication","sidebarTitle":"Authentication","href":"/api-reference-v2/api-admin/authentication"}]},{"group":"Batch Processes","pages":[{"openapi":"openapi-v2-batches get /batch_processes","title":"List in progress batch processes.","href":"/api-reference-v2/api-admin/batches/list-inprogress-batch-processes"},{"openapi":"openapi-v2-batches get /batch_processes/{id}","title":"Show batch process","href":"/api-reference-v2/api-admin/batches/show-batch-process"},{"openapi":"openapi-v2-batches get /batch_processes/progress","title":"Show progress","href":"/api-reference-v2/api-admin/batches/show-progress"}]},{"group":"Tracking Api","pages":[{"title":"Tracking leads and sign-ups","description":"Track a lead or signup from your backend and attribute it to a promoter using the visitor's tid or ref_id.","openapi":"openapi-v2-tracking POST /signup","href":"/api-reference-v2/api-admin/tracking-api/leads-and-signups"},{"title":"Tracking sales and commissions","openapi":"openapi-v2-tracking POST /sale","href":"/api-reference-v2/api-admin/tracking-api/sales"},{"title":"Tracking refunds and negative commissions","description":"Record a refund for a referred customer so FirstPromoter generates the matching negative commission.","openapi":"openapi-v2-tracking POST /refund","href":"/api-reference-v2/api-admin/tracking-api/refund"},{"title":"Tracking cancellations","openapi":"openapi-v2-tracking POST /cancellation","href":"/api-reference-v2/api-admin/tracking-api/cancellation"}]},{"group":"Referrals","pages":[{"openapi":"openapi-v2-referrals get /referrals","title":"Get available referrals","href":"/api-reference-v2/api-admin/referrals/get-referrals"},{"openapi":"openapi-v2-referrals get /referrals/{id}","title":"Get referral","href":"/api-reference-v2/api-admin/referrals/get-referral"},{"openapi":"openapi-v2-referrals post /referrals","title":"Create referral","href":"/api-reference-v2/api-admin/referrals/create-referral"},{"openapi":"openapi-v2-referrals put /referrals/{id}","title":"Update referral","href":"/api-reference-v2/api-admin/referrals/update-referral"},{"openapi":"openapi-v2-referrals post /referrals/move_to_promoter","title":"Move referrals to promoter","href":"/api-reference-v2/api-admin/referrals/move-referrals-to-promoter"},{"openapi":"openapi-v2-referrals delete /referrals","title":"Delete referrals","href":"/api-reference-v2/api-admin/referrals/delete-referrals"}]},{"group":"Promoters","pages":[{"openapi":"openapi-v2-promoters get /promoters","title":"Get available promoters","href":"/api-reference-v2/api-admin/promoters/get-available-promoters"},{"openapi":"openapi-v2-promoters post /promoters","title":"Create promoter","href":"/api-reference-v2/api-admin/promoters/create-promoter"},{"openapi":"openapi-v2-promoters get /promoters/{id}","title":"Get promoter details","href":"/api-reference-v2/api-admin/promoters/get-promoter-details"},{"openapi":"openapi-v2-promoters put /promoters/{id}","title":"Update promoter","href":"/api-reference-v2/api-admin/promoters/update-promoter"},{"openapi":"openapi-v2-promoters get /promoters/{id}/referral_links","title":"Get promoter referral links","href":"/api-reference-v2/api-admin/promoters/get-promoter-referral-links"},{"openapi":"openapi-v2-promoters get /promoters/{id}/chart_data","title":"Get data used for chart","href":"/api-reference-v2/api-admin/promoters/get-data-used-for-chart"},{"openapi":"openapi-v2-promoters get /promoters/{id}/overview_report","title":"Get reports for promoter overview","href":"/api-reference-v2/api-admin/promoters/get-reports-for-promoter-overview"},{"openapi":"openapi-v2-promoters get /promoters/{id}/traffic_sources_report","title":"Get reports for promoter traffic sources","href":"/api-reference-v2/api-admin/promoters/get-reports-for-promoter-traffic-sources"},{"openapi":"openapi-v2-promoters get /promoters/{id}/urls_report","title":"Get reports for promoter URLs","href":"/api-reference-v2/api-admin/promoters/get-reports-for-promoter-urls"},{"openapi":"openapi-v2-promoters post /promoters/assign_parent","title":"Assign a parent promoter","href":"/api-reference-v2/api-admin/promoters/assign-parent-promoter"},{"openapi":"openapi-v2-promoters post /promoters/add_to_campaign","title":"Add promoters to campaign","href":"/api-reference-v2/api-admin/promoters/add-promoter-to-campaign"},{"openapi":"openapi-v2-promoters post /promoters/move_to_campaign","title":"Move promoters to campaign","href":"/api-reference-v2/api-admin/promoters/move-promoter-to-campaign"},{"openapi":"openapi-v2-promoters post /promoters/accept","title":"Accept promoters","href":"/api-reference-v2/api-admin/promoters/accept-promoters"},{"openapi":"openapi-v2-promoters post /promoters/reject","title":"Reject promoters","href":"/api-reference-v2/api-admin/promoters/reject-promoters"},{"openapi":"openapi-v2-promoters post /promoters/block","title":"Block promoters","href":"/api-reference-v2/api-admin/promoters/block-promoters"},{"openapi":"openapi-v2-promoters post /promoters/archive","title":"Archive promoters","href":"/api-reference-v2/api-admin/promoters/archive-promoters"},{"openapi":"openapi-v2-promoters post /promoters/restore","title":"Restore promoters","href":"/api-reference-v2/api-admin/promoters/restore-unarchived-promoters"}]},{"group":"Promoter Campaigns","pages":[{"openapi":"openapi-v2-promoter-campaigns get /promoter_campaigns","title":"Get available promoter campaigns","href":"/api-reference-v2/api-admin/promoter-campaigns/get-available-promoter-campaigns"},{"openapi":"openapi-v2-promoter-campaigns put /promoter_campaigns/{id}","title":"Update promoter campaign","href":"/api-reference-v2/api-admin/promoter-campaigns/update-promoter-campaign"}]},{"group":"Commissions","pages":[{"openapi":"openapi-v2-commissions get /commissions","title":"Get all commissions","href":"/api-reference-v2/api-admin/commissions/get-all-commissions"},{"openapi":"openapi-v2-commissions post /commissions","title":"Create a commission","href":"/api-reference-v2/api-admin/commissions/create-a-commission"},{"openapi":"openapi-v2-commissions put /commissions/{id}","title":"Update a commission","href":"/api-reference-v2/api-admin/commissions/update-a-commission"},{"openapi":"openapi-v2-commissions post /commissions/approve","title":"Approve commissions","href":"/api-reference-v2/api-admin/commissions/approve-commissions"},{"openapi":"openapi-v2-commissions post /commissions/deny","title":"Deny commissions","href":"/api-reference-v2/api-admin/commissions/deny-commissions"},{"openapi":"openapi-v2-commissions post /commissions/mark_fulfilled","title":"Mark nonmonetary commissions as fulfilled","href":"/api-reference-v2/api-admin/commissions/mark-nonmonetary-commissions-as-fulfilled"},{"openapi":"openapi-v2-commissions post /commissions/mark_unfulfilled","title":"Mark nonmonetary commissions as unfulfilled","href":"/api-reference-v2/api-admin/commissions/mark-nonmonetary-commissions-as-unfulfilled"}]},{"group":"Promo Codes","pages":[{"openapi":"openapi-v2-promocodes get /promo_codes","title":"Get promo codes","href":"/api-reference-v2/api-admin/promo-codes/get-promo-codes"},{"openapi":"openapi-v2-promocodes get /promo_codes/{id}","title":"Get promo code by id","href":"/api-reference-v2/api-admin/promo-codes/get-promo-code-by-id"},{"openapi":"openapi-v2-promocodes post /promo_codes","title":"Create promo code (Stripe Only)","href":"/api-reference-v2/api-admin/promo-codes/create-promo-code"},{"openapi":"openapi-v2-promocodes put /promo_codes/{id}","title":"Update promo code by id","href":"/api-reference-v2/api-admin/promo-codes/update-promo-code-by-id"},{"openapi":"openapi-v2-promocodes delete /promo_codes/{id}","title":"Archive promo code by id","href":"/api-reference-v2/api-admin/promo-codes/archive-promo-code-by-id"}]},{"group":"Payouts","pages":[{"openapi":"openapi-v2-payouts get /payouts","title":"Get all payouts","href":"/api-reference-v2/api-admin/payouts/get-all-payouts"},{"openapi":"openapi-v2-payouts get /payouts/stats","title":"Get payout stats","href":"/api-reference-v2/api-admin/payouts/get-payout-stats"},{"openapi":"openapi-v2-payouts get /payouts/due_stats","title":"Get due payout stats","href":"/api-reference-v2/api-admin/payouts/get-due-payout-stats"},{"openapi":"openapi-v2-payouts get /payouts/group_by_promoters","title":"Get all payouts grouped by promoters","href":"/api-reference-v2/api-admin/payouts/get-all-payouts-grouped-by-promoters"}]},{"group":"Reports","pages":[{"openapi":"openapi-v2-reports get /reports/campaigns","title":"Get reports for campaigns","href":"/api-reference-v2/api-admin/reports/get-reports-for-campaigns"},{"openapi":"openapi-v2-reports get /reports/overview","title":"Get reports for overview","href":"/api-reference-v2/api-admin/reports/get-reports-for-overview"},{"openapi":"openapi-v2-reports get /reports/promoters","title":"Get reports for promoters","href":"/api-reference-v2/api-admin/reports/get-reports-for-promoters"},{"openapi":"openapi-v2-reports get /reports/urls","title":"Get reports for URLs","href":"/api-reference-v2/api-admin/reports/get-reports-for-urls"},{"openapi":"openapi-v2-reports get /reports/traffic_sources","title":"Get reports for traffic sources","href":"/api-reference-v2/api-admin/reports/get-reports-for-traffic-sources"}]}]},{"tab":"Affiliate API Reference","pages":[{"title":"Affiliate API Reference","href":"/api-reference-v2/api-affiliate/introduction"}]},{"tab":"Advanced API Reference","hidden":true,"pages":[{"title":"Advanced API Reference","href":"/api-reference-v2/api-advanced/introduction"}]}]},{"anchor":"API Reference","icon":"webhook","href":"https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction"},{"anchor":"Help Center","icon":"square-question","href":"https://help.firstpromoter.com/en/"}]},{"version":"v1","pages":[{"title":"v1","href":"/introduction"}]}]},"basePath":"","title":"Tracking sales and commissions - FirstPromoter Docs","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BMn8tSe3.js","snippetPresets-Dl5ZrD9W.js","utils-CddEzDcs.js","style-to-object-BY3JEAdk.js","utils-Dym31Pnf.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-ZiqR8hPK.js","conditional-requirements-CFM0id0Q.js","cloneDeep-D3fPbylz.js","_Uint8Array-BcNtDki0.js","isObject-FP1Yky1u.js","ApiExamples-4Sf3CFhl.js","usePlaygroundInputsStore-Ck91l6q0.js","shallow-DapBSR9G.js","isEqual-Clu_sGzx.js","CodeSnippets-DAVHdSX2.js","CodeSnippet-Be6AcO_D.js","use-playground-group-access-CteWws2O.js","Page-_aL_PM_2.js","api-description-markdown-BPoPkVJQ.js","DynamicMarkdown-QJ7LkRm3.js","SectionHeading-DyxPTJti.js","MethodPill-CGjK-dNY.js","getPastedJson-C4YIGTOJ.js","Check2Icon-B7COpIZE.js","axios-CsQoIw0U.js","Markdown-Bquzb4Gw.js","AssistantPageLink-wSgGy_i5.js","dist-Bg48sGSz.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}