| PATCH | /customer/{boosterCustomerId}/updateConsents | Update customer consents | Update customer consents |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateConsents:
# @ApiMember(Description="Booster customer Id")
booster_customer_id: int = 0
"""
Booster customer Id
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted by email. Leave empty or 'false' if you do not.")
contact_by_email_flag: bool = False
"""
Provide 'true' if you want to be contacted by email. Leave empty or 'false' if you do not.
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted by mail. Leave empty or 'false' if you do not.")
contact_by_mail_flag: bool = False
"""
Provide 'true' if you want to be contacted by mail. Leave empty or 'false' if you do not.
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted by phone. Leave empty or 'false' if you do not.")
contact_by_phone_flag: bool = False
"""
Provide 'true' if you want to be contacted by phone. Leave empty or 'false' if you do not.
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted by SMS. Leave empty or 'false' if you do not.")
contact_by_s_m_s_flag: bool = False
"""
Provide 'true' if you want to be contacted by SMS. Leave empty or 'false' if you do not.
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted by social media. Leave empty or 'false' if you do not.")
contact_by_social_media_flag: bool = False
"""
Provide 'true' if you want to be contacted by social media. Leave empty or 'false' if you do not.
"""
# @ApiMember(Description="Provide 'true' if you want to be contacted at all. Leave empty or 'false' if you do not - if chosen false, all contactBy* will be set to false also")
privacy_acceptance: bool = False
"""
Provide 'true' if you want to be contacted at all. Leave empty or 'false' if you do not - if chosen false, all contactBy* will be set to false also
"""
# @ApiMember(Description="Provide 'true' if you allow your data to be stored abroad. Leave empty or 'false' if you do not.")
allow_store_data_abroad: Optional[bool] = None
"""
Provide 'true' if you allow your data to be stored abroad. Leave empty or 'false' if you do not.
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /customer/{boosterCustomerId}/updateConsents HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"boosterCustomerId":0,"contactByEmailFlag":false,"contactByMailFlag":false,"contactByPhoneFlag":false,"contactBySMSFlag":false,"contactBySocialMediaFlag":false,"privacyAcceptance":false,"allowStoreDataAbroad":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{}