ContactsGetContactsModifiedSincePaged

GetContactsModifiedSincePaged

CRM service 1.4: Returns contacts created, changed or deleted since a date, filtered by customer group, a page at a time.

ServiceCRM 1.4
EndpointPOST https://app{server-number}.timelog.com/{account}/WebServices/CRM/V1_4/CRMServiceSecure.svc
SOAPActionhttp://api.timelog.com/services/crm/1_4/ICRMService/GetContactsModifiedSincePaged
Content-Typetext/xml; charset=utf-8
AuthenticationA token from GetToken
Changes dataNo
Safe to retryYes
PagingYes, up to 500 per page

How it works

The contact sync feed. FULL: returns every contact of customers in the selected groups, each with Action = Created. Paging is in memory after the whole result is built. Known gaps in the feed: contacts created through InsertContact produce no event, so they are missing from DELTA results until they are next updated; inactive-contact filtering is inconsistent between modes and groups.

Parameters

Each parameter has one label: Required, Conditional (required depending on other values) or Optional. Send them in the order shown.

datedateTime
Required

Return changes logged at or after this moment. Before 2000-01-01 = FULL mode.

includeCustomersboolean

Conditional. Include contacts of customers whose status is in the Customers group. At least one of includeCustomers / includeSuppliers / includeLeads must be true, otherwise the result is always empty.

includeSuppliersboolean

Conditional. Include contacts of suppliers. At least one of includeCustomers / includeSuppliers / includeLeads must be true, otherwise the result is always empty.

includeLeadsboolean

Conditional. Include contacts of leads. At least one of includeCustomers / includeSuppliers / includeLeads must be true, otherwise the result is always empty.

loadCustomFieldsboolean

Optional. Default false. Fill CustomFields of each returned contact.

loadExternalKeysboolean

Optional. Default false. Fill ExternalKeys of each returned contact.

pageinteger
Required

1-based page number.

pageSizeinteger
Required

Items per page, capped at 500; must be > 0.

tokenSecurityToken
Required

The token from GetToken: Initials, Expires and Hash, sent back unchanged.

Request

POST /{account}/WebServices/CRM/V1_4/CRMServiceSecure.svc HTTP/1.1
Host: app{server-number}.timelog.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://api.timelog.com/services/crm/1_4/ICRMService/GetContactsModifiedSincePaged"

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:crm="http://api.timelog.com/services/crm/1_4"
                  xmlns:tok="http://www.timelog.com/api/tlp/v1_3">
  <soapenv:Body>
    <crm:GetContactsModifiedSincePaged>
      <crm:date>{date}</crm:date>
      <crm:includeCustomers>false</crm:includeCustomers>
      <crm:includeSuppliers>false</crm:includeSuppliers>
      <crm:includeLeads>false</crm:includeLeads>
      <crm:loadCustomFields>false</crm:loadCustomFields>
      <crm:loadExternalKeys>false</crm:loadExternalKeys>
      <crm:page>1</crm:page>
      <crm:pageSize>100</crm:pageSize>
      <crm:token>
        <tok:Initials>{Initials from GetToken}</tok:Initials>
        <tok:Expires>{Expires from GetToken, unchanged}</tok:Expires>
        <tok:Hash>{Hash from GetToken}</tok:Hash>
      </crm:token>
    </crm:GetContactsModifiedSincePaged>
  </soapenv:Body>
</soapenv:Envelope>
Replace every {…} placeholder with your own value.

Response

The call returns the standard response envelope. Check ResponseState first: a failed call still returns HTTP 200.

ResponseStatestring
Required

Success, Invalid or Error.

ErrorCodeinteger

0 on success, otherwise the error code. See Errors.

TotalPageCountinteger

Number of pages for the whole result with your pageSize. Keep calling with page + 1 until you have read them all.

ReturnContact[]

Response<Contact>: one page; IsReturnPaged = true, TotalPageCount for the whole result. Each Contact's Action = Created / Updated / Deleted. Deleted entries carry only GUID, Firstname and Action. No 'Successfully called' message. ResponseState Success, empty Return, TotalPageCount 0.

