curl --request PATCH \
--url https://api.farthing.ai/v1/buyer-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping": {
"addressLines": [
"221B Baker Street"
],
"locality": "London",
"postalCode": "NW1 6XE",
"countryCode": "GB"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"subject": "user_a91f",
"name": {},
"contact": {},
"shipping": {},
"createdAt": "2023-11-07T05:31:56Z"
}Update a buyer profile
Partial at the top level, wholesale underneath. name, contact and shipping are each stored as one JSON document: omit a key and that document is untouched; supply one and it replaces the old document entirely.
That is deliberate. Merging half an address into an old one is how you ship a parcel to a street in the wrong city — so send a whole shipping object or none at all.
An empty body is a 400, not a no-op. Send "shipping": null to clear a document outright — which is how an address you no longer want held is removed short of deleting the whole profile. {} stores an empty object instead, which is a different thing.
Requires the buyer-profiles.write scope.
curl --request PATCH \
--url https://api.farthing.ai/v1/buyer-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping": {
"addressLines": [
"221B Baker Street"
],
"locality": "London",
"postalCode": "NW1 6XE",
"countryCode": "GB"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"subject": "user_a91f",
"name": {},
"contact": {},
"shipping": {},
"createdAt": "2023-11-07T05:31:56Z"
}Authorizations
Authorization: Bearer ck_test_… or ck_live_…. There is no other auth scheme — no query-string keys, no request signing, no OAuth.
Path Parameters
Body
Partial at the top level only: omit a key and that document is untouched, supply one and it is replaced wholesale. There is no deep merge. null clears a document outright.
Strict: any key outside these four — subject in particular — is a 400 rather than a silently dropped field, because a caller trying to move a profile to another end user should be told it did not happen.
Yours, for bookkeeping. Never sent to a merchant. null clears it.
Also used as the cardholder name at the payment step, which is why the card action never asks for one.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Updated. The full profile.
Your own id for the end user this profile belongs to, or null when it is not tagged to one. Always present — unlike a checkout, which omits the field entirely. Fixed at creation.
"user_a91f"
null when never supplied — not {}.