SugarCRM Rest API Rules

Are there any rules of thumb for what constitutes a "valid" Rest API post request? E.g in the following request:

POST sg-richarddemo.demo.sugarcrm.eu/.../Notes

{
"name": "Test Note 16",
"parent_id": "6c39e3a2-b234-11e6-876e-02b6c8b587a1",
"parent_type": "Accounts",
"note_type_c": "note",
"assigned_user_id": "1",
"team_name": {
"id": "1",
"name": "Global",
"primary": "true",
"selected": "false"
}
}

which are the fields that are necessary to ensure the Note appears under the specified account in the SugarCRM GUI. Thanks.

Parents Reply
  • Request 1: Note appears under specified account:

    POST sg-richarddemo.demo.sugarcrm.eu/.../Notes

    {
    "name": "Test Note 16",
    "parent_id": "6c39e3a2-b234-11e6-876e-02b6c8b587a1",
    "parent_type": "Accounts",
    "note_type_c": "note",
    "assigned_user_id": "1",
    "team_name": {
    "id": "1",
    "name": "Global",
    "primary": "true",
    "selected": "false"
    }
    }

    Request 2: Note is created, but doesn't under specified account

    {
    "parent_id": "6c39e3a2-b234-11e6-876e-02b6c8b587a1",
    "name": "Test Note 31"}

    My question is, other than trial and error, how would I find out which fields are necessary for a note to appear under the specified account. I.e. if request 2 was the starting point, how would I find out that parent_type (and possibly other fields) are also necessary: both requests specify a parent_id.

Children