Developer Docs

Getting Started
  • Quick Start
  • Getting Started
  • Authentication
API Reference
  • Overview
  • Orders
  • Products
  • Inventory
  • Shipments
  • Customers
  • Returns
  • Tracking
Integrations
  • Shopify
  • WooCommerce
  • BigCommerce
  • Custom API
Webhooks
  • Overview
  • Webhook Events
Resources
  • Rate Limits
  • Error Codes
  • API Playground
  • SDK Libraries
  • Changelog
  • API Status
Support
  • Community
  • GitHub
  • Support
HomeDeveloper HubDocsApi ReferenceCustomers

Customers API

Manage customer accounts and preferences

The Customers API allows you to create and manage customer records, addresses, and preferences for your fulfillment operations.

Create Customer

Add new customer records

List Customers

Retrieve customer data

Update Customer

Modify customer information

Authentication Required

All Customers API endpoints require authentication using a Bearer token. Include your API key in the Authorization header.

Create Customer

POST/v1/customers

Creates a new customer record with contact information and shipping addresses.

Request Body

{
  "email": "customer@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "+1-555-0123",
  "company": "Acme Corp",
  "shipping_addresses": [
    {
      "name": "John Doe",
      "address_line1": "123 Main St",
      "address_line2": "Suite 100",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US",
      "is_default": true
    }
  ],
  "metadata": {
    "customer_type": "wholesale",
    "account_manager": "jane@company.com"
  }
}

Response

{
  "id": "cus_abc123def456",
  "email": "customer@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "+1-555-0123",
  "company": "Acme Corp",
  "shipping_addresses": [
    {
      "id": "addr_xyz789",
      "name": "John Doe",
      "address_line1": "123 Main St",
      "address_line2": "Suite 100",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US",
      "is_default": true,
      "is_verified": true
    }
  ],
  "metadata": {
    "customer_type": "wholesale",
    "account_manager": "jane@company.com"
  },
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z"
}

Code Examples

cURL
curl -X POST https://app.3plship.com/api/v1/customers \
  -H "Authorization: Bearer zl_live_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "customer@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+1-555-0123"
  }'
Node.js
const response = await fetch('https://app.3plship.com/api/v1/customers', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer zl_live_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: 'customer@example.com',
    first_name: 'John',
    last_name: 'Doe',
    phone: '+1-555-0123'
  })
});

const customer = await response.json();
console.log(customer);
Python
import requests

response = requests.post(
    'https://app.3plship.com/api/v1/customers',
    headers={
        'Authorization': 'Bearer zl_live_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
        'Content-Type': 'application/json'
    },
    json={
        'email': 'customer@example.com',
        'first_name': 'John',
        'last_name': 'Doe',
        'phone': '+1-555-0123'
    }
)

customer = response.json()
print(customer)

List Customers

GET/v1/customers

Retrieves a paginated list of all customers with optional filtering.

Query Parameters

ParameterTypeDescription
limitintegerNumber of results per page (default: 50, max: 100)
pageintegerPage number (starts at 1, default: 1)
emailstringFilter by customer email
created_afterstringISO 8601 date - Filter customers created after this date

Response

{
  "data": [
    {
      "id": "cus_abc123def456",
      "email": "customer@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "phone": "+1-555-0123",
      "company": "Acme Corp",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 245,
    "page": 1,
    "limit": 50,
    "total_pages": 5,
    "has_more": true
  }
}

Get Customer by ID

GET/v1/customers/:id

Retrieves detailed information about a specific customer including all addresses and order history.

Update Customer

PATCH/v1/customers/:id

Updates customer information. Only provided fields will be updated.

Related Resources

Orders API

Create orders for customers

Webhooks

Receive customer events