Get Customer
curl --request GET \
--url https://api.launchmystore.io/api/v1/customers/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/customers/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/customers/{id}.json', 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://api.launchmystore.io/api/v1/customers/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers/{id}.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/customers/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"customer": {
"id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"phone": "<string>",
"accepts_marketing": true,
"addresses": [
{}
],
"addresses_count": 123,
"default_address": {},
"orders": [
{}
],
"orders_count": 123,
"last_order": {},
"total_spent": "<string>",
"tags": [
{}
],
"tax_exempt": true,
"has_account": true,
"metafields": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}Customers
Get Customer
Retrieve a single customer by ID
GET
/
api
/
v1
/
customers
/
{id}
.json
Get Customer
curl --request GET \
--url https://api.launchmystore.io/api/v1/customers/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/customers/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/customers/{id}.json', 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://api.launchmystore.io/api/v1/customers/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers/{id}.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/customers/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"customer": {
"id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"phone": "<string>",
"accepts_marketing": true,
"addresses": [
{}
],
"addresses_count": 123,
"default_address": {},
"orders": [
{}
],
"orders_count": 123,
"last_order": {},
"total_spent": "<string>",
"tags": [
{}
],
"tax_exempt": true,
"has_account": true,
"metafields": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}Get Customer
Returns a single customer with full details including addresses and order history summary.Request
curl -X GET "https://api.launchmystore.io/api/v1/customers/cust_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
The unique customer ID
Response
Returns a top-levelcustomer object.
The customer object
Show Customer Object
Show Customer Object
Unique customer ID
Customer email
First name (parsed from the full name)
Last name (parsed from the full name)
Full name
Phone number
Marketing opt-in status
Array of customer addresses
Number of saved addresses
Default address (or
null)Array of the customer’s orders
Total number of orders
Most recent order (or
null)Total amount spent, as a decimal string
Customer tags
Whether customer is tax exempt
Whether the customer has a registered account
Custom data attached to the customer
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Example Response
{
"customer": {
"id": "cust_abc123",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"phone": "+1-555-123-4567",
"accepts_marketing": true,
"addresses": [
{
"id": "addr_123",
"first_name": "John",
"last_name": "Doe",
"company": "Acme Inc",
"address1": "123 Main St",
"address2": "Suite 100",
"city": "New York",
"province": "NY",
"province_code": "NY",
"country": "United States",
"country_code": "US",
"zip": "10001",
"phone": "+1-555-123-4567",
"default": true
}
],
"addresses_count": 1,
"default_address": {
"id": "addr_123",
"first_name": "John",
"last_name": "Doe",
"address1": "123 Main St",
"city": "New York",
"province": "NY",
"country": "United States",
"country_code": "US",
"zip": "10001",
"default": true
},
"orders": [],
"orders_count": 5,
"last_order": null,
"total_spent": "250.00",
"tags": [],
"tax_exempt": false,
"has_account": true,
"metafields": {},
"created_at": "2023-06-15T10:30:00.000Z",
"updated_at": "2024-01-20T14:45:00.000Z"
}
}
Errors
On failure anerrors object is returned with the failure messages under base:
{
"errors": {
"base": ["Customer not found"]
}
}
| Status | Condition |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have read_customers scope |
404 | Customer with the specified ID does not exist |
⌘I