HydraCore
API by router

Customers

List Customers

GET
/v1/customers

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

page?Page

Page number

Range1 <= value
Default1
per_page?Per Page

Items per page

Range1 <= value <= 100
Default20
search?Search

Search by email

Default""
sort_by?Sort By

Sort field

Default"created_at"
sort_dir?Sort Dir

Sort direction: asc or desc

Default"desc"

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Paginated customer list response. "Here's looking at you, kid." - Rick Blaine, Casablanca

customers*array<>
page*Page
per_page*Per Page
total*Total
total_pages*Total Pages
Example Request
curl -X GET 'https://example.com/v1/customers'
Example Response
{  "customers": [    {      "active_subscription_count": 0,      "company_name": "string",      "country_code": "string",      "created_at": "2019-08-24T14:15:22Z",      "currency": "string",      "email": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "instance_count": 0,      "latest_subscription_status": "string",      "running_instance_count": 0,      "subscription_count": 0,      "timezone": "string"    }  ],  "page": 0,  "per_page": 0,  "total": 0,  "total_pages": 0}

Create Customer

POST
/v1/customers

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body

Create a new end-customer for the tenant.

company_name?string|null
country_code?string|null
currency?string|null
email?string|null
industry?string|null
locale?string|null
timezone?string|null

Response Body

Successful Response

application/json
  1. response
company_name?string|null
created_at*Created At
Formatdate-time
email?string|null
id*Id
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/customers' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "company_name": "string",  "created_at": "2019-08-24T14:15:22Z",  "email": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"}

Get Customer

GET
/v1/customers/{customer_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Extended customer detail with subscriptions and instances. "Show me the money!" — Rod Tidwell, Jerry Maguire

active_subscription_count?Active Subscription Count
Default0
company_name?string|null
country_code?string|null
created_at*Created At
Formatdate-time
currency?string|null
email?string|null
id*Id
Formatuuid
instance_count?Instance Count
Default0
instances?array<>
Default[]
latest_subscription_status?string|null
locale?string|null
running_instance_count?Running Instance Count
Default0
stripe_customer_id?string|null
subscription_count?Subscription Count
Default0
subscriptions?array<>
Default[]
timezone?string|null
updated_at*Updated At
Formatdate-time
Example Request
curl -X GET 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "active_subscription_count": 0,  "company_name": "string",  "country_code": "string",  "created_at": "2019-08-24T14:15:22Z",  "currency": "string",  "email": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_count": 0,  "instances": [],  "latest_subscription_status": "string",  "locale": "string",  "running_instance_count": 0,  "stripe_customer_id": "string",  "subscription_count": 0,  "subscriptions": [],  "timezone": "string",  "updated_at": "2019-08-24T14:15:22Z"}

Clone Customer Setup

POST
/v1/customers/{customer_id}/clone

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
clone_rules?Clone Rules
Defaulttrue
company_name*Company Name
Lengthlength <= 200
email?string|null
source_customer_id*Source Customer Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
company_name?string|null
created_at*Created At
Formatdate-time
email?string|null
id*Id
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/clone' \  -H 'Content-Type: application/json' \  -d '{  "company_name": "string",  "source_customer_id": "22f9e5e1-5129-4cc7-9d8d-1248b092e05b"}'
Example Response
{  "company_name": "string",  "created_at": "2019-08-24T14:15:22Z",  "email": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"}