curl --request POST \
--url https://api.komerza.com/stores/{storeId}/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emailAddress": "jsmith@example.com"
}
'import requests
url = "https://api.komerza.com/stores/{storeId}/customers"
payload = { "emailAddress": "jsmith@example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({emailAddress: 'jsmith@example.com'})
};
fetch('https://api.komerza.com/stores/{storeId}/customers', 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.komerza.com/stores/{storeId}/customers",
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([
'emailAddress' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.komerza.com/stores/{storeId}/customers"
payload := strings.NewReader("{\n \"emailAddress\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.komerza.com/stores/{storeId}/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emailAddress\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komerza.com/stores/{storeId}/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emailAddress\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"code": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"emailAddress": "<string>",
"ipAddress": "<string>",
"storeData": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"balance": 123,
"externalIntegrations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"accountId": "<string>",
"platformId": "<string>",
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"tickets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"subject": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "<string>",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"name": "<string>",
"message": "<string>",
"ticketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"subscriptions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerStoreDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"currencyCode": "<string>",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"pauseCount": 123,
"gateway": "<string>",
"autoRenew": true,
"failedPaymentCount": 123,
"customIntervalDays": 123,
"canceledAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z",
"pauseResumeDate": "2023-11-07T05:31:56Z",
"gatewaySubscriptionId": "<string>",
"gatewayCustomerId": "<string>",
"lastPaymentFailureDate": "2023-11-07T05:31:56Z",
"nextRetryDate": "2023-11-07T05:31:56Z",
"lastReminderSentAt": "2023-11-07T05:31:56Z",
"metadataJson": "<string>"
}
],
"gatewayCustomerIds": {},
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": "<unknown>",
"isBlocked": true,
"ipAddress": "<string>",
"affiliate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isEnabled": true,
"link": "<string>",
"balance": 123,
"returnPercentage": 123,
"percentageOff": 123
},
"stripeCustomerId": "<string>",
"mollieCustomerId": "<string>",
"marketingOptions": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"isEnabled": true,
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerStoreDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disabledAt": "2023-11-07T05:31:56Z",
"consentSource": "<string>",
"consentTimestamp": "2023-11-07T05:31:56Z",
"consentIpAddress": "<string>",
"consentWithdrawnAt": "2023-11-07T05:31:56Z"
},
"blockedNote": "<string>",
"blockedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}Create Customer
Registers a customer for the store using their email.
If the customer already exists and is linked to the store, a 409 conflict is returned.
Requires the stores.customers.create permission.
curl --request POST \
--url https://api.komerza.com/stores/{storeId}/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emailAddress": "jsmith@example.com"
}
'import requests
url = "https://api.komerza.com/stores/{storeId}/customers"
payload = { "emailAddress": "jsmith@example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({emailAddress: 'jsmith@example.com'})
};
fetch('https://api.komerza.com/stores/{storeId}/customers', 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.komerza.com/stores/{storeId}/customers",
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([
'emailAddress' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.komerza.com/stores/{storeId}/customers"
payload := strings.NewReader("{\n \"emailAddress\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.komerza.com/stores/{storeId}/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emailAddress\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komerza.com/stores/{storeId}/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emailAddress\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"code": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"emailAddress": "<string>",
"ipAddress": "<string>",
"storeData": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"balance": 123,
"externalIntegrations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"accountId": "<string>",
"platformId": "<string>",
"expirationDate": "2023-11-07T05:31:56Z"
}
],
"tickets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"subject": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "<string>",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"name": "<string>",
"message": "<string>",
"ticketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"subscriptions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerStoreDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"currencyCode": "<string>",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"pauseCount": 123,
"gateway": "<string>",
"autoRenew": true,
"failedPaymentCount": 123,
"customIntervalDays": 123,
"canceledAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z",
"pauseResumeDate": "2023-11-07T05:31:56Z",
"gatewaySubscriptionId": "<string>",
"gatewayCustomerId": "<string>",
"lastPaymentFailureDate": "2023-11-07T05:31:56Z",
"nextRetryDate": "2023-11-07T05:31:56Z",
"lastReminderSentAt": "2023-11-07T05:31:56Z",
"metadataJson": "<string>"
}
],
"gatewayCustomerIds": {},
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": "<unknown>",
"isBlocked": true,
"ipAddress": "<string>",
"affiliate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isEnabled": true,
"link": "<string>",
"balance": 123,
"returnPercentage": 123,
"percentageOff": 123
},
"stripeCustomerId": "<string>",
"mollieCustomerId": "<string>",
"marketingOptions": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"isEnabled": true,
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerStoreDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disabledAt": "2023-11-07T05:31:56Z",
"consentSource": "<string>",
"consentTimestamp": "2023-11-07T05:31:56Z",
"consentIpAddress": "<string>",
"consentWithdrawnAt": "2023-11-07T05:31:56Z"
},
"blockedNote": "<string>",
"blockedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}Authorizations
Your API key goes here
Path Parameters
ID of the store.
Body
Customer email payload.
Represents a form for creating customer data, inheriting email validation functionality.
Represents the email address associated with the form.
1 - 256Response
The object was successfully created.
Represents a default generic response for API endpoints.
Indicates whether the operation or response was successful.
A descriptive message providing additional context or information about the response.
The error code (if there was an error) to use when referencing the error
Represents a customer registered at Komerza globally
Show child attributes
Show child attributes