Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: stax-api Customer API
version: '0.1'
servers:
- url: https://apiprod.fattlabs.com/
security:
- ApiKeyAuth: []
tags:
- name: Customer
paths:
/customer:
post:
summary: Create Customer
description: Create and store customer records tied to their merchant accounts.
operationId: create-customer
requestBody:
content:
application/json:
schema:
type: object
properties:
firstname:
type: string
description: 'Max: 255. Required if no lastname, email, company supplied'
lastname:
type: string
description: 'Max: 255. Required if no firstname, email, company supplied'
email:
type: string
description: 'Max: 255. Required if no firstname, lastname, company supplied'
company:
type: string
description: 'Max: 255. Required if no firstname, lastname, email supplied'
phone:
type: string
description: 'Matching regex: /[0-9]{10,15}/'
address_1:
type: string
description: 'Max: 255'
address_2:
type: string
description: 'Max: 255'
address_city:
type: string
description: 'Max: 255'
address_state:
type: string
description: 'Max: 2 Use the two-letter state abbreviation.'
address_zip:
type: string
description: 'Max: 16'
address_country:
type: string
description: 'Max: 3'
notes:
type: string
description: 'Max: 21844. For internal notes only; not visible to customers in invoices or communications.'
reference:
type: string
description: 'Max: 255. This field is for the merchant''s internal use.'
files:
type: array
description: Array of strings(50) where each index is a valid file_id
items:
type: string
cc_emails:
type: array
description: Array of strings(255) where each index is a valid email address.
items:
type: string
cc_sms:
type: array
description: Array of strings(255) where each item is a valid phone number.
items:
type: string
allow_invoice_credit_card_payments:
type: boolean
options:
type: object
description: Additional customer options such as custom fields
properties:
customer_custom_fields:
type: array
items:
properties:
id:
type: string
description: Unique identifier for the custom field
name:
type: string
description: Display name of the custom field
placeholder:
type: string
description: Placeholder text for the field (can be empty)
required:
type: boolean
description: Whether the field is required
visible:
type: boolean
description: Whether the field is visible in the UI
type:
type: string
enum:
- text
description: The data type of the field value
value:
type: string
description: The actual value stored in the custom field
type: object
description: An array of custom field objects that contain additional customer information.
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value:
id: 59327746-fbca-4fb6-adf0-e88c99245548
firstname: John
lastname: Smith
company: ABC INC
email: contact@example.com
cc_emails:
- demo@abc.com
phone: '1234567898'
address_1: 123 Rite Way
address_2: Unit 12
address_city: Orlando
address_state: FL
address_zip: '32801'
address_country: USA
notes: null
reference: BARTLE
options:
customer_custom_fields:
- id: 95b5-fce4-08e6-e60b-c26e
name: Intenal ID
placeholder: Add an internal tracking ID
required: false
visible: true
type: text
value: '0123456'
created_at: '2017-05-08 19:13:41'
updated_at: '2017-05-08 19:13:41'
deleted_at: null
gravatar: //www.gravatar.com/avatar/45357c125af15b6df8864a71a653bea2
has_address: true
missing_address_components: []
schema:
type: object
properties:
id:
type: string
example: 59327746-fbca-4fb6-adf0-e88c99245548
firstname:
type: string
example: John
lastname:
type: string
example: Smith
company:
type: string
example: ABC INC
email:
type: string
example: contact@example.com
cc_emails:
type: array
items:
type: string
example: demo@abc.com
phone:
type: string
example: '1234567898'
address_1:
type: string
example: 123 Rite Way
address_2:
type: string
example: Unit 12
address_city:
type: string
example: Orlando
address_state:
type: string
example: FL
address_zip:
type: string
example: '32801'
address_country:
type: string
example: USA
notes: {}
reference:
type: string
example: BARTLE
options: {}
created_at:
type: string
example: '2017-05-08 19:13:41'
updated_at:
type: string
example: '2017-05-08 19:13:41'
deleted_at: {}
gravatar:
type: string
example: //www.gravatar.com/avatar/45357c125af15b6df8864a71a653bea2
has_address:
type: boolean
example: true
default: true
missing_address_components:
type: array
'422':
description: '422'
content:
application/json:
examples:
Result:
value: "{\n \"firstname\": [\n \"The firstname field is required when none of lastname / email / company are present.\"\n ],\n \"lastname\": [\n \"The lastname field is required when none of firstname / email / company are present.\"\n ],\n \"email\": [\n \"The email field is required when none of firstname / lastname / company are present.\"\n ],\n \"company\": [\n \"The company field is required when none of firstname / lastname / email are present.\"\n ]\n}"
schema:
type: object
properties:
firstname:
type: array
items:
type: string
example: The firstname field is required when none of lastname / email / company are present.
lastname:
type: array
items:
type: string
example: The lastname field is required when none of firstname / email / company are present.
email:
type: array
items:
type: string
example: The email field is required when none of firstname / lastname / company are present.
company:
type: array
items:
type: string
example: The company field is required when none of firstname / lastname / email are present.
tags:
- Customer
get:
summary: Find all Customer
description: Retrieve a list of customers associated with a merchant's account.
operationId: find-all-customers
parameters:
- name: firstname
in: query
description: 'Max: 255. Required if no lastname, email, company supplied'
schema:
type: string
- name: lastname
in: query
description: 'Max: 255. Required if no firstname, email, company supplied'
schema:
type: string
- name: email
in: query
description: 'Max: 255. Required if no firstname, lastname, company supplied'
schema:
type: string
- name: company
in: query
description: 'Max: 255. Required if no firstname, lastname, email supplied'
schema:
type: string
- name: phone
in: query
description: 'Matching regex: /[0-9]{10,15}/'
schema:
type: string
- name: address_1
in: query
description: 'Max: 255'
schema:
type: string
- name: address_2
in: query
description: 'Max: 255'
schema:
type: string
- name: address_city
in: query
description: 'Max: 255'
schema:
type: string
- name: address_state
in: query
description: 'Max: 2'
schema:
type: string
- name: address_zip
in: query
description: 'Max: 16'
schema:
type: string
- name: address_country
in: query
description: 'Max: 3'
schema:
type: string
- name: notes
in: query
description: 'Max: 21844. For internal notes only; not visible to customers in invoices or communications.'
schema:
type: string
- name: reference
in: query
description: 'Max: 255. This field is for the merchant''s internal use.'
schema:
type: string
- name: files
in: query
description: Array of strings(50) where each index is a valid file_id
schema:
type: array
items:
type: string
- name: cc_emails
in: query
description: Array of strings(255) where each index is a valid email address
schema:
type: array
items:
type: string
- name: cc_sms
in: query
description: Array of strings(255) where each index is a valid email address
schema:
type: array
items:
type: string
- name: allow_invoice_credit_card_payments
in: query
schema:
type: boolean
- name: keywords[]
in: query
schema:
type: array
items:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"total\": 2,\n \"per_page\": 50,\n \"current_page\": 1,\n \"last_page\": 1,\n \"next_page_url\": null,\n \"prev_page_url\": null,\n \"from\": 1,\n \"to\": 2,\n \"data\": [\n {\n \"id\": \"5ff4e048-c9f3-4993-81be-f7253d132c19\",\n \"firstname\": \"John\",\n \"lastname\": \"Smith\",\n \"company\": \"ABC INC\",\n \"email\": \"john@abc.com\",\n \"cc_emails\": null,\n \"phone\": \"1234567898\",\n \"address_1\": \"123 Rite Way\",\n \"address_2\": \"Unit 12\",\n \"address_city\": \"Orlando\",\n \"address_state\": \"FL\",\n \"address_zip\": \"32801\",\n \"address_country\": \"USA\",\n \"notes\": \"\",\n \"reference\": \"\",\n \"options\": null,\n \"created_at\": \"2016-04-26 13:52:10\",\n \"updated_at\": \"2016-04-26 13:52:10\",\n \"deleted_at\": null,\n \"gravatar\": \"//www.gravatar.com/avatar/144fa42eb34883ecb00cbc3f81a060a1\",\n \"has_address\": true,\n \"missing_address_components\": []\n },\n {\n \"id\": \"c20db54e-4078-46d9-9c09-2287612c8840\",\n \"firstname\": \"John\",\n \"lastname\": \"Smith\",\n \"company\": \"ABC INC\",\n \"email\": \"john@abc.com\",\n \"cc_emails\": null,\n \"phone\": \"1234567898\",\n \"address_1\": \"123 Rite Way\",\n \"address_2\": \"Unit 12\",\n \"address_city\": \"Orlando\",\n \"address_state\": \"FL\",\n \"address_zip\": \"32801\",\n \"notes\": \"\",\n \"reference\": \"\",\n \"options\": null,\n \"created_at\": \"2016-04-25 15:24:03\",\n \"updated_at\": \"2016-04-25 15:24:03\",\n \"deleted_at\": null,\n \"gravatar\": \"//www.gravatar.com/avatar/144fa42eb34883ecb00cbc3f81a060a1\",\n \"has_address\": true,\n \"missing_address_components\": []\n }\n ]\n}"
schema:
type: object
properties:
total:
type: integer
example: 2
default: 0
per_page:
type: integer
example: 50
default: 0
current_page:
type: integer
example: 1
default: 0
last_page:
type: integer
example: 1
default: 0
next_page_url: {}
prev_page_url: {}
from:
type: integer
example: 1
default: 0
to:
type: integer
example: 2
default: 0
data:
type: array
items:
type: object
properties:
id:
type: string
example: 5ff4e048-c9f3-4993-81be-f7253d132c19
firstname:
type: string
example: John
lastname:
type: string
example: Smith
company:
type: string
example: ABC INC
email:
type: string
example: john@abc.com
cc_emails: {}
phone:
type: string
example: '1234567898'
address_1:
type: string
example: 123 Rite Way
address_2:
type: string
example: Unit 12
address_city:
type: string
example: Orlando
address_state:
type: string
example: FL
address_zip:
type: string
example: '32801'
address_country:
type: string
example: USA
notes:
type: string
example: ''
reference:
type: string
example: ''
options: {}
created_at:
type: string
example: '2016-04-26 13:52:10'
updated_at:
type: string
example: '2016-04-26 13:52:10'
deleted_at: {}
gravatar:
type: string
example: //www.gravatar.com/avatar/144fa42eb34883ecb00cbc3f81a060a1
has_address:
type: boolean
example: true
default: true
missing_address_components:
type: array
deprecated: false
tags:
- Customer
/customer/{id}:
delete:
summary: Delete a Customer
description: To soft delete a customer
operationId: delete-a-customer
parameters:
- name: id
in: path
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"d45ee88c-8b27-4be8-8d81-77dda1b81826\",\n \"firstname\": \"John\",\n \"lastname\": \"Smith\",\n \"company\": \"ABC INC\",\n \"email\": \"demo@abc.com\",\n \"cc_emails\": [\n \"demo1@abc.com\",\n \"demo2@abc.com\"\n ],\n \"phone\": \"1234567898\",\n \"address_1\": \"123 Rite Way\",\n \"address_2\": \"Unit 12\",\n \"address_city\": \"Orlando\",\n \"address_state\": \"FL\",\n \"address_zip\": \"32801\",\n \"address_country\": \"USA\",\n \"notes\": null,\n \"reference\": \"BARTLE\",\n \"options\": null,\n \"created_at\": \"2017-05-08 19:22:51\",\n \"updated_at\": \"2017-05-08 19:23:46\",\n \"deleted_at\": \"2020-03-29 15:46:00\",\n \"gravatar\": \"//www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061\",\n \"has_address\": true,\n \"missing_address_components\": []\n}"
schema:
type: object
properties:
id:
type: string
example: d45ee88c-8b27-4be8-8d81-77dda1b81826
firstname:
type: string
example: John
lastname:
type: string
example: Smith
company:
type: string
example: ABC INC
email:
type: string
example: demo@abc.com
cc_emails:
type: array
items:
type: string
example: demo1@abc.com
phone:
type: string
example: '1234567898'
address_1:
type: string
example: 123 Rite Way
address_2:
type: string
example: Unit 12
address_city:
type: string
example: Orlando
address_state:
type: string
example: FL
address_zip:
type: string
example: '32801'
address_country:
type: string
example: USA
notes: {}
reference:
type: string
example: BARTLE
options: {}
created_at:
type: string
example: '2017-05-08 19:22:51'
updated_at:
type: string
example: '2017-05-08 19:23:46'
deleted_at:
type: string
example: '2020-03-29 15:46:00'
gravatar:
type: string
example: //www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061
has_address:
type: boolean
example: true
default: true
missing_address_components:
type: array
'422':
description: '422'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"customer not found\"\n}"
schema:
type: object
properties:
id:
type: string
example: customer not found
deprecated: false
tags:
- Customer
get:
summary: Get a Customer's Information
description: Retrieves detailed information about a specific customer using their unique ID
operationId: get-a-customers-information
parameters:
- name: id
in: path
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"d45ee88c-8b27-4be8-8d81-77dda1b81826\",\n \"firstname\": \"John\",\n \"lastname\": \"Smith\",\n \"company\": \"ABC INC\",\n \"email\": \"contact@example.com\",\n \"cc_emails\": [\n \"demo@abc.com\"\n ],\n \"phone\": \"1234567898\",\n \"address_1\": \"123 Rite Way\",\n \"address_2\": \"Unit 12\",\n \"address_city\": \"Orlando\",\n \"address_state\": \"FL\",\n \"address_zip\": \"32801\",\n \"address_country\": \"USA\",\n \"notes\": null,\n \"reference\": \"BARTLE\",\n \"options\": null,\n \"created_at\": \"2017-05-08 19:22:51\",\n \"updated_at\": \"2017-05-08 19:22:51\",\n \"deleted_at\": null,\n \"gravatar\": \"//www.gravatar.com/avatar/45357c125af15b6df8864a71a653bea2\",\n \"has_address\": true,\n \"missing_address_components\": []\n}"
schema:
type: object
properties:
id:
type: string
example: d45ee88c-8b27-4be8-8d81-77dda1b81826
firstname:
type: string
example: John
lastname:
type: string
example: Smith
company:
type: string
example: ABC INC
email:
type: string
example: contact@example.com
cc_emails:
type: array
items:
type: string
example: demo@abc.com
phone:
type: string
example: '1234567898'
address_1:
type: string
example: 123 Rite Way
address_2:
type: string
example: Unit 12
address_city:
type: string
example: Orlando
address_state:
type: string
example: FL
address_zip:
type: string
example: '32801'
address_country:
type: string
example: USA
notes: {}
reference:
type: string
example: BARTLE
options: {}
created_at:
type: string
example: '2017-05-08 19:22:51'
updated_at:
type: string
example: '2017-05-08 19:22:51'
deleted_at: {}
gravatar:
type: string
example: //www.gravatar.com/avatar/45357c125af15b6df8864a71a653bea2
has_address:
type: boolean
example: true
default: true
missing_address_components:
type: array
'404':
description: '404'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"customer not found\"\n}"
schema:
type: object
properties:
id:
type: string
example: customer not found
deprecated: false
tags:
- Customer
put:
summary: Update Customer Information
description: Modify an existing customer record in your merchant account.
operationId: update-customer-info
parameters:
- name: id
in: path
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"d45ee88c-8b27-4be8-8d81-77dda1b81826\",\n \"firstname\": \"John\",\n \"lastname\": \"Smith\",\n \"company\": \"ABC INC\",\n \"email\": \"demo@abc.com\",\n \"cc_emails\": [\n \"demo1@abc.com\",\n \"demo2@abc.com\"\n ],\n \"phone\": \"1234567898\",\n \"address_1\": \"123 Rite Way\",\n \"address_2\": \"Unit 12\",\n \"address_city\": \"Orlando\",\n \"address_state\": \"FL\",\n \"address_zip\": \"32801\",\n \"address_country\": \"USA\",\n \"notes\": null,\n \"reference\": \"BARTLE\",\n \"options\": null,\n \"created_at\": \"2017-05-08 19:22:51\",\n \"updated_at\": \"2017-05-08 19:23:46\",\n \"deleted_at\": null,\n \"gravatar\": \"//www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061\",\n \"has_address\": true,\n \"missing_address_components\": []\n}"
schema:
type: object
properties:
id:
type: string
example: d45ee88c-8b27-4be8-8d81-77dda1b81826
firstname:
type: string
example: John
lastname:
type: string
example: Smith
company:
type: string
example: ABC INC
email:
type: string
example: demo@abc.com
cc_emails:
type: array
items:
type: string
example: demo1@abc.com
phone:
type: string
example: '1234567898'
address_1:
type: string
example: 123 Rite Way
address_2:
type: string
example: Unit 12
address_city:
type: string
example: Orlando
address_state:
type: string
example: FL
address_zip:
type: string
example: '32801'
address_country:
type: string
example: USA
notes: {}
reference:
type: string
example: BARTLE
options: {}
created_at:
type: string
example: '2017-05-08 19:22:51'
updated_at:
type: string
example: '2017-05-08 19:23:46'
deleted_at: {}
gravatar:
type: string
example: //www.gravatar.com/avatar/fe3e929dd80f1653c3a4b82812660061
has_address:
type: boolean
example: true
default: true
missing_address_components:
type: array
'422':
description: '422'
content:
application/json:
examples:
Result:
value: "{\n \"firstname\": [\n \"The firstname field is required when none of lastname / email / company are present.\"\n ],\n \"lastname\": [\n \"The lastname field is required when none of firstname / email / company are present.\"\n ],\n \"email\": [\n \"The email field is required when none of firstname / lastname / company are present.\"\n ],\n \"company\": [\n \"The company field is required when none of firstname / lastname / email are present.\"\n ]\n}"
schema:
type: object
properties:
firstname:
type: array
items:
type: string
example: The firstname field is required when none of lastname / email / company are present.
lastname:
type: array
items:
type: string
example: The lastname field is required when none of firstname / email / company are present.
email:
type: array
items:
type: string
example: The email field is required when none of firstname / lastname / company are present.
company:
type: array
items:
type: string
example: The company field is required when none of firstname / lastname / email are present.
deprecated: false
requestBody:
content:
application/json:
schema:
properties:
firstname:
type: string
description: 'Max: 255. Required if no lastname, email, company supplied'
lastname:
type: string
description: 'Max: 255. Required if no firstname, email, company supplied'
email:
type: string
description: 'Max: 255. Required if no firstname, lastname, company supplied'
company:
type: string
description: 'Max: 255. Required if no firstname, lastname, email supplied'
phone:
type: string
description: 'Matching regex: /[0-9]{10,15}/'
address_1:
type: string
description: 'Max: 255'
address_2:
type: string
description: 'Max: 255'
address_city:
type: string
description: 'Max: 255'
address_state:
# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stax/refs/heads/main/openapi/stax-customer-api-openapi.yml