SuperOfficeDocs / feedback

Contains feedback issues created by the community. Feedback issues are created by readers who click the feedback button on content pages in the docs.superoffice.com website.
MIT License
2 stars 0 forks source link

Feedback for POST Appointment #111

Closed lheapcs closed 1 year ago

lheapcs commented 1 year ago

Hello there,

Is there any further guidance on how to send entities such as Associates or Contacts to this endpoint? I've tried using the MDOList lookup and then putting objects that reflect those in the list in this POST request but that doesn't seem to work correctly. I've also tried with just sending AssociateId and ContactId etc. and this also doesn't seem to work. The requests send correctly but when I lookup the record none of the data is there and all IDs are 0. Any assistance much appreciated!

Thanks


Document Details

Do not edit this section. It is required for docs.superOffice.com ➟ Docs Team processing.

SuperOfficeDevNet commented 1 year ago

Hi @lheapcs!

You can set the associate and contact using their IDs, but since you used plural for each of those, do you actually mean setting Participants?, for example:

{
  "Associate": {
    "AssociateId": 21
  },
  "Contact": {
    "ContactId": 25
  },
  "Participants": [
    {
      "PersonId": 5,
      "ContactId": 2
    },
    {
      "PersonId": 5
    },
    {
      "AssociateId": 5
    },
    {
      "AssociateId": 5,
      "PersonId": 5,
      "ContactId": 2
    }
  ]
}

The PersonId OR the AssociateId is the only mandatory Participant property, the rest will resolved by a validation routine in the application server. That said, if you know the IDs, add them. Make sure the person creating the appointment is also a participant, and has a diary!

lheapcs commented 1 year ago

Brilliant thank you that resolves the issue I was experiencing!

Is the use of this specified somewhere else other than the POST Appointments doc page? I hadn't seen the specified format anywhere and had been trying to use the following format due to how the MDOList returns and how a GET Appointments returns the Associate object.: { "Associate": { "Id": 1 } }

It may be worth adding the format you specified above in the example request on the POST Appointment documentation page for clarity :)