Client Management

Client management is a fundamental aspect of our system, allowing you to efficiently handle client data. On this page, we will explore various client management endpoints that enable you to programmatically manage client information.

The client model

The client model encompasses all the information related to your clients. It includes details such as client name, contact information, and additional attributes that help you manage your client relationships.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the client.

  • Name
    name
    Type
    string
    Description

    The name of the client.

  • Name
    contact
    Type
    string
    Description

    The primary contact person for the client.

  • Name
    email
    Type
    string
    Description

    The email address of the client.

  • Name
    phone
    Type
    string
    Description

    The primary phone number of the client.

  • Name
    code
    Type
    string
    Description

    A client-specific code for identification.

  • Name
    cell
    Type
    string
    Description

    The client's cell phone number.

  • Name
    logo
    Type
    string
    Description

    URL for the client's logo.

  • Name
    po
    Type
    string
    Description

    Purchase Order (PO) information for the client.

  • Name
    isHidden
    Type
    boolean
    Description

    Indicates whether the client is hidden in the system.

  • Name
    statement
    Type
    string
    Description

    Statement related to the client.

  • Name
    metadata
    Type
    object
    Description

    Additional metadata associated with the client.

  • Name
    accountingEmails
    Type
    array
    Description

    Email addresses for accounting-related communication.

  • Name
    houseAccounts
    Type
    array
    Description

    Identifiers for house accounts associated with the client.

  • Name
    staff
    Type
    array
    Description

    Identifiers for staff members related to the client.

  • Name
    company
    Type
    object
    Description

    Information about the company associated with the client.

  • Name
    gateway
    Type
    object
    Description

    Details about the payment gateway used by the client.

  • Name
    externalId
    Type
    string
    Description

    External identifier for the client.

  • Name
    externalValue
    Type
    string
    Description

    External value associated with the client.

  • Name
    clientCredits
    Type
    array
    Description

    Information about client credits.

  • Name
    addresses
    Type
    array
    Description

    Addresses associated with the client.

  • Name
    createdAt
    Type
    timestamp
    Description

    Timestamp indicating when the client was created.

  • Name
    updatedAt
    Type
    timestamp
    Description

    Timestamp indicating when the client was last updated.


GET/public/clients

List all clients

This endpoint enables you to retrieve a paginated list of all your clients. By default, it displays a maximum of ten clients per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description
    Limit the number of clients returned.
  • Name
    offset
    Type
    integer
    Description
    Offset the number of results to skip before starting to return them.
  • Name
    orderBy
    Type
    string[]
    Description
    Specify the ordering of the results. Default is ['createdAt:DESC'] .
  • Name
    search
    Type
    string
    Description
    A search term to filter the results.

Request

GET
/public/clients
curl -G https://api.invoiss.com/public/clients \
-H "Authorization: {token}" \
-d limit=10

Response

