Create a test account
curl --request POST \
--url https://{environment}.boltapp.com/v3/testing/accounts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Publishable-Key: <x-publishable-key>' \
--data '
{
"email_state": "unverified",
"phone_state": "verified",
"is_migrated": true,
"has_address": true,
"has_credit_card": true
}
'import requests
url = "https://{environment}.boltapp.com/v3/testing/accounts"
payload = {
"email_state": "unverified",
"phone_state": "verified",
"is_migrated": True,
"has_address": True,
"has_credit_card": True
}
headers = {
"X-Publishable-Key": "<x-publishable-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Publishable-Key': '<x-publishable-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email_state: 'unverified',
phone_state: 'verified',
is_migrated: true,
has_address: true,
has_credit_card: true
})
};
fetch('https://{environment}.boltapp.com/v3/testing/accounts', 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://{environment}.boltapp.com/v3/testing/accounts",
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([
'email_state' => 'unverified',
'phone_state' => 'verified',
'is_migrated' => true,
'has_address' => true,
'has_credit_card' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Publishable-Key: <x-publishable-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://{environment}.boltapp.com/v3/testing/accounts"
payload := strings.NewReader("{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Publishable-Key", "<x-publishable-key>")
req.Header.Add("X-API-Key", "<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://{environment}.boltapp.com/v3/testing/accounts")
.header("X-Publishable-Key", "<x-publishable-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.boltapp.com/v3/testing/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Publishable-Key"] = '<x-publishable-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}"
response = http.request(request)
puts response.read_body{
"email": "alice@example.com",
"email_state": "unverified",
"phone": "+14155550199",
"phone_state": "verified",
"otp_code": "123456",
"oauth_code": "7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms"
}{
".tag": "unprocessable_request",
"message": "We were unable to process your request."
}Testing
Create a test account
Create a Bolt shopper account for testing purposes.
POST
/
testing
/
accounts
Create a test account
curl --request POST \
--url https://{environment}.boltapp.com/v3/testing/accounts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Publishable-Key: <x-publishable-key>' \
--data '
{
"email_state": "unverified",
"phone_state": "verified",
"is_migrated": true,
"has_address": true,
"has_credit_card": true
}
'import requests
url = "https://{environment}.boltapp.com/v3/testing/accounts"
payload = {
"email_state": "unverified",
"phone_state": "verified",
"is_migrated": True,
"has_address": True,
"has_credit_card": True
}
headers = {
"X-Publishable-Key": "<x-publishable-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Publishable-Key': '<x-publishable-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email_state: 'unverified',
phone_state: 'verified',
is_migrated: true,
has_address: true,
has_credit_card: true
})
};
fetch('https://{environment}.boltapp.com/v3/testing/accounts', 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://{environment}.boltapp.com/v3/testing/accounts",
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([
'email_state' => 'unverified',
'phone_state' => 'verified',
'is_migrated' => true,
'has_address' => true,
'has_credit_card' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Publishable-Key: <x-publishable-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://{environment}.boltapp.com/v3/testing/accounts"
payload := strings.NewReader("{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Publishable-Key", "<x-publishable-key>")
req.Header.Add("X-API-Key", "<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://{environment}.boltapp.com/v3/testing/accounts")
.header("X-Publishable-Key", "<x-publishable-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.boltapp.com/v3/testing/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Publishable-Key"] = '<x-publishable-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_state\": \"unverified\",\n \"phone_state\": \"verified\",\n \"is_migrated\": true,\n \"has_address\": true,\n \"has_credit_card\": true\n}"
response = http.request(request)
puts response.read_body{
"email": "alice@example.com",
"email_state": "unverified",
"phone": "+14155550199",
"phone_state": "verified",
"otp_code": "123456",
"oauth_code": "7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms"
}{
".tag": "unprocessable_request",
"message": "We were unable to process your request."
}Authorizations
Headers
The publicly shareable identifier used to identify your Bolt merchant division.
Body
application/json
Available options:
missing, unverified, verified Example:
"unverified"
Available options:
missing, unverified, verified Example:
"verified"
Example:
true
Example:
true
Example:
true
Response
The account was successfully created
Example:
"alice@example.com"
Available options:
missing, unverified, verified Example:
"unverified"
Example:
"+14155550199"
Available options:
missing, unverified, verified Example:
"verified"
Example:
"123456"
Example:
"7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms"