Get the logged-in customer with orders, subscriptions, membership and credit ledger
curl --request GET \
--url https://api.tagada.io/api/v1/portal/me \
--header 'x-cms-token: <api-key>'import requests
url = "https://api.tagada.io/api/v1/portal/me"
headers = {"x-cms-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-cms-token': '<api-key>'}};
fetch('https://api.tagada.io/api/v1/portal/me', 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.tagada.io/api/v1/portal/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-cms-token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.tagada.io/api/v1/portal/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-cms-token", "<api-key>")
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.tagada.io/api/v1/portal/me")
.header("x-cms-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/v1/portal/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-cms-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"customer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"createdAt": "2023-12-25",
"addresses": [
{
"id": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>",
"isDefault": true
}
],
"paymentMethods": [
{
"id": "<string>",
"brand": "<string>",
"last4": "<string>",
"expMonth": 6,
"expYear": 123,
"isDefault": true
}
],
"tags": [
"<string>"
]
},
"orders": [
{
"id": "<string>",
"number": "<string>",
"customerId": "<string>",
"createdAt": "2023-12-25",
"source": "checkout",
"subscriptionId": "<string>",
"currency": "<string>",
"financialStatus": "paid",
"fulfillmentStatus": "unfulfilled",
"lines": [
{
"productId": "<string>",
"variantId": "<string>",
"title": "<string>",
"variantTitle": "<string>",
"quantity": 2,
"unitPrice": 123,
"credits": 1
}
],
"subtotal": 123,
"discount": 123,
"shipping": 123,
"tax": 123,
"total": 123,
"creditsUsed": 1,
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"trackingNumber": "<string>"
}
],
"subscriptions": [
{
"id": "<string>",
"customerId": "<string>",
"status": "active",
"productId": "<string>",
"variantId": "<string>",
"optionId": "<string>",
"currency": "<string>",
"quantity": 2,
"price": 123,
"startedAt": "2023-12-25",
"nextBillingAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"pausedUntil": "2023-12-25",
"canceledAt": "2023-12-25",
"cancelReasonId": "<string>",
"skippedDates": [
"2023-12-25"
],
"lastPaymentFailedAt": "2023-12-25",
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"paidOrdersCount": 1,
"nextOrderAddOns": [
{
"productId": "<string>",
"variantId": "<string>",
"quantity": 2,
"unitPrice": 123
}
]
}
],
"membership": {
"id": "<string>",
"customerId": "<string>",
"programId": "<string>",
"status": "active",
"billing": "monthly",
"startedAt": "2023-12-25",
"renewsAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"graceEndsAt": "2023-12-25",
"canceledAt": "2023-12-25",
"creditsBalance": 1,
"savedToDate": 123,
"paymentMethodId": "<string>"
},
"creditLedger": [
{
"id": "<string>",
"customerId": "<string>",
"at": "2023-12-25",
"delta": 123,
"balanceAfter": 1,
"reason": "monthly-grant",
"label": "<string>",
"orderId": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}portal
Get the logged-in customer with orders, subscriptions, membership and credit ledger
Get the logged-in customer with orders, subscriptions, membership and credit ledger
GET
/
api
/
v1
/
portal
/
me
Get the logged-in customer with orders, subscriptions, membership and credit ledger
curl --request GET \
--url https://api.tagada.io/api/v1/portal/me \
--header 'x-cms-token: <api-key>'import requests
url = "https://api.tagada.io/api/v1/portal/me"
headers = {"x-cms-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-cms-token': '<api-key>'}};
fetch('https://api.tagada.io/api/v1/portal/me', 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.tagada.io/api/v1/portal/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-cms-token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.tagada.io/api/v1/portal/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-cms-token", "<api-key>")
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.tagada.io/api/v1/portal/me")
.header("x-cms-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/v1/portal/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-cms-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"customer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"createdAt": "2023-12-25",
"addresses": [
{
"id": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>",
"isDefault": true
}
],
"paymentMethods": [
{
"id": "<string>",
"brand": "<string>",
"last4": "<string>",
"expMonth": 6,
"expYear": 123,
"isDefault": true
}
],
"tags": [
"<string>"
]
},
"orders": [
{
"id": "<string>",
"number": "<string>",
"customerId": "<string>",
"createdAt": "2023-12-25",
"source": "checkout",
"subscriptionId": "<string>",
"currency": "<string>",
"financialStatus": "paid",
"fulfillmentStatus": "unfulfilled",
"lines": [
{
"productId": "<string>",
"variantId": "<string>",
"title": "<string>",
"variantTitle": "<string>",
"quantity": 2,
"unitPrice": 123,
"credits": 1
}
],
"subtotal": 123,
"discount": 123,
"shipping": 123,
"tax": 123,
"total": 123,
"creditsUsed": 1,
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"trackingNumber": "<string>"
}
],
"subscriptions": [
{
"id": "<string>",
"customerId": "<string>",
"status": "active",
"productId": "<string>",
"variantId": "<string>",
"optionId": "<string>",
"currency": "<string>",
"quantity": 2,
"price": 123,
"startedAt": "2023-12-25",
"nextBillingAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"pausedUntil": "2023-12-25",
"canceledAt": "2023-12-25",
"cancelReasonId": "<string>",
"skippedDates": [
"2023-12-25"
],
"lastPaymentFailedAt": "2023-12-25",
"paymentMethodId": "<string>",
"shippingAddressId": "<string>",
"paidOrdersCount": 1,
"nextOrderAddOns": [
{
"productId": "<string>",
"variantId": "<string>",
"quantity": 2,
"unitPrice": 123
}
]
}
],
"membership": {
"id": "<string>",
"customerId": "<string>",
"programId": "<string>",
"status": "active",
"billing": "monthly",
"startedAt": "2023-12-25",
"renewsAt": "2023-12-25",
"trialEndsAt": "2023-12-25",
"graceEndsAt": "2023-12-25",
"canceledAt": "2023-12-25",
"creditsBalance": 1,
"savedToDate": 123,
"paymentMethodId": "<string>"
},
"creditLedger": [
{
"id": "<string>",
"customerId": "<string>",
"at": "2023-12-25",
"delta": 123,
"balanceAfter": 1,
"reason": "monthly-grant",
"label": "<string>",
"orderId": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
CMS session JWT from /api/v1/cms/session/login. Customer account operations require an email-verified session; signed offer links accept an anonymous store session.
