Read customers

GET /customers

Read a list of all customers, including their details, with pagination, or a subset of customers based on query parameters. Whether a customer is a company or a private person is controlled by "isCompany" flag property. The schemas are also slightly different for a company (no "person" property) or a person (no "organizationNumber").

Headers

Query parameters

  • limit number(int32)

    Maximum length is 100. Default value is 25.

  • isCompany boolean

    A flag variable to filter customers by company or person.

  • isSupplier boolean

    A flag variable to filter customers by being a supplier or not.

  • Filter customers by date of last modification. Compares dates by greater or equal and accepts dates in ISO8601 format

  • Filter customers by date created. Compares dates by greater or equal and accepts dates in ISO8601 format

  • sortBy string

    Sort customers by field and direction. Takes in a pair of field and direction separated by a colon symbol ':'

    Format should match the following pattern: ^(name|createdAt|modifiedAt|organizationNumber|id):(asc|desc)$.

Responses

  • 200 application/json

    Ok

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • id integer(int32)

      A unique identifier for the customer within 24SevenOffice CRM. This ID is used for reference and linking transactions to specific customers.

    • name string | null

      A human-readable name or label for a customer, making it easily identifiable to users.

    • person object

      The first and the last name of a customer if the customer is a person.

      Hide person attributes Show person attributes object
      • firstName string | null

        The first name of a person if the customer is a person.

      • lastName string | null

        The last name of a person if the customer is a person.

    • isCompany boolean

      A flag variable indicating whether the customer is a company (true) or a person (false).

    • isSupplier boolean

      A flag variable indicating whether the customer is also a supplier (true) or not (false).

    • organizationNumber string | null

      The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.

    • address object

      Addresses for the customer.

      Hide address attributes Show address attributes object
      • visit object

        The visiting address of the customer.

        Hide visit attributes Show visit attributes object
        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • postal object

        The postal address of the customer.

        Hide postal attributes Show postal attributes object
        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • billing object

        The billing address of the customer.

        Hide billing attributes Show billing attributes object
        • name string | null

          The name for the address.

        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • delivery object

        The delivery address of the customer.

        Hide delivery attributes Show delivery attributes object
        • name string | null

          The name for the address.

        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

    • email object

      Email addresses for the customer.

      Hide email attributes Show email attributes object
      • contact string | null

        The email address for contacting the customer.

      • billing string | null

        The billing email address for the customer.

    • phone string | null

      A phone number for contacting the customer.

    • A timestamp for when a record was created, in ISO 8601 format.

    • A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.

  • Unauthorized. Missing or invalid bearer token.

    Hide headers attributes Show headers attributes
GET /customers
curl \
 -X GET https://rest.api.24sevenoffice.com/v1/customers \
 -H "Authorization: string"
Response examples (200)
[
  {
    "id": 12345,
    "name": "ABC Corporation",
    "email": {
      "billing": "billing@example.com",
      "contact": "contact@example.com"
    },
    "phone": "+47-12345678",
    "address": {
      "visit": {
        "street": "Hovedgata 1",
        "postalArea": "Fornebu",
        "postalCode": "0123",
        "countryCode": "NO",
        "countrySubdivision": "Viken"
      },
      "postal": "{...}",
      "billing": "{...}",
      "delivery": "{...}"
    },
    "createdAt": "2022-01-01 18:00:00.000Z",
    "isCompany": true,
    "isSupplier": false,
    "modifiedAt": "2023-12-31 18:00:00.000Z",
    "organizationNumber": "123456789"
  },
  {
    "id": 54321,
    "name": "John Doe",
    "email": {
      "billing": "billing@example.com",
      "contact": "contact@example.com"
    },
    "phone": "+47-87654321",
    "person": {
      "lastName": "Doe",
      "firstName": "John"
    },
    "address": {
      "visit": {
        "street": "Hovedgata 2",
        "postalArea": "Fornebu",
        "postalCode": "0123",
        "countryCode": "NO",
        "countrySubdivision": "Viken"
      },
      "postal": "{...}",
      "billing": "{...}",
      "delivery": "{...}"
    },
    "createdAt": "2022-01-01 18:00:00.000Z",
    "isCompany": false,
    "isSupplier": false,
    "modifiedAt": "2023-12-31 18:00:00.000Z"
  },
  {
    "id": 67890,
    "name": "XYZ Inc.",
    "email": {
      "billing": "billing@example.com",
      "contact": "contact@example.com"
    },
    "phone": "+1 555-123-4567",
    "address": {
      "visit": {
        "street": "123 Main St, Cityville",
        "postalArea": "Seattle",
        "postalCode": "98101",
        "countryCode": "US",
        "countrySubdivision": "Washington"
      },
      "postal": "{...}",
      "billing": "{...}",
      "delivery": "{...}"
    },
    "createdAt": "2022-01-01 18:00:00.000Z",
    "isCompany": true,
    "isSupplier": true,
    "modifiedAt": "2023-12-31 18:00:00.000Z",
    "organizationNumber": "987654321"
  }
]