For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customers

Customers object

Get customers

get
/v1/customers

This operation returns a list of customers

Note: This operation needs Authentication and supports the following JSON:API features:

  • Filters - emailEq, fullNameEq

  • Sparse fieldsets - supports all fields of customer query parameter.

Authorizations
AuthorizationstringRequired

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Query parameters
page[size]integer · int32 · min: 1 · max: 1000Optional

The number of resources to return in a single response.

page[before]string · min: 1 · max: 36Optional

Unique identifier.

Pattern: ^[a-zA-Z0-9-]+$
page[after]string · min: 1 · max: 36Optional

Unique identifier.

Pattern: ^[a-zA-Z0-9-]+$
filter[emailEq]string · max: 255Optional

Email

Example: example@email.comPattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
filter[fullNameEq]string · max: 255Optional

Full Name

Example: Name SurnamePattern: ^[^<>&]+$
Responses
200

Successful response with customers data in JSON:API format.

application/vnd.api+json
get/v1/customers
GET /pos/v1/customers HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "31b14937-2524-491f-b0a0-dc0a7393ff33",
      "type": "customers",
      "attributes": {
        "fullName": "John Doe",
        "companyName": "Doe Enterprises",
        "taxNumber": "123456789",
        "email": "john.doe@mews.com",
        "address1": "123 Main St.",
        "address2": "Apt. 123",
        "city": "Palo Alto",
        "state": "CA",
        "postalCode": "12345",
        "country": "US",
        "notes": "This is a note about this customer.",
        "phone": "1234567890",
        "mobile": "3334567890",
        "countrySpecificCode": "332118889",
        "dateOfBirth": "1970-01-01",
        "createdAt": "2024-10-16T14:30:00Z",
        "updatedAt": "2024-10-19T14:30:00Z"
      }
    }
  ],
  "links": {
    "prev": "https://api.mews-demo.com/pos/v1/customers?page%5Bbefore%5D=NA&page%5Bsize%5D=1",
    "next": "https://api.mews-demo.com/pos/v1/customers?page%5Bafter%5D=NA&page%5Bsize%5D=1"
  }
}

Create customer

post
/v1/customers

Create a customer. A customer represents a person or organization that can be billed for goods or services. Note: This operation needs Authentication.

Authorizations
AuthorizationstringRequired

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Body
Responses
201

The customer was successfully created.

application/vnd.api+json
post/v1/customers
POST /pos/v1/customers HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 416

{
  "data": {
    "type": "customers",
    "attributes": {
      "fullName": "John Doe",
      "companyName": "Doe Enterprises",
      "taxNumber": "123456789",
      "email": "john.doe@mews.com",
      "address1": "123 Main St.",
      "address2": "Apt. 123",
      "city": "Palo Alto",
      "state": "CA",
      "postalCode": "12345",
      "country": "US",
      "notes": "This is a note about this customer.",
      "phone": "1234567890",
      "mobile": "3334567890",
      "countrySpecificCode": "332118889",
      "dateOfBirth": "1970-01-01"
    }
  }
}
{
  "data": {
    "id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
    "type": "customers",
    "attributes": {
      "fullName": "John Doe",
      "companyName": "Doe Enterprises",
      "taxNumber": "123456789",
      "email": "john.doe@mews.com",
      "address1": "123 Main St.",
      "address2": "Apt. 123",
      "city": "Palo Alto",
      "state": "CA",
      "postalCode": "12345",
      "country": "US",
      "notes": "This is a note about this customer.",
      "phone": "1234567890",
      "mobile": "3334567890",
      "countrySpecificCode": "332118889",
      "dateOfBirth": "1970-01-01",
      "createdAt": "2024-10-16T14:30:00Z",
      "updatedAt": "2024-10-19T14:30:00Z"
    }
  }
}

Last updated

Was this helpful?