Skip to main content

Contacts

A Contact is a customer. It can be assigned a set of Projects and/or Documents, and also a set of Events.


Contact methods

Returns a list of all Contacts matching some specified search criteria.

Method

GET/api/externals/v1/contacts

Arguments

  • winLangID (long): Windows Language Identifier of the resulting data
  • internalCode (string): Internal code of the searched Contacts
  • code (string): Code of the searched Contacts
  • emailAddress (string): Email address of the searched Contacts
  • keyword (string): Searched keyword
  • minDate (datetime): Minimum date of the searched Contacts
  • maxDate (datetime): Maximum date of the searched Contacts
  • dateKind (string): Type of date used by the minDate and/or maxDate arguments. Allowed values: "CreationDate", "LastModificationDate"
  • idsOnly (boolean, true): If true, returns only a set of Contact IDs
  • detailedView (boolean, false): If true, returns additional information about the matching Contacts (e.g. "deliveryAddresses", "billingAddress", "statistics")

Body

(none)

Response

The search service returns a JSON message with the list of items matching the specified search criteria:

{
"contacts": [
{
"id": long,
"storeID": long,
"winLangID": long,
"internalCode": string,
"code": string,
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"mobilePhone": string,
"homePhone": string,
"emailAddress": string,
"isSubjectToTax1": boolean,
"isSubjectToTax2": boolean,
"isSubjectToTax3": boolean,
"isSubjectToTaxDEEE": boolean,
"isSubjectToTaxDEA": boolean,
"mainAddress": {
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string // Address ID of an external application (RCC for exemple)
},
"deliveryAddresses": [
{
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string
}
],
"billingAddress": {
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string
},
"gdpr": {
"allowsInformationUsage": boolean,
"allowsContactByEMail": boolean,
"allowsContactBySMS": boolean,
"allowsContactByPhone": boolean,
"allowsContactByPost": boolean,
"expirationDate": datetime
},
"statistics": {
"projectCount": int,
"sentEmailCount": int,
"receivedEmailCount": int,
"appointmentCount": int,
"firstAppointmentDate": datetime,
"lastAppointmentDate": datetime,
"customerSinceDate": datetime,
"totalSalesPrice": double,
"firstProjectCreatedOn": datetime,
"lastProjectCreatedOn": datetime
},
"creationDate": datetime,
"modificationDate": datetime
}
]
"winLangID": long,
"success": boolean,
"message": string,
"rowCount": long
}

Contacts without internal code

Returns a list of Contacts with no internal code initialized.

Method

GET/api/externals/v1/contacts/withoutInternalCode

Arguments

  • winLangID (long): Windows Language Identifier of the resulting data
  • minDate (datetime): Minimum date of the searched Contacts
  • maxDate (datetime): Maximum date of the searched Contacts
  • idsOnly (boolean, true): If true, returns only a set of Contact IDs
  • detailedView (boolean, false): If true, returns additional information about the matching Contacts (e.g. "deliveryAddresses", "billingAddress", "statistics")

If no date is entered, the last 50 contacts that have no internal code are returned.
If both dates are entered, the last 50 contacts without internal code between the two dates are returned.
If the minDate is set and not the maxDate, the last 50 contacts without internal code following the minDate are returned.
If the maxDate is set and not the minDate, the last 50 contacts without internal code preceding the maxDate are returned.

Body

(none)

Response

Same format as the one returned by the « Contact search » method.


Details

Returns the details of the Contact which contactID is provided in the URL.

Method

GET/api/externals/v1/contacts/{contactID}

Arguments

  • contactID (long): (provided in the path): ID of the Contact to be returned
  • winLangID (long): Windows Language Identifier of the resulting data
  • detailedView (boolean, false): If true, returns additional information about the matching Contact (e.g. "deliveryAddresses", "billingAddress", "statistics")

Body

(none)

Response

Same format as the one returned by the « Contact search » method.


Create

Creates a new Contact with the specified information.

Method

POST/api/externals/v1/contacts

Arguments

(none)

Body

