Jump to content

Sage CRM Rest API - $type does not show GET Email or GET Phone


 Share

Recommended Posts

We use the Rest API of Sage CRM (2022 R2). The result of a GET of an Email fails to return the type of the Email. Same for GET of Phone. The documentation shows that the response should contain attribute '$type', but in effect it is not there. We need $type to be able to identify the type of email address...

Does anyone have an idea what could go wrong here?

Documentation:
https://developer.sage.com/crm/reference/2022R2/#tag/Email/paths/~1Email('{key}')/get

Request:
https://xxxxxxxxxx/sdata/crmj/sagecrm2/-/Email('45240')

Response:

{
    "$key": 45240,
    "$title": "",
    "$url": "http://xxxxxxxxxx/sdata/crmj/sagecrm2/-/Email('45240')",
    "Emai_EmailId": 45240,
    "emai_IntForeignID": null,
    "emai_intlastsyncdate": null,
    "Emai_EmailAddress": "xxxxxxx@xxxxx",
    "emai_IntId": null,
    "emai_promote": false,
    "Company": {
        "$url": {
            "Association": "http://xxxxxxxxxx/sdata/crmj/sagecrm2/-/Email('45240')/Company?startindex=1&count=10"
        }
    },
    "Account": {
        "$url": {
            "Association": "http://xxxxxxxxxx/sdata/crmj/sagecrm2/-/Email('45240')/Account?startindex=1&count=10"
        }
    },
    "Person": {
        "$url": {
            "Association": "http://xxxxxxxxxx/sdata/crmj/sagecrm2/-/Email('45240')/Person?startindex=1&count=10"
        }
    }
}

Response example in documentation:

{
  "emai_IntForeignID": "string",
  "emai_intlastsyncdate": "2019-08-24T14:15:22Z",
  "Emai_Deleted": 0,
  "Emai_EmailAddress": "string",
  "Emai_EmailId": 0,
  "emai_IntId": 0,
  "emai_promote": true,
  "Emai_Timestamp": "2019-08-24T14:15:22Z",
  "$type": "string"
}

 

Edited by Bas van Engelen
Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...