►  Read Client

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/Client/205

-> Return one JSON object of client.

► Query Clients

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/Client?organizationName.matches(".*ABC Company.*") 

-> Return array of JSON object of client, its organization name contains "ABC Company".

organizationName is filter-parameter. Following filter-parameters are supported:

Parameter

Type

Description

id

Long

Id of client, E.g. clientId=23

organizationName

String

Name of this client, company name or persons name

postalAddress

String

Postal Address of this client. "\n" for line break.

phoneNumber

String

 

faxNumber

String

 

website

String

 

clientNumber

String

 

notice

String

 

►  Insert Client

POST/PUT http://companyid.seasoo.net/api/Client

with api_key and following request body:

{"organizationName":"ABC Company",

  "postalAddress":"Römerstr 23 \n70794 Filderstadt",

  "contactPersons":[{"title":"Dr.","firstName":"Alex","lastName":"Vogt",

                                  "email":" Diese E-Mail-Adresse ist gegen Spambots geschützt! JavaScript muss aktiviert werden, damit sie angezeigt werden kann. "},

                                {"firstName":"Maria","lastName":"Schneider",

                                  "email":" Diese E-Mail-Adresse ist gegen Spambots geschützt! JavaScript muss aktiviert werden, damit sie angezeigt werden kann. "}]

  }

-> Response has http status code = 201 if successfully. Otherwise it returns status code 500.

Following field-names for contactPerson are supported:

Field-name

Type

Description

title

String

Optional. Title of contact

firstName

String

 

lastName

String

 

Email

String

 

Phone

String

 

Mobile

String

 

isDefaultContact

Boolean

1 is true and 0 is false. Default is false.

►  Update Client

Like insert client, only URL is different:

POST/PUT http://companyid.seasoo.net/api/Client/{id}

with request body is content of client.

►  Delete Client

DELETE http://companyid.seasoo.net/api/Client/{id}

-> Response has status code = 204 in case of success and 404 in case of not success.