{
"storeID": long,
"winLangID": long,
"internalCode": string,
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"mobilePhone": string,
"homePhone": string,
"emailAddress": string,
"isSubjectToTax1": boolean,
"isSubjectToTax2": boolean,
"isSubjectToTax3": boolean,
"isSubjectToTaxDEEE": boolean,
"isSubjectToTaxDEA": boolean,
"mainAddress": {
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string
},
"deliveryAddress": {
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string
},
"billingAddress": {
"title": string,
"firstName": string,
"lastName": string,
"companyName": string,
"street1": string,
"street2": string,
"street3": string,
"zipCode": string,
"city": string,
"countryCode": string,
"externalAddressID": string
},
"gdpr": {
"allowsInformationUsage": boolean,
"allowsContactByEMail": boolean,
"allowsContactBySMS": boolean,
"allowsContactByPhone": boolean,
"allowsContactByPost": boolean
}
}

Response

{
"contactID": long, // When successful, the created contactID
"success": boolean,
"message": string,
"rowCount": long
}

Update

Updates the Contact which contactID is provided in the URL with the specified information.

Method

PUT/api/externals/v1/contacts/{contactID}

Arguments

  • contactID (long): (provided in the path): ID of the Contact to be updated

Body

Same format as the one passed to the « Contact creation » method, except for the “storeID” field, which cannot be modified.

Response

{
"contactID": long, // When successful, the updated contactID
"success": boolean,
"message": string,
"rowCount": long
}

Contact additional methods

Projects

Returns a list of all Projects owned by the Contact which contactID is provided in the URL and matching some specified search criteria.

Method

GET/api/externals/v1/contacts/{contactID}/projects

Arguments

  • contactID (long): (provided in the path): ID of the Contact owning the searched Projects
  • winLangID (long): Windows Language Identifier of the resulting data
  • keyword (string): Searched keyword
  • minDate (datetime): Minimum date of the searched Projects
  • maxDate (datetime): Maximum date of the searched Projects
  • dateKind (string): Type of date used by the minDate and/or maxDate arguments. Allowed values: "CreationDate", "LastModificationDate"
  • idsOnly (boolean, true): If true, returns only a set of Project IDs
  • detailedView (boolean, false): If true, returns additional information about the matching Projects (e.g. "afterSalesServiceProjects", "consumerProjects", "clonedProject", "statistics", "attachments")

Body

(none)

Response

Same format as the one returned by the « Project search » method.


Documents

Returns a list of all Documents owned by the Contact which contactID is provided in the URL and matching some specified search criteria.

Method

GET/api/externals/v1/contacts/{contactID}/documents

Arguments

  • contactID (long): (provided in the path): ID of the Contact owning the searched Documents
  • winLangID (long): Windows Language Identifier of the resulting data
  • projectID (long): ID of the Project owning the searched Documents
  • documentTypeID (long): ID of the Document type of the searched Documents
  • internalCode (string): Internal code of the searched Documents
  • keyword (string): Searched keyword
  • minDate (datetime): Minimum date of the searched Documents
  • maxDate (datetime): Maximum date of the searched Documents
  • dateKind (string): Type of date used by the minDate and/or maxDate arguments. Allowed values: "CreationDate", "LastModificationDate"
  • idsOnly (boolean, true): If true, returns only a set of Document IDs
  • detailedView (boolean, false): If true, returns additional information about the matching Documents (e.g. "documentLines", "styles", "payments", "attachments")

Body

(none)

Response

Same format as the one returned by the « Document search » method.


Events

Returns a list of all Events owned by the Contact which contactID is provided in the URL and matching some specified search criteria.

Method

GET/api/externals/v1/contacts/{contactID}/events

Arguments

  • contactID (long): (provided in the path): ID of the Contact owning the searched Events
  • winLangID (long): Windows Language Identifier of the resulting data
  • eventTypeActionKind (int): Kind of the Event Type of the searched Events
  • keyword (string): Searched keyword
  • minDate (datetime): Minimum date of the searched Events
  • maxDate (datetime): Maximum date of the searched Events
  • dateKind (string): Type of date used by the minDate and/or maxDate arguments. Allowed values: "CreationDate", "LastModificationDate"
  • idsOnly (boolean, true): If true, returns only a set of Event IDs
  • detailedView (boolean, false): If true, returns additional information about the matching Events

Body

(none)

Response

Same format as the one returned by the « Event search » method.