Table of contents

    Overview

    A Contact is an individual that is associated with a Client (a Client being an organisation or company). To call the Contact endpoint, use one of the URLs from the following tables:

    URL GET PUT POST DELETE
    https://api.mypcorp.com/contact
    https://api.mypcorp.com/contact/{Guid}

    NB: Currently, the MYP API only accepts GET requests. PUT, POST and DELETE requests will be available in the future.

    Fields

    The following table illustrates which fields can be included when sending a POST or PUT request or when receiving a GET response. If there is a number next to the data type (e.g. string (500)), this means that the maximum number of characters for this field can be that number. If the field is required when sending a POST or PUT request, that is stated in the description for that field.

    NB: Dates must be set in the standard SQL datetime format, which is YYYY-MM-DD hh:mm:ss[.nnn].

    NB: Nested properties are hidden by default. To expand all nested properties, add $expand=* to the URL. To expand a specific nested property, set the property name after $expand= (i.e. $expand=Occupation).

    Field Name Description
    ContactGuid
    Guid (Identifier)
    The Contact’s id. This is a read only field.
    UniqueCode
    string (100)
    Contact’s unique code.
    FirstName
    string (100)
    Contact’s first name. Required for POST requests.
    LastName
    string (100)
    Contact’s last name. Required for POST requests.
    SalutationChoiceOther
    string (100)
    Contact’s custom salutation, if standard salutations do not suit.
    NumberOfChildren
    integer
    Specifies the number of children the Contact has.
    Interests
    string (400)
    Contact’s interests.
    AcceptsMarketingContact
    string (1)
    Indicates whether the Contact accepts emails or not. Set to Y for yes or N for no. Required for POST requests.
    SpecialRequirements
    string
    Contact’s special requirements.
    Department
    string (200)
    Name of the Department to which this Contacts belongs to.
    OfficialTitle
    string (200)
    Contact’s official title.
    PositionOther
    string (200)
    Contact’s occupation if there is no relevant Occupation object for it.
    SendBirthdayReminder
    string (1)
    Indicates whether a reminder about the Contact’s birthday should be sent out. Set to Y for yes or N for no.
    Birthday
    string
    Date of the Contact’s birthday.
    SendSpouseBirthdayReminder
    string (100)
    Indicates whether a reminder about the Contact’s Spouses birthday should be sent. Set to Y for yes or N for no.
    SpouseBirthday
    datetime
    Birth date of the Contact’s Spouse.
    SpouseFirstName
    string (100)
    First name of the Contact’s Spouse.
    SpouseLastName
    string (100)
    Last name of the Contact’s Spouse.
    HomePhone
    string (100)
    Contact’s home phone.
    PhoneNumber
    string (200)
    Contact’s phone number.
    PhoneNumber2
    string (200)
    Contact’s secondary phone number, if applicable.
    Fax
    string (200)
    Contact’s fax number.
    UsePrimaryEmail
    string (1)
    Indicates whether the primary email should be used when communicating with the Contact. Set to Y for yes or N for no.
    UseSecondaryEmail
    string (1)
    Indicates whether the secondary email should be used when communicating with the Contact. Set to Y for yes or N for no.
    SecondaryEmail
    string (100)
    Contact’s secondary email, if applicable.
    FacebookUrl
    string (100)
    URL for Contact’s Facebook account.
    TwitterUrl
    string (100)
    URL for Contact’s Twitter account.
    YouTubeUrl
    string (100)
    URL for Contact’s YouTube Channel.
    LinkedInUrl
    string (100)
    URL for Contact’s LinkedIn account.
    OtherSocialMediaUrl
    string (100)
    URL for any other social media platforms for this Contact.
    HomeStreetAddress
    string (100)
    Contact’s home street address.
    HomeStreetAddress2
    string (100)
    Second field for Contact’s home street address.
    HomeTown
    string (100)
    Contact’s home Town.
    HomeTownCity
    string (100)
    Contact’s home Town or City.
    HomePostCode
    string (100)
    Contact’s home post code.
    DifferentPostalAddress
    string (1)
    Indicates whether the Contact uses a postal address different to their home address. Set to Y for yes or N for no.
    HomePostalStreetAddress
    string (100)
    Contact’s postal street address, if it is different to their home address.
    HomePostalStreetAddress2
    string (100)
    Second field for Contacts postal street address, if it is different to their home address.
    HomePostalTown
    string (100)
    Contact’s postal town, if it is different to their home address.
    HomePostalTownCity
    string (100)
    Contact’s postal Town or City, if it is different to their home address.
    HomePostalPostCode
    string (100)
    Post code for Client’s postal address, if it is different to their home address.
    AccountManagerGuid
    Guid
    Guid of the Contact’s Account Manager. To view the Account Manager’s details, refer to Staff endpoint.
    CreationDate
    string
    The date the Contact’s record was created. This is a read only field.
    ModifyDate
    string
    Date when the Contact’s record was last modified. This is a read only field.
    ArchiveDate
    string
    Date when the Contact was archived, if they have been archived.
    Salutation
    object
    Contact’s salutation. E.g. ‘Mr’, ‘Ms’, ‘Dr’, etc.
    User
    object
    Contact’s identification information, called a User object. It contains information such as first name, last name, username and user id. The Username property is the Client’s primary email address.
    Occupation
    object
    Contact’s occupation.
    Role
    object
    Contact’s role.
    Client
    object
    Indicates which Client the Contact is associated with. Required for POST requests. Must be unique.
    HomeState
    object
    Contact’s home state.
    50: Australian Capital Territory
    100: New South Wales
    200: Northern Territory
    300: Queensland
    400: South Australia
    500: Tasmania
    600: Victoria
    700: Western Australia
    HomeCountry
    object
    Contact’s home country.
    100: Australia
    200: New Zealand
    17600: Norway
    4800: China
    600: United States
    HomePostalState
    object
    Contact’s postal state, if it is different to their home address.
    50: Australian Capital Territory
    100: New South Wales
    200: Northern Territory
    300: Queensland
    400: South Australia
    500: Tasmania
    600: Victoria
    700: Western Australia
    CustomFields
    object
    Custom field/s of a Contact. This field is accessible only when the endpoint is called with the Contact’s id. This is a read only field.

    Example JSON format:

    {
      "@odata.context": "https://api.mypcorp.com/$metadata#Contact(User(),Occupation(),HomeCountry(),HomeState(),HomePostalState(),Salutation(),Role(),Client())",
      "value": [
        {
          "ContactGuid": "b2bfcaa4-2f77-eb11-b82a-08626626e1a4",
          "UniqueCode": "GOTHAM123",
          "FirstName": "Bruce",
          "LastName": "Wayne",
          "SalutationChoiceOther": "Mr",
          "NumberOfChildren": 3,
          "Interests": "Arts & Crafts, colouring books.",
          "AcceptsMarketingContact": "N",
          "SpecialRequirements": "Wants to volunteer in the community",
          "Department": "Corporate Services Division",
          "OfficialTitle": "NDIS Participant",
          "PositionOther": "Principal",
          "SendBirthdayReminder": "N",
          "Birthday": "1978-04-17T00:00:00+10:00",
          "SendSpouseBirthdayReminder": "N",
          "SpouseBirthday": "1979-06-24T00:00:00+10:00",
          "SpouseFirstName": "Jane",
          "SpouseLastName": "Doe",
          "HomePhone": "8877 6655",
          "PhoneNumber": "87625432109",
          "PhoneNumber2": "0412 345 678",
          "Fax": "(03) 1234 5678",
          "UsePrimaryEmail": "N",
          "UseSecondaryEmail": "N",
          "SecondaryEmail": "bruce.wayne@gmail.com",
          "FaceBookUrl": "https://www.facebook.com/brucewayne/",
          "TwitterUrl": "www.twitter.com/brucewayne",
          "YouTubeUrl": "https://www.youtube.com/channel/abcdefg",
          "LinkedInUrl": "https://www.linkedin.com/in/bruce-wayne-12345678/",
          "OtherSocialMediaUrl": "http://www.google.com",
          "HomeStreetAddress": "1007",
          "HomeStreetAddress2": "Mountain Drive",
          "HomeTown": "Gotham",
          "HomeTownCity": "Gotham City",
          "HomePostCode": "4000",
          "DifferentPostalAddress": "N",
          "HomePostalStreetAddress": "123",
          "HomePostalStreetAddress2": "Elf Road",
          "HomePostalTown": "North Pole",
          "HomePostalTownCity": "North Pole Town",
          "HomePostalPostCode": "9999",
          "AccountManagerGuid": "b0fbdda4-1d8e-e811-8102-fabb788fbb9b",
          "CreationDate": "2021-02-25T16:06:42.437+10:00",
          "ModifyDate": "2021-02-25T16:06:42.437+10:00",
          "ArchiveDate": "2021-01-01T00:00:00+10:00",
          "Salutation": {
            "ChoiceId": 18700,
            "Text": "Dr"
          },
          "User": {
            "UserGuid": "e2c97e28-713b-eb11-b829-08626626e1a4",
            "UserName": "janedoe@connectedself.com.au",
            "FirstName": "Jane",
            "LastName": "Doe"
          },
          "Occupation": {
            "OccupationId": 7400,
            "Role": "Marketing Specialist"
          },
          "Role": {
            "RoleGuid": "3ff5c6be-cb60-e311-85e5-9c6ed721e1fb",
            "Name": "Director - Operations"
          },
          "Client": {
            "ClientGuid": "254c7a3c-2777-eb11-b82a-08626626e1a4",
            "BusinessName": "John Doe Group",
            "Uri": "https://api.mypcorp.com/client/254c7a3c-2777-eb11-b82a-08626626e1a4"
          },
          "HomeState": {
            "StateId": 300,
            "FullName": "Queensland",
            "Abbreviation": "QLD"
          },
          "HomeCountry": {
            "CountryId": 100,
            "Name": "Australia",
            "FinancialYearStartMonth": 7,
            "StateName": "State"
          },
          "HomePostalState": {
            "StateId": 100,
            "FullName": "New South Wales",
            "Abbreviation": "NSW"
          },
          "CustomFields": [
            {
              "Name": "MYP Conference",
              "Responses": []
            },
            {
              "Name": "Decision-maker",
              "Responses": []
            }
          ] 
        }
      ]
    }

    Previous article Next article