How to get "buyer_accepts_marketing" filed in custom event

Checkout extensibility is going to replace custom checkout.liquid so we are migrating our third-party event to custom event.

We want to send a consent event when the user consents buyer_accepts_marketing filed, but there is no buyer_accepts_marketing filed in custom event like checkout.liquid. How to get

buyer_accepts_marketing in custom event or any suggestions?

Hi JackLin_PG,

There is a buyerIdentity API for checkout UI extensions that has an acceptsMarketing field on it which will work when your app has the customer data scope. Would this work for your use case?