# Update customer by external id The request sample(s) below shows the default payload and one minimum required payload. Depending on your configuration, the API may take or return additional fields in the extendedProperties object. For specific examples reach out to your technical contact. Endpoint: PUT /customers/externalId Version: 4.3.0 Security: api_key ## Response 200 fields (application/json): - `data` (object) - `data.id` (string) Generated unique customer id Example: "2457B03E-9925-45E9-B551-25F10D7BD4F2" - `data.externalId` (string) Secondary/external customer id - `data.mobilePhone` (string) Example: "+4712345678" - `data.email` (string) Example: "test@test.com" - `data.firstName` (string) - `data.lastName` (string) - `data.address` (string) Example: "Kongens gate 21" - `data.zip` (string) Example: 1010 - `data.city` (string) Example: "Oslo" - `data.country` (string) Country code in 2 letters ISO 3166 standard Example: "NO" - `data.birthDate` (string) Example: "2007-01-01T00:00:00" - `data.gender` (string) Default valid values are Female, Male or Unknown. Can be customized. Example: "Female" - `data.favoriteStores` (array) Example: ["S100"] - `data.interests` (array) Example: ["Sports"] - `data.loyalty` (object) - `data.loyalty.points` (number) Current point balance on customer. This property also contains points that may be pending. The property pointsActive returns the current available balance. Example: 500 - `data.loyalty.pointsActive` (number) Totalt points active Example: 300 - `data.loyalty.pointsPending` (number) Points that a user has earned but are not yet available for use due to pending validation or processing Example: 200 - `data.loyalty.pointsExpired` (number) Number of loyalty points that a user had but have since expired and are no longer available for use. Example: 100 - `data.loyalty.pointsTotal` (number) Total points earned through history Example: 600 - `data.loyalty.loyaltyCards` (array) List of a customers stamp cards - `data.loyalty.loyaltyCards.id` (integer) Id of stamp card. Example: "4" - `data.loyalty.loyaltyCards.namn` (string) Name of stamp card Example: "Black coffee" - `data.loyalty.loyaltyCards.total` (number) Total number of clips/stamps needed Example: 6 - `data.loyalty.loyaltyCards.count` (number) Current clip/stamp count Example: 3 - `data.loyalty.loyaltyCards.imageUrl` (string) Image for stamp card. Requires additional setup. Example: "cdn.oculos.no/coffee_clip3.png" - `data.loyalty.loyaltyCards.sortOrder` (integer) Sort order of the promotion. The sort order is defined in the Trigg application Example: 1 - `data.loyalty.loyaltyCards.extendedProperties` (object) Additional properties depending on configuration - `data.loyalty.loyaltyCards.extendedProperties.additionalProp1` (object) - `data.loyalty.loyaltyCards.extendedProperties.additionalProp2` (object) - `data.loyalty.loyaltyCards.extendedProperties.additionalProp3` (object) - `data.promotions` (array) - `data.promotions.id` (string) Generated unique promotion id Example: "2457B03E-9925-45E9-B551-25F10D7BD4F2" - `data.promotions.type` (string) Type of promotion Example: "Promotion" - `data.promotions.name` (string) Name of promotion Example: "Welcome coupon" - `data.promotions.available` (boolean) Boolean that shows the promotions availabilty status Example: true - `data.promotions.description` (string) Example: "This is a coupon that gives the customer 10% discount on any product" - `data.promotions.terms` (string) Terms and conditions of the promotion Example: "This promotion is valid for all products in the store" - `data.promotions.urlLink` (string) Example: "Link to the promotion" - `data.promotions.urlImage` (string) Link to promotion image Example: "https://cdn.oculos.no/img01.png" - `data.promotions.validFrom` (string) Example: "2024-04-03T07:38:32.495Z" - `data.promotions.validTo` (string) Example: "2024-04-03T07:38:32.495Z" - `data.promotions.validTimeFrom` (string) Time of day the promotion becomes valid. Note: This is only a description field that can be used to display information, the actual validity is determined by validFrom and validTo. Default value is 00:00:00 Example: "08:00:00" - `data.promotions.validTimeTo` (string) Time of day the promotion becomes invalid. Note: This is only a description field that can be used to display information, the actual validity is determined by validFrom and validTo. Default value is 00:00:00 Example: "20:00:00" - `data.promotions.unlimitedRedemption` (boolean) Can the promotion be redeemed unlimited times - `data.promotions.redemptionLimit` (integer) How many times can the promotion be redeemed? Example: 5 - `data.promotions.redemptionCount` (integer) How many times has the promotion been redeem until now Example: 1 - `data.promotions.productsIncluded` (array) - `data.promotions.productsIncluded.id` (string) Id of product Example: 123 - `data.promotions.productsIncluded.type` (string) Example: "description" - `data.promotions.productsExcluded` (array) - `data.promotions.storesIncluded` (array) - `data.promotions.affiliate` (object) Affiliate information - `data.promotions.affiliate.id` (string) Id of affiliate Example: "154831A5-7E2E-44D8-8F2B-FB0D33CAD941" - `data.promotions.affiliate.name` (string) Name of affiliate Example: "Sample Affiliate" - `data.promotions.redemptionChannels` (array) - `data.promotions.redemptionChannels.type` (string) Channel identifier. Can be ECOM, POS or ALL Example: "POS" - `data.promotions.redemptionChannels.valueType` (string) PERCENT, AMOUNT or CODE Example: "PERCENT" - `data.promotions.redemptionChannels.value` (string) The value of the promotion Example: 10 - `data.promotions.redemptionChannels.message` (string) Can contain a small message/instruction for coupon usage Example: "Only applies to members" - `data.promotions.redemptionHistory` (array) - `data.promotions.redemptionHistory.storeId` (string) Id of product Example: "S-1001" - `data.promotions.redemptionHistory.receiptId` (string) Unique receiptId Example: "120C4CF0-1923-4737-8096-A6E8A89F9574" - `data.promotions.redemptionHistory.redeemDateTime` (string) Example: "2024-04-03T07:38:32.495Z" - `data.consents` (object) - `data.consents.acceptsTerms` (boolean) - `data.consents.acceptsEmail` (boolean) - `data.consents.acceptsSms` (boolean) - `data.consents.extendedConsents` (array) - `data.consents.extendedConsents.id` (string) - `data.consents.extendedConsents.value` (boolean) - `data.consents.extendedConsents.name` (string) - `data.consents.extendedConsents.consentDate` (string) - `data.extendedProperties` (object) - `metaData` (object) - `metaData.CreatedAt` (string) Example: "2023-01-01 15:15:00" - `metaData.UpdatedAt` (string) Example: "2023-01-05 15:15:00" ## Response 400 fields ## Response 401 fields ## Response 409 fields