> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/customer.md).

# Customer

API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter

## DeleteByCtcID

> Delete an existing contact by it CtcID

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/DeleteByCtcID":{"delete":{"operationId":"CustomerDeleteByCtcId","summary":"DeleteByCtcID","tags":["Customer"],"description":"Delete an existing contact by it CtcID","parameters":[{"name":"CtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int CtcID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## DeleteByExtenalIdentifier

> Delete an existing contact by its extenal identifier

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/DeleteByExtenalIdentifier":{"delete":{"operationId":"CustomerDeleteByExtenalIdentifier","summary":"DeleteByExtenalIdentifier","tags":["Customer"],"description":"Delete an existing contact by its extenal identifier","parameters":[{"name":"ExternalID","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string ExternalID in the pinned controller signature.","required":true},{"name":"ExternalSource","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string ExternalSource in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## FindCtcID

> Find CtcID and MD5 of a customer(s) based on the criteria sent in the payload: The operator between the different criteria is AND The maximum returned records is 100

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"FindCtcIDPayLoad":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"It's applicable only for the multibrand instances and it's mandatory if the connected user belongs to master brand or higher level You can find the brand(s) id(s) and name(s) by calling the method api/user/GetAllowedBrands"},"SearchFilters":{"allOf":[{"$ref":"#/components/schemas/FindCustomerSearchFilters"}],"description":"Filters to be used to search for customers"}},"required":["SearchFilters"]},"FindCustomerSearchFilters":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CardToken":{"type":"string","description":"The card token of the customer"},"CtcID":{"type":"integer","format":"int32","nullable":true,"description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"CustomerAuthentication":{"allOf":[{"$ref":"#/components/schemas/CustomerAuthentication"}],"description":"Customer Authentication"},"DeviceToken":{"type":"string","description":"Push notification device token"},"Email":{"type":"string","description":"Email address"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used to find contact details"},"FirstName":{"type":"string","description":"First Name"},"GiftCardCode":{"type":"string","description":"A gift card code"},"LastName":{"type":"string","description":"Last Name"},"MD5":{"type":"string","description":"Token linked to the customer"},"MemberNumber":{"type":"string","description":"The member number of the customer"},"MobilePhone":{"type":"string","description":"Mobile number"},"Phone":{"type":"string","description":"Landline number"},"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"string","description":"The referrer code of the customer"},"ReservationReference":{"allOf":[{"$ref":"#/components/schemas/BookingReference"}],"description":"A reservation details"},"Staff":{"allOf":[{"$ref":"#/components/schemas/Staff"}],"description":"A staff details"},"SupInfo":{"allOf":[{"$ref":"#/components/schemas/SupInfo"}],"description":"Customer supplementary information"},"VoucherCode":{"type":"string","description":"A voucher code"}}},"CustomerAuthentication":{"type":"object","nullable":true,"properties":{"Username":{"type":"string","nullable":true},"HashedPassword":{"type":"string","nullable":true},"ApplicationName":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"BookingReference":{"type":"object","properties":{"BookingSector":{"description":"Restaurant=1, Hotel=2, Other=3 (Documented as type `BookingSectorEnum`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"ReservationReference":{"type":"string","description":"Reservation Reference"},"SupplierCode":{"type":"integer","format":"int32","nullable":true,"description":"Reservation Supplier Code : Call Api/Reservation/GetSuppliers to get full list Mandatory with ReservationReference field"}}},"Staff":{"type":"object","properties":{"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"A Staff Location"},"StaffID":{"type":"string","description":"A Staff ID"}}},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"FindCustomerCtcIDOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseData":{"type":"array","items":{"$ref":"#/components/schemas/FindCustomerCtcIDResponse"},"description":"search result"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}},"FindCustomerCtcIDResponse":{"type":"object","properties":{"CtcID":{"type":"integer","format":"int32","description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"MD5":{"type":"string","description":"Token linked to the customer"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/FindCtcID":{"post":{"operationId":"CustomerFindCtcId","summary":"FindCtcID","tags":["Customer"],"description":"Find CtcID and MD5 of a customer(s) based on the criteria sent in the payload: The operator between the different criteria is AND The maximum returned records is 100","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCtcIDPayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCustomerCtcIDOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## FindCustomerDetails

> Find customer(s) details based on the criteria sent in the payload: The operator between the different criterias is AND You can refine your response by using the the field 'ResponseFilters'. The maximum returned records is 10

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"FindCustomerPayLoad":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"It's applicable only for the multibrand instances and it's mandatory if the connected user belongs to master brand or higher level You can find the brand(s) id(s) and name(s) by calling the method api/user/GetAllowedBrands"},"ResponseFilters":{"allOf":[{"$ref":"#/components/schemas/FindCustomerResponseFilters"}],"description":"Filters to be used to refine the call response . By default only personal details and atreemo IDs are included, if you need any other infomation, you should specify it here"},"SearchFilters":{"allOf":[{"$ref":"#/components/schemas/FindCustomerSearchFilters"}],"description":"Filters to be used to search for customers"}},"required":["SearchFilters"]},"FindCustomerResponseFilters":{"type":"object","properties":{"CorporateDetails":{"type":"boolean","description":"Include corporate details (Acteol corporate ID and name) to the response"},"CustomerAuthentication":{"type":"boolean","description":"Include customer Authentication to the response"},"CustomerNotes":{"type":"boolean","description":"Include customer notes to the response"},"CustomerPicture":{"type":"boolean","description":"Include customer picture to the response"},"InteractionsInfo":{"type":"boolean","description":"Include customer interactions info (Favourite location, first visit, last visit, preferred location, selected location) to the response"},"Interests":{"type":"boolean","description":"Include customer Interests (Acteol interest ID , Name, status, change date) to the response"},"LoyaltyDetails":{"type":"boolean","description":"Include the loyalty details (CardTokens, Tier ,Balance ,MemberNumbers) to the response"},"MarketingOptin":{"type":"boolean","description":"Include marketing optin (Email, sms, mail, phone, push, webpush, watsapp) to the response"},"Preferences":{"type":"boolean","description":"Include customer preferences (Acteol preference ID , Name, status, change date) to the response"},"ReferrerDetails":{"type":"boolean","description":"Include referrer details (ReferredByCode, ReferrerCode) to the response"},"StaffDetails":{"type":"boolean","description":"Include customer staff details to the response"},"SupInfo":{"type":"boolean","description":"Include SupInfo to the response"},"Tags":{"type":"boolean","description":"Include tags details (tag name , image tag url) to the response"}}},"FindCustomerSearchFilters":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CardToken":{"type":"string","description":"The card token of the customer"},"CtcID":{"type":"integer","format":"int32","nullable":true,"description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"CustomerAuthentication":{"allOf":[{"$ref":"#/components/schemas/CustomerAuthentication"}],"description":"Customer Authentication"},"DeviceToken":{"type":"string","description":"Push notification device token"},"Email":{"type":"string","description":"Email address"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used to find contact details"},"FirstName":{"type":"string","description":"First Name"},"GiftCardCode":{"type":"string","description":"A gift card code"},"LastName":{"type":"string","description":"Last Name"},"MD5":{"type":"string","description":"Token linked to the customer"},"MemberNumber":{"type":"string","description":"The member number of the customer"},"MobilePhone":{"type":"string","description":"Mobile number"},"Phone":{"type":"string","description":"Landline number"},"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"string","description":"The referrer code of the customer"},"ReservationReference":{"allOf":[{"$ref":"#/components/schemas/BookingReference"}],"description":"A reservation details"},"Staff":{"allOf":[{"$ref":"#/components/schemas/Staff"}],"description":"A staff details"},"SupInfo":{"allOf":[{"$ref":"#/components/schemas/SupInfo"}],"description":"Customer supplementary information"},"VoucherCode":{"type":"string","description":"A voucher code"}}},"CustomerAuthentication":{"type":"object","nullable":true,"properties":{"Username":{"type":"string","nullable":true},"HashedPassword":{"type":"string","nullable":true},"ApplicationName":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"BookingReference":{"type":"object","properties":{"BookingSector":{"description":"Restaurant=1, Hotel=2, Other=3 (Documented as type `BookingSectorEnum`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"ReservationReference":{"type":"string","description":"Reservation Reference"},"SupplierCode":{"type":"integer","format":"int32","nullable":true,"description":"Reservation Supplier Code : Call Api/Reservation/GetSuppliers to get full list Mandatory with ReservationReference field"}}},"Staff":{"type":"object","properties":{"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"A Staff Location"},"StaffID":{"type":"string","description":"A Staff ID"}}},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"FindCustomerDetailsOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseData":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomerResponse"},"description":"search result"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}},"GetCustomerResponse":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"Brand ID"},"CorporateDetails":{"allOf":[{"$ref":"#/components/schemas/ContactCorporateDetails"}],"description":"the name and the acteol ID of the customer company"},"CpyID":{"type":"integer","format":"int32","description":"Household id of the customer"},"CreateDate":{"type":"string","format":"date-time","nullable":true,"description":"Creation Date"},"CtcID":{"type":"integer","format":"int32","description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"CustomerAuthenticationDetails":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAuthentication"},"description":"the Authentication details of the customer"},"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"the picture of the customer"},"DeleteMyData":{"type":"boolean","nullable":true,"description":"If true Delete all info of Customer"},"DoNotExport":{"type":"boolean","nullable":true,"description":"Default False , If true customer will be suspended from all communications"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used to find contact details"},"InteractionsInfo":{"allOf":[{"$ref":"#/components/schemas/SitesAndInteractions"}],"description":"customer interaction info contains all information about sites and visits"},"Interests":{"type":"array","items":{"$ref":"#/components/schemas/CustomerInterest"},"description":"Customer Interests"},"IsSuspended":{"type":"boolean","description":"Customer Suspended (Info Read only )"},"LastModifiedSource":{"type":"string","description":"Last Modified Source"},"LoyaltyDetails":{"allOf":[{"$ref":"#/components/schemas/GetCustomerLoyalty"}],"description":"Loyalty details"},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/GetMarketingOptin"}],"description":"Marketing optin preferences"},"MD5":{"type":"string","description":"Token linked to the customer used for my preference site SSO"},"ModifiedBy":{"type":"integer","format":"int32","nullable":true,"description":"Last modified by user ID"},"ModifiedByName":{"type":"string","description":"Last modified by user name"},"ModifiedDate":{"type":"string","format":"date-time","nullable":true,"description":"Last modification date"},"PersonalDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Personal details of the customer"},"Preferences":{"type":"array","items":{"$ref":"#/components/schemas/CustomerPreference"},"description":"Customer preferences"},"PushNotificationDetails":{"type":"array","items":{"$ref":"#/components/schemas/PushNotificationDetails"},"description":"Details that will be used to send the push notification"},"ReferrerDetails":{"allOf":[{"$ref":"#/components/schemas/GetCustomerReferrer"}],"description":"Referrer details"},"Source":{"type":"string","description":"Source"},"StaffDetails":{"type":"array","items":{"$ref":"#/components/schemas/StaffDetails"},"description":"the staff details of the customer"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"},"Tags":{"type":"array","items":{"$ref":"#/components/schemas/CustomerTag"},"description":"Customer tags"}}},"ContactCorporateDetails":{"type":"object","properties":{"CorporateID":{"type":"integer","format":"int32","nullable":true,"description":"Corporate ID supplied by Acteol (you can GET/POSt corporate from the API Corporate/GET or Corporate/POST)"},"CorporateName":{"type":"string","description":"Company name"}}},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"SitesAndInteractions":{"type":"object","properties":{"FavouriteLocation":{"allOf":[{"$ref":"#/components/schemas/CustomerLocation"}],"description":"the customer favourite location details"},"FirstVisit":{"type":"string","format":"date-time","nullable":true,"description":"the date time of the first tracked visit"},"LastVisit":{"type":"string","format":"date-time","nullable":true,"description":"the date time of the last tracked visit"},"PreferredLocation":{"allOf":[{"$ref":"#/components/schemas/CustomerLocation"}],"description":"the customer preferred location details"},"SelectedLocation":{"type":"array","items":{"$ref":"#/components/schemas/CustomerLocation"},"description":"the customer selected locations details"}}},"CustomerLocation":{"type":"object","properties":{"LocationAddress":{"type":"string","description":"The location address"},"LocationID":{"type":"integer","format":"int32","description":"The ID of the Location"},"LocationImageURL":{"type":"string","description":"The location image URL"},"LocationName":{"type":"string","description":"The location name"},"LocationPhone":{"type":"string","description":"The location telephone"}}},"CustomerInterest":{"type":"object","properties":{"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"InterestID":{"type":"integer","format":"int32","description":"The ID of the Preference"},"Name":{"type":"string","description":"Name of the Preference"},"Status":{"type":"boolean","description":"True if it's flagged ; False if not"}}},"GetCustomerLoyalty":{"type":"object","properties":{"CardsToken":{"type":"array","items":{"type":"string"},"description":"Collection of cards token linked to this customer"},"CurrentTiersName":{"type":"string","description":"the loyalty tiers name where the customer belongs to"},"CyclePointsBalance":{"type":"number","format":"double","description":"The points/stamps balance of current cycle (this will used only if the loyalty program will contains multiple thresholds)"},"LifeTimePoints":{"type":"number","format":"double","description":"The sum of points/stamps earned all time (from the first day of being a loyal cutomer)"},"LoyaltyCashBalance":{"type":"number","format":"double","description":"Cash balance of the requested customer"},"LoyaltyPointsBalance":{"type":"number","format":"double","description":"Points/Stamps balance of the requested customer"},"MemberNumbers":{"type":"array","items":{"type":"string"},"description":"Collection of member numbers linked to this customer"},"NextTiersName":{"type":"string","description":"the loyalty tiers name that the customer can achieve"},"PARTokens":{"type":"array","items":{"type":"string"},"description":"Collection of PAR token linked to this customer"},"PointsNeededForNextRewards":{"type":"number","format":"double","description":"The number of points/stamps to be earned to get the next reward (this will used only if the loyalty program will contains a threshold)"},"TierLastUpdatedDate":{"type":"string","format":"date-time","nullable":true,"description":"The last update date of tier change"},"TiersExpirationDate":{"type":"string","format":"date-time","nullable":true,"description":"the date when the customer will be downgraded"}}},"GetMarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"CustomerPreference":{"type":"object","properties":{"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"Name":{"type":"string","description":"Name of the Preference"},"PreferenceID":{"type":"integer","format":"int32","description":"The ID of the Preference"},"Status":{"type":"boolean","description":"True if it's flagged ; False if not"}}},"PushNotificationDetails":{"type":"object","properties":{"AppID":{"type":"integer","format":"int32","description":"Clients having more thant one Applications will need to add an App ID which will be supplied by Acteol"},"AppName":{"type":"string","description":"App Name which will be supplied by Acteol"},"DeviceToken":{"type":"string","description":"Device token that will be used to send the message. If multiple tokens are sent Acteol will use the latest token sent"}}},"GetCustomerReferrer":{"type":"object","properties":{"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"array","items":{"type":"string"},"description":"Collection of referrer codes linked to this customer"}}},"StaffDetails":{"type":"object","nullable":true,"properties":{"StaffID":{"type":"string","nullable":true},"WorkEmail":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"Contract":{"type":"string","nullable":true},"ContractCode":{"type":"string","nullable":true},"JobTitle":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time","nullable":true},"EndReason":{"type":"string","nullable":true},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}]},"CompanyName":{"type":"string","nullable":true},"Paybasis":{"type":"string","nullable":true},"ContinuousServiceDate":{"type":"string","format":"date-time","nullable":true},"CustomField1":{"type":"string","nullable":true},"CustomField2":{"type":"string","nullable":true},"CustomField3":{"type":"string","nullable":true},"CustomField4":{"type":"string","nullable":true},"CustomField5":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerTag":{"type":"object","properties":{"TagImageURL":{"type":"string","description":"The tag image URL"},"TagName":{"type":"string","description":"The tag Name"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/FindCustomerDetails":{"post":{"operationId":"CustomerFindCustomerDetails","summary":"FindCustomerDetails","tags":["Customer"],"description":"Find customer(s) details based on the criteria sent in the payload: The operator between the different criterias is AND You can refine your response by using the the field 'ResponseFilters'. The maximum returned records is 10","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCustomerPayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCustomerDetailsOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Patch

> Update a partial part of the customer details (Only populated fields will be updated). this method allow you to just generate member number or add new note or add card token.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"CustomerUpdatePayLoad":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"The ID of the Brand the customer should belongs to (should be used only for multi brands instance)"},"CardsToken":{"type":"array","items":{"type":"string"},"description":"Collection of card tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to update token linked to this customer)"},"CardToken":{"type":"string","description":"The Card token used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to Add one token)"},"CtcID":{"type":"integer","format":"int32","description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"CustomerAuthentication":{"allOf":[{"$ref":"#/components/schemas/CustomerAuthentication"}],"description":"The Authentication of the customer"},"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"DataProcess":{"allOf":[{"$ref":"#/components/schemas/DataProcess"}],"description":"Manage the processing of the customer Data. Setting value to false will trigger the hashing of the customer record"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"MemberNumber":{"allOf":[{"$ref":"#/components/schemas/CustomerMemberNumber"}],"description":"Member number to be generated/saved with the customer account"},"ModifiedDate":{"type":"string","format":"date-time","nullable":true,"description":"Last modification date"},"PARTokens":{"type":"array","items":{"type":"string"},"description":"Collection of PAR tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (PAR token allows us to link all versions of a linked card (physical card, digital card on phone, digital card on watch etc) and record all card transactions by any of these, whereas with the current \"Card Token\" only field each of these would have to be linked individually)"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"PreferredLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a preferred Site. The Location IDs can be retrieved from the Location end point"},"PushNotificationDetails":{"allOf":[{"$ref":"#/components/schemas/PushNotificationDetails"}],"description":"Details that will be used to send the push notification"},"Referrer":{"allOf":[{"$ref":"#/components/schemas/CustomerReferrer"}],"description":"The Referrer ID entered when the customer signed up"},"SelectedLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a selected Site. The Location IDs can be retrieved from the Location end point"},"StaffDetails":{"allOf":[{"$ref":"#/components/schemas/StaffDetails"}],"description":"Details of the Staff"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["CtcID","ExternalIdentifier"]},"CustomerAuthentication":{"type":"object","nullable":true,"properties":{"Username":{"type":"string","nullable":true},"HashedPassword":{"type":"string","nullable":true},"ApplicationName":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"DataProcess":{"type":"object","properties":{"DeleteMyData":{"type":"boolean","nullable":true,"description":"Confirmation to delete the personal data of this contact"},"ProcessMydata":{"type":"boolean","nullable":true,"description":"Confirmation to process the data of this contact"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerMemberNumber":{"type":"object","properties":{"GenerateMemberNumber":{"type":"boolean","description":"The default value is false. Setting the value to True will generate a member number for the contact"},"MemberNumber":{"type":"string","description":"Member number of the customer ( if GenerateMemberNumber is true and MemberNumber is empty , we will auto-generate a random number for this customer"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"PushNotificationDetails":{"type":"object","properties":{"AppID":{"type":"integer","format":"int32","description":"Clients having more thant one Applications will need to add an App ID which will be supplied by Acteol"},"AppName":{"type":"string","description":"App Name which will be supplied by Acteol"},"DeviceToken":{"type":"string","description":"Device token that will be used to send the message. If multiple tokens are sent Acteol will use the latest token sent"}}},"CustomerReferrer":{"type":"object","properties":{"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"string","description":"The referrer code of the customer (if empty we will auto generate a code for this customer)"}}},"StaffDetails":{"type":"object","nullable":true,"properties":{"StaffID":{"type":"string","nullable":true},"WorkEmail":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"Contract":{"type":"string","nullable":true},"ContractCode":{"type":"string","nullable":true},"JobTitle":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time","nullable":true},"EndReason":{"type":"string","nullable":true},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}]},"CompanyName":{"type":"string","nullable":true},"Paybasis":{"type":"string","nullable":true},"ContinuousServiceDate":{"type":"string","format":"date-time","nullable":true},"CustomField1":{"type":"string","nullable":true},"CustomField2":{"type":"string","nullable":true},"CustomField3":{"type":"string","nullable":true},"CustomField4":{"type":"string","nullable":true},"CustomField5":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"UpdateCustomerOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/Patch":{"patch":{"operationId":"CustomerPatch","summary":"Patch","tags":["Customer"],"description":"Update a partial part of the customer details (Only populated fields will be updated). this method allow you to just generate member number or add new note or add card token.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdatePayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Post

> Post customer , a de-duplication algorithm will run to check if the customer already exist in the database If exist : we will update the existing details with the new data from this call if not exist : we will create a new customer Rule : one of the email, mobile phone, birthdate and customer name (firstname and lastname) shouldn't be empty

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostCustomerPayLoad":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"The ID of the Brand the customer should belongs to (should be used only for multi brands instance)"},"CardsToken":{"type":"array","items":{"type":"string"},"description":"Collection of card tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to update token linked to this customer)"},"CardToken":{"type":"string","description":"The Card token used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to Add one token)"},"CreateDate":{"type":"string","format":"date-time","nullable":true,"description":"Creation Date :if empty ,we will use the current datetime (Acceptance of privacy policy date)"},"CustomerAuthentication":{"allOf":[{"$ref":"#/components/schemas/CustomerAuthentication"}],"description":"The Authentication of the customer"},"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"MemberNumber":{"allOf":[{"$ref":"#/components/schemas/CustomerMemberNumber"}],"description":"Member number to be generated/saved with the customer account"},"ModifiedDate":{"type":"string","format":"date-time","nullable":true,"description":"Last modification date"},"PARTokens":{"type":"array","items":{"type":"string"},"description":"Collection of PAR tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (PAR token allows us to link all versions of a linked card (physical card, digital card on phone, digital card on watch etc) and record all card transactions by any of these, whereas with the current \"Card Token\" only field each of these would have to be linked individually)"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"PreferredLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a preferred Site. The Location IDs can be retrieved from the Location end point"},"PushNotificationDetails":{"allOf":[{"$ref":"#/components/schemas/PushNotificationDetails"}],"description":"Details that will be used to send the push notification"},"Referrer":{"allOf":[{"$ref":"#/components/schemas/CustomerReferrer"}],"description":"The Referrer ID entered when the customer signed up"},"SelectedLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a selected Site. The Location IDs can be retrieved from the Location end point"},"StaffDetails":{"allOf":[{"$ref":"#/components/schemas/StaffDetails"}],"description":"Details of the Staff"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["ExternalIdentifier"]},"CustomerAuthentication":{"type":"object","nullable":true,"properties":{"Username":{"type":"string","nullable":true},"HashedPassword":{"type":"string","nullable":true},"ApplicationName":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerMemberNumber":{"type":"object","properties":{"GenerateMemberNumber":{"type":"boolean","description":"The default value is false. Setting the value to True will generate a member number for the contact"},"MemberNumber":{"type":"string","description":"Member number of the customer ( if GenerateMemberNumber is true and MemberNumber is empty , we will auto-generate a random number for this customer"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"PushNotificationDetails":{"type":"object","properties":{"AppID":{"type":"integer","format":"int32","description":"Clients having more thant one Applications will need to add an App ID which will be supplied by Acteol"},"AppName":{"type":"string","description":"App Name which will be supplied by Acteol"},"DeviceToken":{"type":"string","description":"Device token that will be used to send the message. If multiple tokens are sent Acteol will use the latest token sent"}}},"CustomerReferrer":{"type":"object","properties":{"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"string","description":"The referrer code of the customer (if empty we will auto generate a code for this customer)"}}},"StaffDetails":{"type":"object","nullable":true,"properties":{"StaffID":{"type":"string","nullable":true},"WorkEmail":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"Contract":{"type":"string","nullable":true},"ContractCode":{"type":"string","nullable":true},"JobTitle":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time","nullable":true},"EndReason":{"type":"string","nullable":true},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}]},"CompanyName":{"type":"string","nullable":true},"Paybasis":{"type":"string","nullable":true},"ContinuousServiceDate":{"type":"string","format":"date-time","nullable":true},"CustomField1":{"type":"string","nullable":true},"CustomField2":{"type":"string","nullable":true},"CustomField3":{"type":"string","nullable":true},"CustomField4":{"type":"string","nullable":true},"CustomField5":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"PostCustomerOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/Post":{"post":{"operationId":"CustomerPost","summary":"Post","tags":["Customer"],"description":"Post customer , a de-duplication algorithm will run to check if the customer already exist in the database If exist : we will update the existing details with the new data from this call if not exist : we will create a new customer Rule : one of the email, mobile phone, birthdate and customer name (firstname and lastname) shouldn't be empty","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCustomerPayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCustomerOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## PostCustomerApplication

> Registers the supplied ApplicationName through AddCustomerApplicationName using the authenticated UserID. An already-existing name sets ResponseStatus=false and adds business error 40. This registers an application name, not an association with a supplied CtcID, and does not define an OAuth client-registration or partner installation lifecycle. See Helpers/CustomerHelper.cs:2139-2155.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"CustomerAppNamePayLoad":{"type":"object","properties":{"ApplicationName":{"type":"string","description":"Application Name of the Customer"}}},"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/PostCustomerApplication":{"post":{"operationId":"CustomerPostCustomerApplication","summary":"PostCustomerApplication","tags":["Customer"],"description":"Registers the supplied ApplicationName through AddCustomerApplicationName using the authenticated UserID. An already-existing name sets ResponseStatus=false and adds business error 40. This registers an application name, not an association with a supplied CtcID, and does not define an OAuth client-registration or partner installation lifecycle. See Helpers/CustomerHelper.cs:2139-2155.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAppNamePayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Put

> Update the customer details with the entire resource sent (example : if email field is empty we will apply this in our end)

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"Customer","description":"API methods to manage customer details (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 3 Not authorized to use the brand requested or brand id is missing 4 No Data found 5 Maximum records exceeded 6 Referrer code already used 7 Member number already used 8 Invalid selected location id 9 Invalid preferred location id 10 Card token already used 11 No brand found in this instance 12 empty input parameter"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"CustomerUpdatePayLoad":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"The ID of the Brand the customer should belongs to (should be used only for multi brands instance)"},"CardsToken":{"type":"array","items":{"type":"string"},"description":"Collection of card tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to update token linked to this customer)"},"CardToken":{"type":"string","description":"The Card token used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (Use this field when you want to Add one token)"},"CtcID":{"type":"integer","format":"int32","description":"Ctcid of the Customer : this id shouldn't been saved as it can be merged with another customer"},"CustomerAuthentication":{"allOf":[{"$ref":"#/components/schemas/CustomerAuthentication"}],"description":"The Authentication of the customer"},"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"DataProcess":{"allOf":[{"$ref":"#/components/schemas/DataProcess"}],"description":"Manage the processing of the customer Data. Setting value to false will trigger the hashing of the customer record"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"MemberNumber":{"allOf":[{"$ref":"#/components/schemas/CustomerMemberNumber"}],"description":"Member number to be generated/saved with the customer account"},"ModifiedDate":{"type":"string","format":"date-time","nullable":true,"description":"Last modification date"},"PARTokens":{"type":"array","items":{"type":"string"},"description":"Collection of PAR tokens used to identify customers returning with the same token sent to us in xxxxxxxxxxxxxx (PAR token allows us to link all versions of a linked card (physical card, digital card on phone, digital card on watch etc) and record all card transactions by any of these, whereas with the current \"Card Token\" only field each of these would have to be linked individually)"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"PreferredLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a preferred Site. The Location IDs can be retrieved from the Location end point"},"PushNotificationDetails":{"allOf":[{"$ref":"#/components/schemas/PushNotificationDetails"}],"description":"Details that will be used to send the push notification"},"Referrer":{"allOf":[{"$ref":"#/components/schemas/CustomerReferrer"}],"description":"The Referrer ID entered when the customer signed up"},"SelectedLocationID":{"type":"string","description":"The Location ID added will be used to flag the customer against a selected Site. The Location IDs can be retrieved from the Location end point"},"StaffDetails":{"allOf":[{"$ref":"#/components/schemas/StaffDetails"}],"description":"Details of the Staff"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["CtcID","ExternalIdentifier"]},"CustomerAuthentication":{"type":"object","nullable":true,"properties":{"Username":{"type":"string","nullable":true},"HashedPassword":{"type":"string","nullable":true},"ApplicationName":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"DataProcess":{"type":"object","properties":{"DeleteMyData":{"type":"boolean","nullable":true,"description":"Confirmation to delete the personal data of this contact"},"ProcessMydata":{"type":"boolean","nullable":true,"description":"Confirmation to process the data of this contact"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerMemberNumber":{"type":"object","properties":{"GenerateMemberNumber":{"type":"boolean","description":"The default value is false. Setting the value to True will generate a member number for the contact"},"MemberNumber":{"type":"string","description":"Member number of the customer ( if GenerateMemberNumber is true and MemberNumber is empty , we will auto-generate a random number for this customer"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"PushNotificationDetails":{"type":"object","properties":{"AppID":{"type":"integer","format":"int32","description":"Clients having more thant one Applications will need to add an App ID which will be supplied by Acteol"},"AppName":{"type":"string","description":"App Name which will be supplied by Acteol"},"DeviceToken":{"type":"string","description":"Device token that will be used to send the message. If multiple tokens are sent Acteol will use the latest token sent"}}},"CustomerReferrer":{"type":"object","properties":{"ReferredByCode":{"type":"string","description":"The referrer code of the friend who invited this customer"},"ReferrerCode":{"type":"string","description":"The referrer code of the customer (if empty we will auto generate a code for this customer)"}}},"StaffDetails":{"type":"object","nullable":true,"properties":{"StaffID":{"type":"string","nullable":true},"WorkEmail":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"Contract":{"type":"string","nullable":true},"ContractCode":{"type":"string","nullable":true},"JobTitle":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time","nullable":true},"EndReason":{"type":"string","nullable":true},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}]},"CompanyName":{"type":"string","nullable":true},"Paybasis":{"type":"string","nullable":true},"ContinuousServiceDate":{"type":"string","format":"date-time","nullable":true},"CustomField1":{"type":"string","nullable":true},"CustomField2":{"type":"string","nullable":true},"CustomField3":{"type":"string","nullable":true},"CustomField4":{"type":"string","nullable":true},"CustomField5":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"UpdateCustomerOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/Customer/Put":{"put":{"operationId":"CustomerPut","summary":"Put","tags":["Customer"],"description":"Update the customer details with the entire resource sent (example : if email field is empty we will apply this in our end)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdatePayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/customer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
