Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform’s UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).
POST
/
v1
/
loyalty
/
accounts:link
Error
A valid request URL is required to generate request examples
Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"DeliveryVip Developers","description":"Documentação das APIs da DeliveryVip: Merchant API, Open Delivery, Fidelidade e Partner API, com guias, tutoriais e referência.","colors":{"primary":"#EC681B","light":"#F4A476","dark":"#EC681B"},"logo":{"light":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/light.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=b5cd347a6fb8b88418ecffa2cecba5ca","dark":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/dark.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=c4d4b4b52656b650a0faa7dcc736c1a4"},"favicon":"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/favicon.png?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=f7fca2ed2e2a42c04178d079778d86f7","appearance":{"default":"system","strict":true},"navbar":{"primary":{"type":"button","label":"Painel do developer","href":"https://developer.deliveryvip.com.br"}},"footer":{"socials":{"website":"https://deliveryvip.com.br","github":"https://github.com/DeliveryVip","discord":"https://discord.gg/AJF8Yha4"},"links":[{"header":"Plataforma","items":[{"label":"Painel do lojista","href":"https://app.deliveryvip.com.br"},{"label":"Painel do developer","href":"https://developer.deliveryvip.com.br"},{"label":"Status","href":"https://status.deliveryvip.com.br"},{"label":"Central de ajuda","href":"https://ajuda.deliveryvip.com.br"}]},{"header":"Desenvolvedores","items":[{"label":"Jornada do Developer","href":"/docs/inicio/primeiros-passos/jornada-do-developer"},{"label":"Postman","href":"/docs/inicio/conceitos/postman"},{"label":"Use com IA","href":"/docs/inicio/conceitos/usando-com-ia"},{"label":"Cofrinho (exemplo de fidelidade)","href":"https://github.com/DeliveryVip/cofrinho"},{"label":"Changelog","href":"/docs/changelog"}]},{"header":"Suporte","items":[{"label":"Discord","href":"https://discord.gg/AJF8Yha4"},{"label":"Agendar uma reunião","href":"https://calendar.app.google/EchaXk57y7xp8Hyx6"}]}]},"search":{"prompt":"Pesquisar na documentação..."},"seo":{"metatags":{"og:site_name":"DeliveryVip Developers","og:locale":"pt_BR","twitter:card":"summary_large_image"}},"fonts":{"family":"Geist"},"errors":{"404":{"redirect":false,"title":"Página não encontrada","description":"Volte para a [página inicial](/) ou use a busca."}},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode","mcp"],"display":"header"},"markdown":{"instructions":"Documentação das APIs da DeliveryVip, em português. Regras que mais quebram integrações: (1) Merchant API: faça polling em GET /merchant/v3/events:polling no máximo a cada 30 s por token; confirme todo evento recebido com POST /merchant/v3/events/acknowledgment e corpo [{\"id\": \"\u003ceventId>\"}] (o campo lido é id, não eventId), inclusive eventos repetidos ou que o sistema não trata; deduplique por eventId; o evento é só um aviso, busque o pedido na orderURL. (2) Tokens client_credentials valem 24 h e não têm refresh_token: peça outro ao receber 401. (3) Webhooks: valide a assinatura HMAC sobre o corpo bruto e responda 2xx rápido; o polling é a reconciliação. (4) Open Delivery: host od.deliveryvip.com.br, um client_secret por loja, datas em UTC. (5) Fidelidade: o operador implementa 5 rotas assinadas com HMAC e chama o config push; o estorno precisa ser idempotente. (6) Partner API: scope dv.partner. Não invente endpoints: use a referência gerada das specs OpenAPI."},"styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","href":""}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deliveryvip-a4256422","hasAudioNarration":false,"actualSubdomain":"deliveryvip-a4256422","customDomains":[],"gitSource":{"type":"github","owner":"deliveryvip","repo":"developerdocs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6ae4c831d9cc4cd9a0a2acf8"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae4cc91981729a4c39866ff","collectionId":"b87548ca-f6e4-4b97-b2a3-975659825db2","liveDeploymentHistoryId":"6ae4cc91981729a4c39866ff","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4cc91981729a4c39866ff","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"pt-BR","tag":"Referência","count":120},{"language":"pt-BR","tag":"Merchant API","count":88},{"language":"pt-BR","tag":"Partner API","count":87},{"language":"pt-BR","tag":"Indoor","count":35},{"language":"pt-BR","tag":"Lojas","count":34},{"language":"pt-BR","tag":"Revendas","count":29},{"language":"pt-BR","tag":"Open Delivery","count":27},{"language":"pt-BR","tag":"Pedidos","count":25},{"language":"pt-BR","tag":"Endpoints","count":25},{"language":"pt-BR","tag":"Início","count":20}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"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":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#localization-select-trigger,[data-component-part=localization-select-trigger]{display:none!important}"}],"page":{"pagePath":"api-reference/accounts/locate-or-enroll-the-customer-opt-in","slug":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in","pageMetadata":{"title":"Locate-or-enroll the customer (opt-in)","description":"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/accounts:link","href":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in","autogeneratedByOpenApi":true},"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: \"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform’s UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\"\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{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Locate-or-enroll the customer (opt-in)","description":"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/accounts:link","href":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Accounts"],"summary":"Locate-or-enroll the customer (opt-in)","description":"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).","requestBody":"7fa05bbb-0786-4a18-9cce-4e423d64872c","responses":{"200":"ed0a1c1f-c02f-4dcf-a9f8-cfc7664a5e67","403":"a502cbd6-1195-48e4-824a-38aa42b05cc3","404":"b9de88a6-1e9b-4ac8-a871-129d48870cd9"},"method":"post","type":"path","servers":["cfe626c9-bcd3-4ea8-b786-bcfa1588ed7d"],"security":["bece94ee-6d31-4b66-ad14-0f0948d5fa85"],"path":"/v1/loyalty/accounts:link","baseUrlOptions":["{api_base_url}"],"title":"Locate-or-enroll the customer (opt-in)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["programId","customer","consent","enroll"],"properties":{"programId":{"type":"string","description":"The operator-side program identifier (as pushed in the merchant configuration).","isRequired":true,"uniqueKey":"programId","typeLabel":"string"},"customer":{"type":"object","required":["document","phone","email","name","birthDate"],"properties":{"document":{"type":"string","description":"CPF, digits only.","isRequired":true,"uniqueKey":"customer.document","typeLabel":"string"},"phone":{"type":"string","description":"E.164 (e.g. +5511999998888).","isRequired":true,"uniqueKey":"customer.phone","typeLabel":"string"},"email":{"type":"string","format":"email","isRequired":true,"uniqueKey":"customer.email","typeLabel":"string\u003cemail>"},"name":{"type":"string","isRequired":true,"uniqueKey":"customer.name","typeLabel":"string"},"birthDate":{"type":"string","format":"date","isRequired":true,"uniqueKey":"customer.birthDate","typeLabel":"string\u003cdate>"}},"isRequired":true,"uniqueKey":"customer","typeLabel":"object"},"consent":{"type":"object","required":["purpose","status","grantedAt"],"properties":{"purpose":{"type":"string","enum":["loyalty_program"],"isRequired":true,"uniqueKey":"consent.purpose","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["granted"],"isRequired":true,"uniqueKey":"consent.status","typeLabel":"enum\u003cstring>"},"grantedAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"consent.grantedAt","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"consent","typeLabel":"object"},"enroll":{"type":"boolean","description":"Whether the program accepts enrollment through checkout (mirrors the pushed capability).","isRequired":true,"uniqueKey":"enroll","typeLabel":"boolean"},"challenge":{"type":"object","description":"Present only on the re-send after a PIN challenge.","required":["type","answer"],"properties":{"type":{"type":"string","enum":["pin"],"isRequired":true,"uniqueKey":"challenge.type","typeLabel":"enum\u003cstring>"},"answer":{"type":"string","isRequired":true,"uniqueKey":"challenge.answer","typeLabel":"string"}},"uniqueKey":"challenge","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"programId":"\u003cstring>","customer":{"document":"\u003cstring>","phone":"\u003cstring>","email":"jsmith@example.com","name":"\u003cstring>","birthDate":"2023-12-25"},"consent":{"purpose":"loyalty_program","status":"granted","grantedAt":"2023-11-07T05:31:56Z"},"enroll":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"ed0a1c1f-c02f-4dcf-a9f8-cfc7664a5e67":{"description":"Account located/enrolled, or a challenge is required first.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"The account located or enrolled by accounts:link. The balance is not part of this answer — DeliveryVip reads it from the balance endpoint.","required":["id","programId","balanceType"],"properties":{"id":{"type":"string","description":"Opaque and STABLE — relinking the same customer must return the same id byte-for-byte.","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"},"programId":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.programId","typeLabel":"string"},"balanceType":{"type":"string","enum":["cashback"],"isRequired":true,"uniqueKey":"oneOf.0.balanceType","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["challenge"],"properties":{"challenge":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["pin"],"isRequired":true,"uniqueKey":"oneOf.1.challenge.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.1.challenge","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","programId":"\u003cstring>","balanceType":"cashback"}}},"exampleType":"generated"}},"exampleType":"generated"},"a502cbd6-1195-48e4-824a-38aa42b05cc3":{"description":"Challenge rejected (wrong PIN). The body must be generic: it must not reveal whether the account exists.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b9de88a6-1e9b-4ac8-a871-129d48870cd9":{"description":"Enrollment closed — the customer must sign up at the store first.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"bece94ee-6d31-4b66-ad14-0f0948d5fa85":{"appId":{"type":"apiKey","in":"header","name":"X-App-Id","description":"The uid of the operator's OAuth application on DeliveryVip.","scopes":[],"schemeName":"appId"},"appMerchantId":{"type":"apiKey","in":"header","name":"X-App-MerchantId","description":"The UUID of the merchant (company) the call concerns.","scopes":[],"schemeName":"appMerchantId"},"appSignature":{"type":"apiKey","in":"header","name":"X-App-Signature","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","scopes":[],"schemeName":"appSignature"}}},"servers":{"cfe626c9-bcd3-4ea8-b786-bcfa1588ed7d":{"url":"{api_base_url}","description":"The base URL the operator declares on the loyalty extension (https only; may include a path prefix).","variables":{"api_base_url":{"default":"https://operator.example.com/dv/v1"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-App-Id","description":"The uid of the operator's OAuth application on DeliveryVip.","scopes":[],"schemeName":"appId"},"schema":{"title":"X-App-Id","type":"string","description":"The uid of the operator's OAuth application on DeliveryVip.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appId","name":"X-App-Id"},{"scheme":{"type":"apiKey","in":"header","name":"X-App-MerchantId","description":"The UUID of the merchant (company) the call concerns.","scopes":[],"schemeName":"appMerchantId"},"schema":{"title":"X-App-MerchantId","type":"string","description":"The UUID of the merchant (company) the call concerns.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appMerchantId","name":"X-App-MerchantId"},{"scheme":{"type":"apiKey","in":"header","name":"X-App-Signature","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","scopes":[],"schemeName":"appSignature"},"schema":{"title":"X-App-Signature","type":"string","description":"Hex HMAC-SHA256 of the raw request body (empty string when there is no body), keyed with the app's OAuth secret. Verify against the exact bytes received.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appSignature","name":"X-App-Signature"}],"title":"appId \u0026 appMerchantId \u0026 appSignature"}]},"originalFileLocation":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml"},"subdomain":"deliveryvip-a4256422","siteName":"DeliveryVip Developers","title":"Locate-or-enroll the customer (opt-in) - DeliveryVip Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in","matchLevel":0}}},"lastModified":"2026-10-30T16:41:32.825Z","originalFileLocation":"api-reference/accounts/locate-or-enroll-the-customer-opt-in.mdx","locale":"pt-BR"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"system\";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=\"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform\u0026#x27;s UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\">\u003cmeta data-mint-head name=\"application-name\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_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=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Locate-or-enroll the customer (opt-in) - DeliveryVip Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform\u0026#x27;s UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deliveryvip-a4256422.mintlify.app/_mintlify/api/og/v2?division=Rotas+do+operador\u0026amp;title=Locate-or-enroll+the+customer+%28opt-in%29\u0026amp;description=Sent+when+the+customer+opts+into+the+program+at+checkout.+The+click+IS+the+consent+%28consent.grantedAt+is+the+moment+of+the+click%3B+timestamps+carry+the+platform%27\u0026amp;theme=3b22322ae3bbae2651505377\u0026amp;signature=dc9b93a79b1dae1f125608a51019cda3c19c05b13db4da697d089e79b9324903\">\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=\"Locate-or-enroll the customer (opt-in) - DeliveryVip Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform\u0026#x27;s UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deliveryvip-a4256422.mintlify.app/_mintlify/api/og/v2?division=Rotas+do+operador\u0026amp;title=Locate-or-enroll+the+customer+%28opt-in%29\u0026amp;description=Sent+when+the+customer+opts+into+the+program+at+checkout.+The+click+IS+the+consent+%28consent.grantedAt+is+the+moment+of+the+click%3B+timestamps+carry+the+platform%27\u0026amp;theme=3b22322ae3bbae2651505377\u0026amp;signature=dc9b93a79b1dae1f125608a51019cda3c19c05b13db4da697d089e79b9324903\">\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=\"/docs/mintlify-assets/_mintlify/favicons/deliveryvip-a4256422/lIzAoDMYv08osHDW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DeliveryVip Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EC681B\">\u003cmeta data-mint-head name=\"og:locale\" content=\"pt_BR\">\u003clink data-mint-head rel=\"canonical\" href=\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\",\"name\":\"DeliveryVip Developers\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deliveryvip-a4256422/ELxpcniK2_BP8zxT/logo/light.svg?fit=max\u0026auto=format\u0026n=ELxpcniK2_BP8zxT\u0026q=85\u0026s=b5cd347a6fb8b88418ecffa2cecba5ca\"}},{\"@type\":\"WebSite\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\",\"name\":\"DeliveryVip Developers\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs\",\"publisher\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in#webpage\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in\",\"name\":\"Locate-or-enroll the customer (opt-in)\",\"description\":\"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\",\"dateModified\":\"2026-10-30T16:41:32.825Z\",\"isPartOf\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Referência\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/guides/merchant/loyalty/referencia-rapida\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rotas do operador\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/handshake/signed-reachability-check\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Locate-or-enroll the customer (opt-in)\",\"item\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in#apireference\",\"headline\":\"Locate-or-enroll the customer (opt-in)\",\"name\":\"Locate-or-enroll the customer (opt-in)\",\"description\":\"Sent when the customer opts into the program at checkout. The click IS the consent (consent.grantedAt is the moment of the click; timestamps carry the platform's UTC offset). The customer profile is attested by DeliveryVip (non-guest, complete profile). The operator may answer with a PIN challenge instead of an account: DeliveryVip then re-sends the same body plus challenge.answer typed by the customer. The PIN is validated exclusively on the operator side (rate limiting included) and is never stored by DeliveryVip. Answering with both id and challenge in one response is forbidden (DeliveryVip treats challenge as authoritative and discards the id).\",\"url\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in\",\"mainEntityOfPage\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs/api-reference/accounts/locate-or-enroll-the-customer-opt-in#webpage\"},\"dateModified\":\"2026-10-30T16:41:32.825Z\",\"publisher\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://deliveryvip-a4256422.mintlify.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DeliveryVip Developers\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DeliveryVip Developers","nav":{"global":null,"languages":[{"language":"pt-BR","tabs":[{"tab":"Início","icon":"house","pages":[{"title":"Início","href":""}]},{"tab":"Merchant API","icon":"store","pages":[{"title":"Merchant API","href":"/guides/merchant"}]},{"tab":"Open Delivery","icon":"right-left","pages":[{"title":"Open Delivery","href":"/guides/open-delivery"}]},{"tab":"Fidelidade","icon":"gift","groups":[{"group":"Visão geral","icon":"compass","pages":[{"title":"Fidelidade","sidebarTitle":"Introdução","icon":"gift","href":"/guides/merchant/loyalty"},{"title":"Primeiros passos","icon":"rocket","href":"/guides/merchant/loyalty/primeiros-passos"},{"title":"Monte um operador de fidelidade mínimo","sidebarTitle":"Operador mínimo","icon":"rocket","href":"/guides/merchant/loyalty/operador-minimo"}]},{"group":"Guias","icon":"map","pages":[{"title":"Ativando o programa","icon":"toggle-on","href":"/guides/merchant/loyalty/ativando-o-programa"},{"title":"Acúmulo","icon":"coins","href":"/guides/merchant/loyalty/acumulo"}]},{"group":"Contrato do operador","icon":"file-contract","pages":[{"title":"Contrato do operador","sidebarTitle":"Visão geral do contrato","icon":"file-signature","href":"/guides/merchant/loyalty/contrato-do-operador/index"},{"title":"Vínculo e PIN","icon":"link","href":"/guides/merchant/loyalty/contrato-do-operador/vinculo-e-pin"},{"title":"Resgate e estorno","icon":"money-bill-transfer","href":"/guides/merchant/loyalty/contrato-do-operador/resgate-e-estorno"}]},{"group":"Referência","icon":"code","pages":[{"title":"Referência rápida","icon":"list","href":"/guides/merchant/loyalty/referencia-rapida"},{"group":"Configuração do programa","icon":"sliders","pages":[{"title":"Fidelidade","icon":"gift","href":"/reference/merchant/v3/loyalty"},{"group":"Push da configuração","pages":[{"title":"Enviar configuração de fidelidade","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/merchant.yaml put /merchant/v3/{merchantId}/loyalty/config","href":"/api-reference/loyalty/enviar-configuração-de-fidelidade"}]},{"group":"Remoção da configuração","pages":[{"title":"Remover configuração de fidelidade","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/merchant.yaml delete /merchant/v3/{merchantId}/loyalty/config","href":"/api-reference/loyalty/remover-configuração-de-fidelidade"}]}]},{"group":"Rotas do operador","icon":"server","pages":[{"title":"Signed reachability check","description":"Called synchronously while the operator pushes a merchant configuration. Verify the signature (HMAC of an empty string) and answer 2xx. Any non-2xx, timeout or invalid signature makes DeliveryVip reject the configuration push with 422 — nothing is stored.","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/ping","href":"/api-reference/handshake/signed-reachability-check"},{"title":"Locate-or-enroll the customer (opt-in)","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/accounts:link","href":"/api-reference/accounts/locate-or-enroll-the-customer-opt-in"},{"title":"Account balance","description":"Balance read for the checkout surface. DeliveryVip caches the answer for 60 seconds per account. The request carries only the opaque account id — never the CPF. Unknown fields in the response are ignored (emitting extras such as expiresAt or metadata is safe). The optional redemptionLimits object pins per-customer boundaries that override the program's for this customer — it rides the same 60-second cache as the balance, so a change to a customer's rules takes up to a minute to reach checkout.","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml get /v1/loyalty/accounts/{accountId}","href":"/api-reference/accounts/account-balance"},{"title":"Synchronous balance debit","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/redemptions","href":"/api-reference/redemptions/synchronous-balance-debit"},{"title":"Explicit idempotent reversal","deprecated":null,"version":null,"openapi":"https://app.deliveryvip.com.br/swaggers/loyalty_operator.yaml post /v1/loyalty/redemptions/{redemptionId}/reversal","href":"/api-reference/redemptions/explicit-idempotent-reversal"}]}]}]},{"tab":"Partner API","icon":"handshake","pages":[{"title":"Partner API","href":"/guides/partner"}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]}]},"basePath":"","title":"Locate-or-enroll the customer (opt-in) - DeliveryVip Developers","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D_4Sesi0.js","utils-DRHeK26p.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C6d-DUc2.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dex7slho.js","snippetPresets-BcCEBp0Z.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CufowNTX.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-A4lJSCIe.js","shallow-DqoHP7zn.js","getApiPlaygroundDisplay-Cku8AmtL.js","CodeSnippet-CtHQbNqc.js","CodeSnippets-CGo5Cslf.js","Page-BoJxk0m8.js","getPastedJson-M-bKdue4.js","icon-DEqCU4st.js","MethodPill-DnfSSXiJ.js","DuplicateIcon-BHu2PE8M.js","createIcon-BPsE5X7c.js","DynamicMarkdown-Dnt6YhtR.js","SectionHeading-6CtFWqMQ.js","axios-vUo_bRtp.js","Markdown-BoKe_1fI.js","clsx-DM5-sUNJ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CkIdkovK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-B3e6Nh_r.js"]}