Appointment Related Query

Hi, I have few questions related to Appointment Api.
1.In your Api document , there is not any field of Id in appointment response.
2. How the appointment is related to the contact because I’ve not seen any Id of contact in appointment and any id of appointment in contact. (as per the api response.)
3.Is there any relation between appointment and contact.
Few other queries:

  1. What is company in contact json.
  2. what is owner id in contact json.

Hi @Anurag_Dwivedi,

I’ve moved this from general questions to api q&a for clarity/better traction:

Since you are referring to json then it is safe to assume you are also referring to REST.

This is a very good question. @bradb, might you know? I will need to know this myself by the end of year :wink:

@Anurag_Dwivedi, The REST implementation is still in development and some documentation needs to catch up as well, but it’s getting there. I’m sure one of our fine Infusionites has an answer for now though!

@Anurag_Dwivedi, the Id is indeed returned when Appointments are created. We’ll look at improving the documentation around that, but you can always test it via the interactive documentation feature.

Appointments were originally implemented for our mobile applications, and the APIs definitely have a slant towards enabling a given authenticated user to create and modify their own Appointments. Appointments have a relationship to Contacts, but those are not exposed on all endpoints currently. We do have a story in our backlog to expose that functionality.

How would I get to know that my which contact has what appointments?
When I’m creating an appointment , it gives me id in response but how to attach it with a particular contact?

Hi @Anurag_Dwivedi

As Tom mentioned, there currently isn’t a way to attach a contact to an appointment. However, you can still use the XML-RPC DataService.update to set the ContactId of a particular appointment. Here’s an example call:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>DataService.update</methodName>
  <params>
    <param>
      <value>
        <string>{{privateKey}}</string>
      </value>
    </param>
    <param>
      <value>
        <string>ContactAction</string>
      </value>
    </param>
    <param>
      <value>
        <string>222</string>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>ContactId</name>
            <value><int>3519</int></value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

If you would rather not switch between REST and XML-RPC, I would recommend using XML-RPC to add your appointments.

@Anurag_Dwivedi,

Yeah, even in code where I’m using REST but need to set appointments, I’m still using the API DataService object to write to the ContactAction table to create the appointment.

Can you please tell me, that in future whether you gonna develop that for REST or not?
And if you have a plan to do so, then please tell me that after how much time I’ll be able to use that?

Hi @Anurag_Dwivedi, we do have a story on our backlog to add this feature. I don’t have an estimate of when it will be worked on but I will pass on to our product manager that there are additional developers requesting it.

Hi @Nicholas_Trecina, have you planned something about the Java Rest APIs for appointment and contact relation.
Actually, I have to take some decisions on the basis of that.
If you guys have planned this in near future then it would be great and I think I should wait until that time.

@Anurag_Dwivedi,

The REST api would not be ‘Java Specific’ as Java, PHP, JS, Ruby etc would simply be used to call endpoints. That being said, the REST implementation already has appointments included:

The story has been prioritized with our product manager and is queued up to be worked. I would say a rough estimate is that it could be worked on in the next 5-6 weeks.

Great news! We have implemented this request, check the developer site for detail. Keap REST API

1 Like