{
	"items":[
{
	"id":"4c0c698h-4a0d-4182-973d-ddf070605e72",
	"logo":null,
	"contact":"Alice Johnson",
	"name":"Client C",
	"email":"aclientc@example.com",
	"code":"HUR877",
	"cell":null,
	"phone":"555-123-4567",
	"metadata":{

},
	"statement":false,
	"isHidden":null,
	"po":null,
	"clientCredits":[

	],
	"gateway":null,
	"addresses":[

	],
	"company":{
	"id":"0e3d5bgh-7274-4da4-9fbb-b1aec3ad53ff"
},
	"externalId":null,
	"externalValue":null,
	"updatedAt":"2023-12-21T20:41:51.000Z"
},
{
	"id":"e25a4563-3b80-4e12-ad6b-85762140c1f4",
	"logo":null,
	"contact":"Alice Johnson",
	"name":"Client C",
	"email":"clientc@example.com",
	"code":"JNSDV9",
	"cell":null,
	"phone":"111-123-4567",
	"metadata":{

},
	"statement":false,
	"isHidden":null,
	"po":null,
	"clientCredits":[

	],
	"gateway":null,
	"addresses":[

	],
	"company":{
	"id":"0e3d5b0b-5674-4da4-9fbb-b1aec3ad53ff"
},
	"externalId":null,
	"externalValue":null,
	"updatedAt":"2023-12-18T14:33:27.000Z"
},
{
	"id":"2c617b65-6623-446e-8955-3dc41fa6fa43",
	"logo":null,
	"contact":"Alice Johnson",
	"name":"Client C",
	"email":"clientc@example.com",
	"code":"WFF2CY",
	"cell":null,
	"phone":"555-123-4567",
	"metadata":{
},
	"statement":false,
	"isHidden":null,
	"po":null,
	"clientCredits":[

	],
	"gateway":null,
	"addresses":[

	],
	"company":{
	"id":"0e3d5b0b-7274-4da4-9fbb-b1aec3ad53ff"
},
	"externalId":null,
	"externalValue":null,
	"updatedAt":"2023-12-18T14:32:46.000Z"
},
{
	"id":"dd00bacc-e534-4a59-9fe8-d1f856f76515",
	"logo":null,
	"contact":"Tester Testing",
	"name":null,
	"email":"test@test.com",
	"code":"3DPMGF",
	"cell":"+1 (415) 111-0102",
	"phone":null,
	"metadata":{

},
	"statement":false,
	"isHidden":null,
	"po":null,
	"clientCredits":[

	],
	"gateway":null,
	"addresses":[

	],
	"company":{
	"id":"0e3d5b0b-7274-4fv4-9fbb-b1aec3ad53ff"
},
	"externalId":null,
	"externalValue":null,
	"updatedAt":"2023-05-23T20:48:07.000Z"
}
	],
	"count":4
}

POST/public/clients

Create a client

This endpoint allows you to add a new client to your client list. To create a client, you must provide essential client information such as name, contact, email, and phone number.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the client.

  • Name
    contact
    Type
    string
    Description

    The primary contact person for the client.

  • Name
    email
    Type
    string
    Description

    The email address of the client.

  • Name
    phone
    Type
    string
    Description

    The primary phone number of the client.

Optional attributes

  • Name
    cell
    Type
    string
    Description

    The client's cell phone number.

  • Name
    code
    Type
    string
    Description

    A client-specific code for identification.

  • Name
    logo
    Type
    string
    Description

    URL for the client's logo.

  • Name
    po
    Type
    string
    Description

    Purchase Order (PO) information for the client.

  • Name
    isHidden
    Type
    boolean
    Description

    Indicates whether the client is hidden in the system.

  • Name
    statement
    Type
    string
    Description

    Statement related to the client.

  • Name
    metadata
    Type
    object
    Description

    Additional metadata associated with the client.

Request

POST
/public/clients
curl https://api.invoiss.com/public/clients \
-H "Authorization: {token}" \
-d '{
"input"  : {
"name"   : "Client C",
"contact": "Alice Johnson",
"email"  : "client123@example.com",
"phone"  : "555-123-4567"
}'

Response

{
   "name":"Client C",
   "contact":"Alice Johnson",
   "email":"clientc@example.com",
   "phone":"555-555-4567",
   "code":"GB3552",
   "cell":null,
   "logo":null,
   "po":null,
   "isHidden":null,
   "statement":false,
   "metadata":{

   },
   "accountingEmails":null,
   "houseAccounts":[

   ],
   "staff":null,
   "company":{
      "id":"0e3d5b0b-7255-4d55-9fbb-b1aec3ad53ff",
      "name":"Test Reserve Inc",
      "logo":"https://firebasestorage.googleapis.com/v0/b/invoiss.appspot.com/o/vesujdJ2NqTS555irxNCwo02Yu82%2F8b09e82c-e32e-47ff-b6b8-ce26ba36880b.png?alt=media&token=157028f3-2e27-44a6-8aba-a21a87e45372",
      "email":"test@tester.com"
   },
   "gateway":null,
   "externalId":null,
   "externalValue":null,
   "clientCredits":[

   ],
   "addresses":[

   ],
   "id":"51c287aa-5555-49d9-bda0-dd9be8457cde",
   "createdAt":"2023-12-22T10:38:26.000Z",
   "updatedAt":"2023-12-22T10:38:26.000Z"
}