Example response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <GetContactsModifiedSincePagedResponse xmlns="http://api.timelog.com/services/crm/1_4">
      <GetContactsModifiedSincePagedResult xmlns:a="http://api.timelog.com"
                                           xmlns:b="http://api.timelog.com/services/crm/1_4"
                                           xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <a:Return>
          <b:Contact>
            <a:Action>Original</a:Action>
            <a:IsCustomFieldsLoaded>false</a:IsCustomFieldsLoaded>
            <a:CustomFields i:nil="true"/>
            <a:IsExternalKeysLoaded>false</a:IsExternalKeysLoaded>
            <a:ExternalKeys i:nil="true"/>
            <b:GUID>3f2504e0-4f89-41d3-9a0c-305000000001</b:GUID>
            <b:Firstname>Example</b:Firstname>
            <b:Lastname>Example</b:Lastname>
            <b:Email>info@example.com</b:Email>
            <b:Mobile>+45 00 00 00 00</b:Mobile>
            <b:Phone>+45 00 00 00 00</b:Phone>
            <b:Fax>+45 00 00 00 00</b:Fax>
            <b:Address>
              <a:Address1>Example</a:Address1>
              <a:Address2>Example</a:Address2>
              <a:Address3>Example</a:Address3>
              <a:ZipCode>1000</a:ZipCode>
              <a:City>Copenhagen</a:City>
              <a:State>Example</a:State>
              <a:Country>DK</a:Country>
            </b:Address>
            <b:Comment>Example</b:Comment>
            <b:Title>Example</b:Title>
            <b:CustomerGUID>3f2504e0-4f89-41d3-9a0c-305000000002</b:CustomerGUID>
            <b:ContactID>1001</b:ContactID>
            <b:DefaultInvoiceSettingContactID>1001</b:DefaultInvoiceSettingContactID>
            <b:IsActive>true</b:IsActive>
            <b:ProfessionalTitle1>Example</b:ProfessionalTitle1>
            <b:ProfessionalTitle2>Example</b:ProfessionalTitle2>
            <b:Details>
              <b:Owner>
                <a:ID>1001</a:ID>
                <a:Initials>ABC</a:Initials>
                <a:FullName>Example full</a:FullName>
              </b:Owner>
              <b:CustomerHeader>
                <b:ID>1001</b:ID>
                <b:Name>Example </b:Name>
                <b:No>1001</b:No>
                <b:GUID>3f2504e0-4f89-41d3-9a0c-305000000003</b:GUID>
              </b:CustomerHeader>
            </b:Details>
          </b:Contact>
        </a:Return>
        <a:ReturnTypeDescription>Contact</a:ReturnTypeDescription>
        <a:Request>…</a:Request>
        <a:ResponseState>Success</a:ResponseState>
        <a:Messages>
          <a:APIMessage>
            <a:Message>Duration of call was 0,0421337 sec.</a:Message>
            <a:Severity>Message</a:Severity>
            <a:ErrorCode>0</a:ErrorCode>
          </a:APIMessage>
        </a:Messages>
        <a:ErrorCode>0</a:ErrorCode>
        <a:IsReturnPaged>true</a:IsReturnPaged>
        <a:TotalPageCount>1</a:TotalPageCount>
      </GetContactsModifiedSincePagedResult>
    </GetContactsModifiedSincePagedResponse>
  </s:Body>
</s:Envelope>
Illustrative example: built from the service description (WSDL) in the same format as a real response, with made-up values. The Request block is shortened.

Errors

All errors come back with HTTP 200: check ResponseState, ErrorCode and Messages. The errors every operation can return (expired or invalid token, API not enabled, HTTPS required, general errors) are listed once in Responses and errors.

Errors specific to this operation:

ResponseStateErrorCodeMessageWhat it meansWhat to do
Error40001Error during call on TimeLog.API, Message 'User does not have the right to access any customers'The caller has no customer privilege.Give the integration user a customer privilege.