curl --request POST \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"shipping": {
"addressLines": [
"<string>"
],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}
'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles"
payload = {
"shipping": {
"addressLines": ["<string>"],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipping: {
addressLines: ['<string>'],
countryCode: '<string>',
locality: '<string>',
administrativeAreaCode: '<string>',
postalCode: '<string>'
},
contact: {email: '<string>', phone: '<string>'},
label: '<string>',
name: {first: '<string>', last: '<string>'}
})
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shipping' => [
'addressLines' => [
'<string>'
],
'countryCode' => '<string>',
'locality' => '<string>',
'administrativeAreaCode' => '<string>',
'postalCode' => '<string>'
],
'contact' => [
'email' => '<string>',
'phone' => '<string>'
],
'label' => '<string>',
'name' => [
'first' => '<string>',
'last' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles"
payload := strings.NewReader("{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "<string>",
"shipping": {
"addressLines": [
"<string>"
],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"updatedAt": "<string>",
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}Create Buyer Profile
Create a subject-scoped buyer profile (buyer identity + global shipping address) that Universal Checkout can prefill during a checkout run. Payment data is never stored.
API scope required: agent-checkouts.buyer-profiles.create
curl --request POST \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"shipping": {
"addressLines": [
"<string>"
],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}
'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles"
payload = {
"shipping": {
"addressLines": ["<string>"],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipping: {
addressLines: ['<string>'],
countryCode: '<string>',
locality: '<string>',
administrativeAreaCode: '<string>',
postalCode: '<string>'
},
contact: {email: '<string>', phone: '<string>'},
label: '<string>',
name: {first: '<string>', last: '<string>'}
})
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shipping' => [
'addressLines' => [
'<string>'
],
'countryCode' => '<string>',
'locality' => '<string>',
'administrativeAreaCode' => '<string>',
'postalCode' => '<string>'
],
'contact' => [
'email' => '<string>',
'phone' => '<string>'
],
'label' => '<string>',
'name' => [
'first' => '<string>',
'last' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles"
payload := strings.NewReader("{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/buyer-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipping\": {\n \"addressLines\": [\n \"<string>\"\n ],\n \"countryCode\": \"<string>\",\n \"locality\": \"<string>\",\n \"administrativeAreaCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"contact\": {\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"name\": {\n \"first\": \"<string>\",\n \"last\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "<string>",
"shipping": {
"addressLines": [
"<string>"
],
"countryCode": "<string>",
"locality": "<string>",
"administrativeAreaCode": "<string>",
"postalCode": "<string>"
},
"updatedAt": "<string>",
"contact": {
"email": "<string>",
"phone": "<string>"
},
"label": "<string>",
"name": {
"first": "<string>",
"last": "<string>"
}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}Headers
Server-side auth only: the subject to act on behalf of, namespaced under the key's project. Defaults to a fixed service subject when omitted. Ignored for client-side (JWT) auth, where the subject comes from the token.
Client-side auth only: Bearer <JWT> for the end user (validated against the project's external JWT config).
Project API key. Either a client-side key (paired with Authorization: Bearer <JWT>) or a server-side key.
Body
Response
The buyer profile was created.
1^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
1Show child attributes
Show child attributes
1 - 120Show child attributes
Show child attributes
Was this page helpful?

