curl --request PATCH \
--url https://www.crossmint.com/api/unstable/agent-checkouts/buyer-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"label": "Work"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shipping": {
"addressLines": [
"<string>"
],
"locality": "<string>",
"countryCode": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"phone": "<string>"
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}Update Buyer Profile
Update a buyer profile’s writable fields (any non-empty subset).
API scope required: agent-checkouts.buyer-profiles.update
curl --request PATCH \
--url https://www.crossmint.com/api/unstable/agent-checkouts/buyer-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"label": "Work"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shipping": {
"addressLines": [
"<string>"
],
"locality": "<string>",
"countryCode": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"phone": "<string>"
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}Authorizations
Client-side API key (ck_...) with the agent-checkouts.* scopes.
JWT identifying the end user, issued by an external auth provider your project trusts.
Path Parameters
The buyer profile id (returned by create).
Body
Partial update — provide at least one field. name and contact are replaced wholesale; shipping is merged field-by-field.
Optional human-readable label for the profile.
1 - 120Optional buyer name. Both parts are optional.
Show child attributes
Show child attributes
Optional buyer contact details.
Show child attributes
Show child attributes
Shipping fields to merge into the stored address. Provide at least one field; each provided field follows the same rules as on create.
Show child attributes
Show child attributes
Response
Returns the updated buyer profile.
The full buyer profile, returned by create, get, list items, and update.
The buyer profile id. Pass it as buyerProfileId when creating a checkout.
Global shipping address. administrativeAreaCode and postalCode are nullable for global-address compatibility.
Show child attributes
Show child attributes
Optional human-readable label for the profile.
1 - 120Optional buyer name. Both parts are optional.
Show child attributes
Show child attributes
Optional buyer contact details.
Show child attributes
Show child attributes
Was this page helpful?

