For the complete documentation index, see llms.txt. This page is also available as Markdown.

Relations

Get relations

get
/relations/

Use this endpoint to get relations from the OutSmart account. Each relation record can contain the following data:

Parameter
Required
Description

debtor_number

Y

Unique id of the relation

name

Y

Name of the relation

contact

N

Name om the main contactperson of the relation

phone_number

N

Phone number

email

N

Contact email address

email_workorder

N

Email address used when sending workorder to the customer

street

Y

Relation address street name

house_number

N

Relation address house number

postal_code

Y

Relation address postal code

city

Y

Relation address city

country

N

Relation address country code

remark

N

Text field for any additional remarks on the relation

latitude

N

Relation address latitude coordinate

longitude

N

Relation address longitude coordinate

external_id

N

External id field, often used for storing id reference from external software

debtor_number_invoice

N

kvk_number

N

Chamber of commerce number

vat_number

N

VAT identification number

debtor_type

N

Indicates the relation type, for example: customer, lead etc

language

N

Language selection, value indicated with a country code. Example 'nl' for Dutch

accountmanager

N

mobile

N

Mobile phone number

status

N

active

N

Indication whether the relation is active or not. Value 0 for incactive, 1 for active

pgp_code

N

source

N

lead_phase

N

lead_score

N

lead_value

N

loss_reason

N

lead_value_recurring

N

marketing_opt_out

N

discount_sales

N

Discount percentage applied for this relation. Integer value

created_at

N

Datetime value indicating when the relation was created. Date format: YYYY-MM-DD HH🇲🇲ss

modified_at

N

Datetime value indicating the relation was last modified. Dat format: YYYY-MM-DD HH🇲🇲ss

created_by

N

Employee number of who created the relation

modified_by

N

Employee number of the last employee who modified the relation data

Freefields

Additional freefields can be added to the relation data. To include these in the results, add the URL parameter includeFreefields with value true. Freefields will only be added to the results when declared, use the Freefields endpoint to see which fields have been set. Freefields are numbered 1-50.

Filtering

This endpoint supports filtering options. Read the section on applying filters to the request here. Filters can be applied to the following field values:

  • name

  • debtor_number

  • contact

  • phone

  • mobile

  • email

  • werkbonmailto (filters on email_workorder)

  • street

  • streetno

  • zip

  • city

  • latitude

  • longitude

  • external_id

  • modified_at

  • created_at

  • debtor_type

  • active

Example with filters

In order to get specific results, multiple filters can be applied by adding multiple key[], value[], and operator[] URL parameters. For example with the request below:

{api_url}/relations/?token={client_token}&software_token={software_token}&key[]=modified_at&value[]=2022-01-01 00:00:00&operator[]=ge&key[]=active&value[]=eq&operator[]=1

This would get all relations that have been modified after new years 2022, and are set to be active. This example uses 2 filters:

  • modified_at value is checked to 'ge' (greater equals) the value 2022-01-01

  • active value is check to 'eq' (equals) the value 1

Additional filters can by applied by adding more of the filter URL parameters. Do note that currently all added filters will be applied as AND, there is currently no way to check 2 filters with OR keyword. So all the applied filters will have to be checked as true on the relations returned.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenstringOptional

Client token, unique to an Outsmart account

Example: {{client_token}}
software_tokenstringOptional

Software token

Example: {{software_token}}
key[]stringOptional

Filter parameter. Name of the field to apply filter to

value[]stringOptional

Filter parameter. Search value for the filter

operator[]stringOptional

Filter parameter. Operator applied to the filter query

includeFreefieldsstringOptional

Boolean value. Determines whether freefields are included in the response. Default value is false

Responses
200

Response_200

No content

get/relations/
GET /relations/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Response_200

No content

Add relations

post
/relations/

This endpoint is used to both create and update relations to the Outsmart account. Relations will be check for existing relations on the supplied debtor_number. When an existing debtor number is supplied, data on the existing relation will be updated.

Each relation record can contain the following data:

Parameter
Required
Description

debtor_number

Y

Unique id of the relation

name

Y

Name of the relation

contact

N

Name om the main contactperson of the relation

phone_number

N

Phone number

email

N

Contact email address

email_workorder

N

Email address used when sending workorder to the customer

street

Y

Relation address street name

house_number

N

Relation address house number

postal_code

Y

Relation address postal code

city

Y

Relation address city

country

N

Relation address country

remark

N

Text field for any additional remarks on the relation

latitude

N

Relation address latitude coordinate

longitude

N

Relation address longitude coordinate

external_id

N

External id field, often used for storing id reference from external software

debtor_number_invoice

N

kvk_number

N

Chamber of commerce number

vat_number

N

VAT identification number

debtor_type

N

Indicates the relation type, for example: customer, lead etc

language

N

Language selection, value indicated with a country code. Example 'nl' for Dutch

accountmanager

N

mobile

N

Mobile phone number

status

N

active

N

Indication whether the relation is active or not. Value 0 for incactive, 1 for active

pgp_code

N

source

N

lead_phase

N

lead_score

N

lead_value

N

loss_reason

N

lead_value_recurring

N

marketing_opt_out

N

discount_sales

N

Discount percentage applied for this relation. Integer value

created_at

N

Datetime value indicating when the relation was created. Date format: YYYY-MM-DD HH🇲🇲ss

modified_at

N

Datetime value indicating the relation was last modified. Dat format: YYYY-MM-DD HH🇲🇲ss

created_by

N

Employee number of who created the relation

modified_by

N

Employee number of the last employee who modified the relation data

Freefields

Additional freefields can be added to the relation data. Freefield data can be supplied bij adding a FreeFields JSON object with the relation. Freefields will only be added to the results when declared, use the Freefields endpoint to see which fields have been set. Freefields are numbered 1-50.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenstringOptionalExample: {{client_token}}
software_tokenstringOptionalExample: {{software_token}}
Responses
200

Response_200

application/json
codeintegerOptional
messagesarrayOptional
responseintegerOptional
post/relations/
POST /relations/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Response_200

{
  "code": 200,
  "messages": [],
  "response": 1
}

Last updated

Was this helpful?