<form id="update-dob-form"> <div> <label>Date of Birth</label> <input type="date" name="dob" id="dob"> </div> <input type="submit" value="Update Date of Birth" /></form><script> document.addEventListener('DOMContentLoaded', function() { var form = document.getElementById('update-dob-form'); form.addEventListener('submit', function(event) { event.preventDefault(); var dob = document.getElementById('dob').value; if (dob) { MageSDK.updateCustomerDob(dob).then(function(success) { if (success) { alert("Updated the customer's birthday"); } }); } }); });</script>
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Mage Loyalty Documentation","colors":{"primary":"#404040","light":"#E0E0E0","dark":"#404040"},"logo":{"light":"https://mintcdn.com/mageloyalty/v6ewjqiSAmlnGkBR/logo/mage-logo-black-text.svg?fit=max\u0026auto=format\u0026n=v6ewjqiSAmlnGkBR\u0026q=85\u0026s=7b6b104db3297180cdcc1e8621264755","dark":"https://mintcdn.com/mageloyalty/v6ewjqiSAmlnGkBR/logo/mage-logo-white-text.svg?fit=max\u0026auto=format\u0026n=v6ewjqiSAmlnGkBR\u0026q=85\u0026s=c7dda0123cb071ab425baaaf234c89ba"},"favicon":"https://mintcdn.com/mageloyalty/JMUrS6LDxmoOnCAc/favicon.ico?fit=max\u0026auto=format\u0026n=JMUrS6LDxmoOnCAc\u0026q=85\u0026s=0c0acde515f256ecffd2271891d29997","api":{"mdx":{"auth":{"method":"key","name":"Authorization"},"server":"https://api.mageloyalty.com"}},"background":{"color":{"light":"#FFFFFF","dark":"#1E1E1E"}},"navbar":{"links":[{"href":"mailto:hello@mageloyalty.com","label":"Support"}],"primary":{"type":"button","label":"Mage Home","href":"https://mageloyalty.com"}},"footer":{"socials":{"x":"https://twitter.com/mageloyalty","github":"https://github.com/mageloyalty","linkedin":"https://www.linkedin.com/company/mageloyalty"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mageloyalty","hasAudioNarration":false,"actualSubdomain":"mageloyalty","customDomains":["developers.mageloyalty.com"],"gitSource":{"type":"github","owner":"graeme-mage","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"entitlements":{},"buildId":"6ad54a66cfe0d5be20f7fd0d","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":48},{"language":"default","tag":"JavaScript SDK","count":28},{"language":"default","tag":"API Resources","count":22},{"language":"default","tag":"Methods","count":21},{"language":"default","tag":"Customers","count":17},{"language":"default","tag":"Webhook Events","count":15},{"language":"default","tag":"Managing Subscriptions","count":8},{"language":"default","tag":"Rewards","count":7},{"language":"default","tag":"REST API","count":6},{"language":"default","tag":"Earning Rules","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--el-chrome-dark: #08090a;--el-border-dark: #ffffff12;--el-border-light: #0000000f;--el-green-bg: #00a33319;--el-green-fg: #00713fde;--el-blue-bg: #008ff519;--el-blue-fg: #006dcbf2;--el-orange-bg: #ff9c0029;--el-orange-fg: #cc4e00;--el-red-bg: #f3000d14;--el-red-fg: #c40006d3;--font-family-body-custom: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';--font-family-headings-custom: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';--font-family-mono-custom: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace}:root.dark{--el-green-bg: #22ff991e;--el-green-fg: #3dd68c;--el-blue-bg: #0077ff3a;--el-blue-fg: #70b8ff;--el-orange-bg: #fb6a0025;--el-orange-fg: #ffa057;--el-red-bg: #ff173f2d;--el-red-fg: #ff9592}html.dark #navbar-transition{background-color:var(--el-chrome-dark);border-color:var(--el-border-dark)}html:not(.dark) #navbar-transition{border-color:var(--el-border-light)}html.dark #sidebar{background-color:var(--el-chrome-dark);border-right:1px solid var(--el-border-dark)}html.dark #sidebar::before{content:'';position:absolute;top:0;right:0;bottom:0;width:100vw;background-color:var(--el-chrome-dark);z-index:-1;pointer-events:none}html:not(.dark) #sidebar{border-right:1px solid var(--el-border-light)}#sidebar [class*=\"from-background\"]{background-image:none}:is(.method-pill,.method-nav-pill>span)[class*=\"text-green-\"]{background-color:var(--el-green-bg);color:var(--el-green-fg)}:is(.method-pill,.method-nav-pill>span)[class*=\"text-blue-\"]{background-color:var(--el-blue-bg);color:var(--el-blue-fg)}:is(.method-pill,.method-nav-pill>span):is([class*=\"text-yellow-\"],[class*=\"text-orange-\"]){background-color:var(--el-orange-bg);color:var(--el-orange-fg)}:is(.method-pill,.method-nav-pill>span)[class*=\"text-red-\"]{background-color:var(--el-red-bg);color:var(--el-red-fg)}.tryit-button{background-color:#404040;color:#ffffff}html.dark .tryit-button{background-color:#e0e0e0;color:#1e1e1e}.tryit-button .icon{background-color:currentColor}"}],"page":{"pagePath":"js-sdk/customers/update-customer-dob","slug":"/js-sdk/customers/update-customer-dob","pageMetadata":{"title":"updateCustomerDob","description":"Update the date of birth for the logged-in customer.","href":"/js-sdk/customers/update-customer-dob"},"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: \"Update the date of birth for the logged-in customer.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Update the customer’s date of birth. Returns `,_jsx(_components.code,{children:`true`}),` on success, `,_jsx(_components.code,{children:`false`}),` on failure.`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MageSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateCustomerDob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'1990-05-15'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` alert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Birthday updated!'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{body:`dateOfBirth`,type:`string`,required:true,id:`param-date-of-birth`,children:_jsxs(_components.p,{children:[`The date of birth in `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns a `,_jsx(_components.code,{children:`boolean`}),`. `,_jsx(_components.code,{children:`true`}),` if the update was successful, `,_jsx(_components.code,{children:`false`}),` otherwise.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-birthday-form`,children:`Example: Birthday form`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`form`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"update-dob-form\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Date of Birth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"date\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dob\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dob\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submit\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Update Date of Birth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'DOMContentLoaded'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'update-dob-form'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'submit'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`preventDefault`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` dob`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'dob'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` MageSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateCustomerDob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` alert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Updated the customer's birthday\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})})]})}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":"updateCustomerDob","description":"Update the date of birth for the logged-in customer.","href":"/js-sdk/customers/update-customer-dob"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Example: Birthday form","slug":"example-birthday-form","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mageloyalty","siteName":"Mage Loyalty Documentation","title":"updateCustomerDob - Mage Loyalty Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-17T22:30:42.668Z","originalFileLocation":"js-sdk/customers/update-customer-dob.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=\"Update the date of birth for the logged-in customer.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mage Loyalty Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_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/mageloyalty/t04GmJXQ0KbEYnIy/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"updateCustomerDob - Mage Loyalty Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update the date of birth for the logged-in customer.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mage Loyalty Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mageloyalty.mintlify.site/_mintlify/api/og/v2?division=Customers\u0026amp;title=updateCustomerDob\u0026amp;description=Update+the+date+of+birth+for+the+logged-in+customer.\u0026amp;theme=11490466c5a4eb52bdd3eb31\u0026amp;signature=d5b85aebc00fe26d537d73df0cc769d3c6e15665a8636edd04aa245404b95e75\">\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=\"updateCustomerDob - Mage Loyalty Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update the date of birth for the logged-in customer.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mageloyalty.mintlify.site/_mintlify/api/og/v2?division=Customers\u0026amp;title=updateCustomerDob\u0026amp;description=Update+the+date+of+birth+for+the+logged-in+customer.\u0026amp;theme=11490466c5a4eb52bdd3eb31\u0026amp;signature=d5b85aebc00fe26d537d73df0cc769d3c6e15665a8636edd04aa245404b95e75\">\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/mageloyalty/t04GmJXQ0KbEYnIy/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mage Loyalty Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#404040\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/js-sdk/customers/update-customer-dob.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.mageloyalty.com/#organization\",\"name\":\"Mage Loyalty Documentation\",\"url\":\"https://developers.mageloyalty.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mageloyalty/v6ewjqiSAmlnGkBR/logo/mage-logo-black-text.svg?fit=max\u0026auto=format\u0026n=v6ewjqiSAmlnGkBR\u0026q=85\u0026s=7b6b104db3297180cdcc1e8621264755\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.mageloyalty.com#website\",\"name\":\"Mage Loyalty Documentation\",\"url\":\"https://developers.mageloyalty.com\",\"publisher\":{\"@id\":\"https://developers.mageloyalty.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob#webpage\",\"url\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob\",\"name\":\"updateCustomerDob\",\"description\":\"Update the date of birth for the logged-in customer.\",\"dateModified\":\"2026-07-17T22:30:42.668Z\",\"isPartOf\":{\"@id\":\"https://developers.mageloyalty.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Methods\",\"item\":\"https://developers.mageloyalty.com/js-sdk/customers/get-customer-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customers\",\"item\":\"https://developers.mageloyalty.com/js-sdk/customers/get-customer-details\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"updateCustomerDob\",\"item\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob#article\",\"headline\":\"updateCustomerDob\",\"name\":\"updateCustomerDob\",\"description\":\"Update the date of birth for the logged-in customer.\",\"url\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob\",\"mainEntityOfPage\":{\"@id\":\"https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob#webpage\"},\"dateModified\":\"2026-07-17T22:30:42.668Z\",\"publisher\":{\"@id\":\"https://developers.mageloyalty.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.mageloyalty.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Mage Loyalty Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Mage Loyalty Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/js-sdk/customers/update-customer-dob.md","siteName":"Mage Loyalty Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"JavaScript SDK","groups":[{"group":"JavaScript SDK","pages":[{"title":"Introduction","href":"/js-sdk/introduction"},{"title":"TypeScript Support","href":"/js-sdk/typescript"},{"title":"Loyalty modes","href":"/js-sdk/loyalty-modes"}]},{"group":"Methods","pages":[{"group":"Customers","pages":[{"title":"getCustomerDetails","href":"/js-sdk/customers/get-customer-details"},{"title":"getCustomerVipTier","href":"/js-sdk/customers/get-customer-vip-tier"},{"title":"getCustomerActivity","href":"/js-sdk/customers/get-customer-activity"},{"title":"getProfile / updateProfile","description":"Read and update the logged-in customer's name and marketing consent.","href":"/js-sdk/customers/update-profile"},{"title":"updateCustomerDob","href":"/js-sdk/customers/update-customer-dob"}]},{"group":"Rewards","pages":[{"title":"getShopRewards","description":"List all available rewards for the shop.","href":"/js-sdk/rewards/get-shop-rewards"},{"title":"getCustomerRewards","href":"/js-sdk/rewards/get-customer-rewards"},{"title":"redeemReward","href":"/js-sdk/rewards/redeem-reward"},{"title":"redeemFlexible","href":"/js-sdk/rewards/redeem-flexible"}]},{"group":"Subscriptions","pages":[{"title":"getSubscriptions","href":"/js-sdk/subscriptions/get-subscriptions"},{"title":"redeemFlexibleToSubscription","href":"/js-sdk/subscriptions/redeem-flexible-to-subscription"},{"title":"redeemRewardToSubscription","href":"/js-sdk/subscriptions/redeem-reward-to-subscription"}]},{"group":"Cart","pages":[{"title":"getCartEarningValue","href":"/js-sdk/cart/get-cart-earning-value"}]},{"group":"Product","pages":[{"title":"getProductEarningValue","href":"/js-sdk/product/get-product-earning-value"},{"title":"getProductBonusCampaign","href":"/js-sdk/product/get-product-bonus-campaign"}]},{"group":"VIP Tiers","pages":[{"title":"getShopVipTiers","href":"/js-sdk/vip-tiers/get-shop-vip-tiers"}]},{"group":"Earning Rules","pages":[{"title":"getEarningRules","href":"/js-sdk/earning-rules/get-earning-rules"}]},{"group":"Referrals","pages":[{"title":"getCustomerReferralStats","href":"/js-sdk/referrals/get-customer-referral-stats"},{"title":"getReferralLink","href":"/js-sdk/referrals/get-referral-link"}]},{"group":"Sidebar","pages":[{"title":"openSidebar","href":"/js-sdk/sidebar/open-sidebar"},{"title":"closeSidebar","href":"/js-sdk/sidebar/close-sidebar"}]}]},{"group":"Recipes","pages":[{"title":"Bonus campaign countdown","href":"/js-sdk/recipes/bonus-campaign-countdown"}]}]}]},"basePath":"","title":"updateCustomerDob - Mage Loyalty Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}