Work with records

Clients and contacts

Send the companies you work for and their people to GeotechOS. A first sync attaches to clients that GeotechOS already has.

A client is a company you work for. A client contact is a person. You send them before the projects that name them.

Send a client

curl -s -X PUT "$GEOTECHOS_URL/clients/ext:C-19" \
  -H "Authorization: Bearer $GEOTECHOS_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "legal_name": "Example Developments Pty Ltd",
    "trading_name": "Example Developments",
    "business_number": "12 345 678 901",
    "email": "[email protected]",
    "phone": "02 9000 0000",
    "website": "https://example.com",
    "status": "active"
  }'
Field Notes
legal_name Required. Two clients cannot have the same legal name
trading_name, display_name The names people use
business_number, tax_id For example the ABN
email, phone, website The company's own details
status active, lead, prospect or inactive
is_active false when the client is no longer used
source, industry, notes Free text

Send a contact

curl -s -X PUT "$GEOTECHOS_URL/client-contacts/ext:K-7" \
  -H "Authorization: Bearer $GEOTECHOS_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"first_name": "Sam", "last_name": "Site", "email": "[email protected]", "phone": "0400 000 000"}'

first_name is required. To put a contact on a project, name it in the project's contacts. See Projects.

A first sync: records that are already here

When you send a client that GeotechOS already has, with the same legal name, GeotechOS attaches your id to that client. It does not make a second one. A contact with the same email works the same way. The answer has "adopted": true.

Write adopted to your log. It is the one case where your request changed a record that your system did not make.

If that record already has a different id from your system, the request is refused with 409. GeotechOS cannot know which of your two records is right. Merge them in your system, or change the record in GeotechOS.

Remove a client

There is no delete. Send "is_active": false, or "status": "inactive".