Skip to main content
GET
/
v1
/
customers
List Customers
curl --request GET \
  --url https://api.ecrypt.com/v1/customers \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.ecrypt.com/v1/customers"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.ecrypt.com/v1/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.ecrypt.com/v1/customers",
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-api-key: <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.ecrypt.com/v1/customers"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<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.ecrypt.com/v1/customers")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ecrypt.com/v1/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "requestId": "000000000000000000000",
  "customers": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "firstName": "John",
      "lastName": "Doe",
      "company": "US Oil Supply",
      "merchantIdentifier": "EID-987654-321",
      "phoneNumber": "555-555-555",
      "emailAddress": "email@email.com",
      "shippingAddress": {
        "name": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "postalCode": "<string>",
        "country": "<string>"
      },
      "metadata": {}
    }
  ],
  "errors": [
    {
      "type": "<string>",
      "message": "<unknown>"
    }
  ]
}
{
"requestId": "000000000000000000000",
"errors": [
{
"type": "<string>",
"message": "<unknown>"
}
]
}

Authorizations

x-api-key
string
header
required

Authorization by x-api-key inside request's header

Query Parameters

Page
integer<int32>

Page of results being requested.

Default: 1

Required range: 1 <= x <= 2147483647
Example:

1

Size
integer<int32>

Size of the page of results being requested.

Default: 100

Required range: 1 <= x <= 100
Example:

100

Response

object | null

OK

requestId
string
default:000000000000000000000
required
Required string length: 1 - 100
customers
(object | null)[] | null
errors
(object | null)[] | null