Sets the first name, the last name, or both, of the consumer linked to an ID card, on this business's consumer record. Only firstName and lastName are used and other fields are ignored. A missing or null field is left unchanged; at least one of them must have a value.
Only placeholder consumers, whose email address ends in @ikentoo.net, such as the consumers created by Create ID Cards, can be updated. If the card is linked to any other consumer, the request is rejected with a 409 and nothing is changed. The consumer ID and the email address never change.
Path parameters
-
The unique identifier for the business location.
-
The unique identifier for the ID card.
Body
Required
-
The consumer's first name. Leave out or send
nullto keep it unchanged.Maximum length is
128. Format should match the following pattern:.*[^\s\p{Z}\p{C}].*. -
The consumer's last name. Leave out or send
nullto keep it unchanged.Maximum length is
128. Format should match the following pattern:.*[^\s\p{Z}\p{C}].*.
Responses
-
The consumer's name was updated.
-
Invalid body, such as a blank or too long name, a name made only of spaces or invisible characters, or no
firstNameorlastNamevalue at all. -
The caller has no access to this business location.
-
The ID card was not found at this business location (for example because it belongs to another business location), is revoked, is not linked to a consumer, or is linked to a placeholder consumer that has no record at this business.
-
The card is linked to a consumer whose email address does not end in
@ikentoo.net.
curl \
--request PATCH 'https://api.trial.lsk.lightspeed.app/id-cards/v1/business-locations/{businessLocationId}/cards/{cardId}/consumer' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"firstName": "Maria",
"lastName": "Rossi"
}'
{
"firstName": "Maria",
"lastName": "Rossi"
}
{
"cardId": 98765,
"consumerId": 13579,
"firstName": "Maria",
"lastName": "Rossi"
}