Update customer

Update the data of a customer.
Customer data is created and updated with the "customfield" attribute. Every data attribute of a customer is a custom field, for example firstName, lastName, email etc. The URL parameter "customerId" can be used in two ways:

  • As a unique ID of the customer assigned by TIMIFY ("customerId"). In this case, you don't need the QUERY parameter "external"
  • use the "externalId" that you added to this customer. In this case, you need to add the parameter "external" ( for ex.: /?external=1) the API will search by your "externalId" and not by "customerId" assigned by TIMIFY

You can add "externalId" to the customer with the Developer API endpoints POST /customers and PATCH /customers/:customerId
You can use the endpoint GET /customers/customfields to retrieve all available custom fields for the selected company.
To create a new custom field you can use the endpoint POST /customers/customfields

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The unique customer id.

Query Params
integer
enum

The "external" attribute specifies if the search query will use the external or TIMIFY ID. When "external" is set as 1, "customerId" is used as the "externalId", alternatively the "customerId" is the TIMIFY id.

Allowed:
Body Params
string

The external id of the customer. This parameter allows you to put your customerId and compare the TIMIFY customer data with your customer database.

boolean

Ignores the validation of the phone number custom field when set to true, the default is false.

customfields
array of objects
required

An array of custom data fields of the customer. Each item in the array is an object with the id and value of the custom field.
Custom Fields like "Phone" require a different structure. The following is an example of storing a phone number:

  { 
    "id": "5f61c6381a34817e5c7fa218", 
    "value": "{\"number\":\"123456789\",\"country\":\"DE\"}"
  }

Note the value param needs to be a string. For example, you need to use JSON.stringify() or the equivalent in the programming language of your integration.
Adding files: First, upload the file(s) using the corresponding endpoint.
The response will resemble this structure:

  "url": "https://s3.eu-central-1.amazonaws.com/data.timify.com/temporary/2022-02-10_12/private-uploads/my-picture.png",
  "key": "temporary/2022-02-10_12/private-uploads/my-picture.png"
} ```
Add the following custom field:
``` {
  "id": "612cdd6cda1af85e64419256",
  "values_add": [
    {
      "key":"temporary/2022-02-10_12/private-uploads/my-picture.png",
      "name": "my-picture.png"
    }
  ],
  "values_remove": []
} ```
If the data field has multiple files, add all files in an array following the same data structure.

_At least one of the following fields is required:_
  - __first name__
  - __last name__
  - __company name__  

In order to get all existing custom fields defined for the account, use the endpoint __GET /customers/customfields__
Example:

"customfields": [
{
"id": "5c374ff2a13dc4b3a5a32e42",
"value": "[email protected]"
}]

customfields*
Headers
string
required

Id of the company

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json