Customers

Explore Customers endpoints in Swagger.

Overview

A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a list of all the customers of a company.

Customers' data links to accounts receivable invoices.

Data model

Field

Type

Description

id

string

Identifier for the customer, unique to the company in the accounting platform.

customerName

string

Name of the customer as recorded in the accounting system, typically the company name.

contactName

string

Name of the main contact for the identified customer.

emailAddress

string

Email address the customer can be contacted by.

defaultCurrency

string
See currency

Default currency the transactional data of the customer is recorded in.

phone

string

Phone number the customer can be contacted by.

addresses

An array of Addresses.

contacts

An array of Contacts.

registrationNumber

string

Company number. In the UK, this is typically the Companies House company registration number.

taxNumber

string

Company tax number.

status

string

Current state of the customer, either:

  • Unknown
  • Active
  • Archived

modifiedDate

string
See date

Date the record was last updated in the Codat system.

sourceModifiedDate

string
See date

Date the record was last changed in the accounting system.

Addresses

Field

Type

Description

type

string

Type of the address, either:

  • Unknown
  • Billing
  • Delivery

line1

string

Line 1 of the customer address.

line2

string

Line 2 of the customer address.

city

string

City of the customer address.

region

string

Region of the customer address.

country

string

Country of the customer address.

postalCode

string

Postal code or zip code.

Contacts

Field

Type

Description

name

string

Name of a contact for a customer.

email

string

Email of a contact for a customer.

phone

An array of Phone numbers.

address

An array of Addresses.

status

string

Status of customer contacts, either:

  • Active
  • Archived
  • Unknown

Customers can have multiple contacts.

Phone numbers

Field

Type

Description

number

string

Phone number for a customer contact.

type

string

Type of phone number, either:

  • Primary
  • Landline
  • Mobile
  • Fax
  • Unknown

Customer reference

Data types that reference a customer, for example invoices, credit notes and payments, use a customer reference that includes the ID and name of the linked customer.

Field

Type

Description

id

string

Unique identifier for the customer in the accounting platform.

name

string

Name of the customer in the accounting platform.

Example data

{
    "results": [
        {
            "id": "71",
            "customerName": "Wile E. Coyote",
            "contactName": "Mr W.E. Coyote",
            "emailAddress": "[email protected]",
            "defaultCurrency": "USD",
            "phone": null,
            "addresses": [],
            "contacts": [
              {
                "name": "Mr W.E. Coyote",
                "email": "[email protected]",
                "phone": [],
                "address": {
                  "type": "Billing",
                  "line1": "Coyote Bungalow",
                  "line2": "",
                  "city": "Mohave Valley",
                  "region": "Arizona",
                  "country": "USA",
                  "postalcode": "86440"
                },
                "status": "Active",
                "modifiedDate": null
              }
            ],
            "registrationNumber": "12345",
            "taxNumber": "1357924680123456",
            "status": "Unknown",
            "modifiedDate": null,
            "sourceModifiedDate": null
          }
    ],
    "pageNumber": 1,
    "pageSize": 100,
    "totalResults": 1,
    "_links": {
      "current": {
        "href": "/companies/919371ab-763c-4bc7-99a4-9723cade34d3/data/customers?page=1"
      },
      "self": {
        "href": "/companies/919371ab-763c-4bc7-99a4-9723cade34d3/data/customers"
      }
    }
  }

Did this page help you?