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 table:

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

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

    Get

    The following table illustrates which fields can be included when receiving a GET response.

    NB: Nested properties are hidden by default. To expand all nested properties, add a query parameter $expand=* to the URL.

    Contact
    Field Name Description
    ContactGuid
    Guid (Identifier)
    The Contact’s id.
    FirstName
    string
    Contact’s first name.
    LastName
    string
    Contact’s last name.
    PersonalTitle
    string
    Contact’s salutation.
    PersonalTitleOther
    string
    Contact’s custom salutation, if standard salutations do not suit.
    Teams
    string
    Name of Teams or Departments to which this Contacts belongs to.
    PositionTitle
    string
    Contact’s official title.
    AcceptsEmailContact
    string
    Indicates whether the Contact accepts emails or not.
    AcceptsSmsContact
    string
    Indicates whether the Contact accepts SMS or not.
    UniqueCode
    string
    Contact’s unique code.
    NdisNumber
    string
    Contact’s NDIS number.
    Gender
    string
    Contact’s gender.
    SendBirthdayReminder
    boolean
    Indicates whether a reminder about the Contact’s birthday should be sent out.
    Birthday
    date
    Date of the Contact’s birthday.
    SendPartnerBirthdayReminder
    boolean
    Indicates whether a reminder about the Contact partner’s birthday should be sent..
    PartnerBirthday
    date
    Birth date of the Contact’s partner.
    PartnerFirstName
    string
    First name of the Contact’s partner.
    PartnerLastName
    string
    Last name of the Contact’s partner.
    NumberOfChildren
    integer
    Specifies the number of children the Contact has.
    HobbiesInterests
    string
    Contact’s hobbies and interests.
    AdditionalInformation
    string
    Contact’s special requirements or additional information.
    UsePrimaryEmail
    boolean
    Indicates whether the primary email should be used when communicating with the Contact.
    PrimaryEmail
    string
    Contact’s primary email, if applicable.
    UseSecondaryEmail
    boolean
    Indicates whether the secondary email should be used when communicating with the Contact.
    SecondaryEmail
    string
    Contact’s secondary email, if applicable.
    Phone1
    string
    Contact’s phone number.
    Phone2
    string
    Contact’s secondary phone number, if applicable.
    Fax
    string
    Contact’s fax number.
    HomePhone
    string
    Contact’s home phone.
    FacebookUrl
    string
    URL for Contact’s Facebook account.
    TwitterUrl
    string
    URL for Contact’s Twitter account.
    YouTubeUrl
    string
    URL for Contact’s YouTube Channel.
    LinkedInUrl
    string
    URL for Contact’s LinkedIn account.
    OtherSocialMediaUrl
    string
    URL for any other social media platforms for this Contact.
    CreationDate
    datetime
    The date the Contact’s record was created.
    ModifyDate
    datetime
    Date when the Contact’s record was last modified.
    ArchiveDate
    datetime
    Date when the Contact was archived, if they have been archived.
    Address
    object
    Contact’s address.
    PostalAddress
    object
    Contact’s postal address, if it is different to their home address.
    CustomFields
    object
    Custom field(s) of a Contact. This field is accessible only when the endpoint is called with Contact’s guid.
    AccountManager
    object
    Contact’s Account Manager. To view the Account Manager’s details, refer to Staff endpoint.
    PrimaryRole
    object
    Contact’s Role.
    Client
    object
    Indicates which Client the Contact is associated with.
    Address
    Field Name Description
    StreetAddress
    string
    Contact’s home street address.
    StreetAddress2
    string
    Second field for Contact’s home street address.
    Suburb
    string
    Contact’s suburb.
    City
    string
    Contact’s home Town or City.
    State
    string
    Contact’s home state.
    Country
    string
    Contact’s home country.
    PostCode
    string
    Contact’s home post code.
    Postal Address
    Field Name Description
    PostalAddress
    string
    Contact’s postal street address, if it is different to their home address.
    PostalAddress2
    string
    Second field for Contacts postal street address, if it is different to their home address.
    PostalSuburb
    string
    Contact’s postal suburb, if it is different to their home address.
    PostalCity
    string
    Contact’s postal Town or City, if it is different to their home address.
    PostalState
    string
    Contact’s postal state, if it is different to their home address.
    PostalPostCode
    string
    Post code for Contact’s postal address, if it is different to their home address.

    Example JSON format:

    {
      "@odata.context": "https://api.mypcorp.com/$metadata#Contact(Role(),Client())",
      "value": [
        {
          "ContactGuid": "03f27516-04b2-eb11-b82b-08626626e1a4",
          "FirstName": "Bruce",
          "LastName": "Wayne",
          "PersonalTitle": "Other",
          "PersonalTitleOther": "Professor",
          "Teams": "Executive Management, Human Resources",
          "PositionTitle": "CEO",
          "AcceptsEmailContact": "Yes",
          "AcceptsSmsContact": "No",
          "UniqueCode": "AC65512345",
          "NdisNumber": "43123456",
          "Gender": "Male",
          "SendBirthdayReminder": true,
          "Birthday": "1978-04-17",
          "SendPartnerBirthdayReminder": true,
          "PartnerBirthday": "1979-06-24",
          "PartnerFirstName": "Jane",
          "PartnerLastName": "Doe",
          "NumberOfChildren": 3,
          "HobbiesInterests": "Arts & Crafts, colouring books.",
          "AdditionalInformation": "Wants to volunteer in the community",
          "UsePrimaryEmail": true,
          "PrimaryEmail": "bruce.wayne@gmail.com",
          "UseSecondaryEmail": false,
          "SecondaryEmail": "bruce.wayne@outlook.com",
          "Phone1": "04123456789",
          "Phone2": "87625432109",
          "Fax": "(03) 1234 5678",
          "HomePhone": "(07) 8877 6655",
          "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": "https://www.google.com",
          "CreationDate": "2020-06-05T11:45:12.383+10:00",
          "ModifyDate": "2021-01-21T17:16:35.613+10:00",
          "ArchiveDate": null,
          "Address": {
            "StreetAddress": "Unit 1234",
            "StreetAddress2": "360 Sinclair Street",
            "Suburb": "NOBLE PARK",
            "City": "Gotham City",
            "State": "QLD",
            "Country": "Australia",
            "PostCode": "hello world"
          },
          "PostalAddress": {
            "PostalAddress": "PO Box 4321",
            "PostalAddress2": "PO Box 6543",
            "PostalSuburb": "Postal Gotham",
            "PostalCity": "Postal Gotham City",
            "PostalState": "NSW",
            "PostalPostCode": "Postal 5432"
          },
          "CustomFields": [
            {
              "CustomFieldGuid": "01faafe0-980f-40b1-a284-727677faefe5",
              "Name": "Services provided",
              "Responses": [
                {
                  "Response": "Support coordinator"
                }
              ]
            }
          ],
          "AccountManager": {
            "StaffGuid": "af0c497c-9958-4f04-a691-e8c3623f93ee",
            "FirstName": "Barbara",
            "LastName": "Gordon",
            "ArchiveDate": null
          },
          "PrimaryRole": {
            "RoleGuid": "d0426984-47d5-4bd8-a5d9-bdc79f21991b",
            "Name": "CEO",
            "ArchiveDate": null
          },
          "Client": {
            "ClientGuid": "53e1e0c4-03b2-eb11-b82b-08626626e1a4",
            "BusinessName": "Wayne Enterprises Industries",
            "BusinessNumber": "5",
            "ArchiveDate": null
          }
        }
      ]
    }

    Post

    New Contacts can be added by using a POST request. An example of POST URL is:

    POST https://api.mypcorp.com/contact

    The following table illustrates which fields can be included when sending a POST request. A number next to the data type (e.g. string (500)), is the maximum number of characters for this field. All required fields must be included in the request body to get a successful response. Dates must be set in the format YYYY-MM-DD hh:mm:ss[.nnn].

    Contact
    Field Name Description Required
    FirstName
    string (90)
    Contact’s first name. Either FirstName, LastName or PrimaryEmail is required. The combination of FirstName, LastName, PrimaryEmail and Client must be unique. Required
    (conditional)
    LastName
    string (90)
    Contact’s last name. Either FirstName, LastName or PrimaryEmail is required. The combination of FirstName, LastName, PrimaryEmail and Client must be unique. Required
    (conditional)
    PersonalTitle
    string
    Contact’s salutation.
    Possible values are:
    Miss
    Mr
    Mrs
    Ms
    Mx
    Dr
    Prof
    Other
    Optional
    PersonalTitleOther
    string (90)
    Contact’s custom salutation, if standard salutations do not suit. This field is only available if ‘PersonalTitle’ field has a value of ‘Other’. Optional
    Teams
    string (200)
    Name of Teams or Departments to which this Contacts belongs to. Optional
    PositionTitle
    string (90)
    Contact’s official title. Optional
    AcceptsEmailContact
    string
    Indicates whether the Contact accepts emails or not. If no value is provided, it is set to the default value that is set in MYP > ARM PRO > Customisation > Settings.
    Possible values are:
    Yes
    No
    Unsubscribed
    Optional
    AcceptsSmsContact
    string
    Indicates whether the Contact accepts SMS or not. If no value is provided, it is set by default to ‘Yes’.
    Possible values are:
    Yes
    No
    Unsubscribed
    Optional
    UniqueCode
    string (90)
    Contact’s unique code. Must be unique. Optional
    NdisNumber
    string (20)
    Contact’s NDIS number. It must start with 31, 43, 44 or 45 and must contain only digits. Optional
    Gender
    string
    Contact’s gender.
    Possible values are:
    Male
    Female
    Unspecified
    Optional
    SendBirthdayReminder
    boolean
    Indicates whether a reminder about the Contact’s birthday should be sent out. Optional
    Birthday
    date
    Date of the Contact’s birthday. Required if SendBirthdayReminder is true. Required
    (conditional)
    SendPartnerBirthdayReminder
    boolean
    Indicates whether a reminder about the Contact partner’s birthday should be sent. Optional
    PartnerBirthday
    date
    Birth date of the Contact’s partner. Required if SendSpouseBirthdayReminder is true. Required
    (conditional)
    PartnerFirstName
    string (90)
    First name of the Contact’s partner. Optional
    PartnerLastName
    string (90)
    Last name of the Contact’s partner. Optional
    NumberOfChildren
    integer
    Specifies the number of children the Contact has. Optional
    HobbiesInterests
    string (400)
    Contact’s hobbies and interests. Optional
    AdditionalInformation
    string (400)
    Contact’s special requirements or additional information. Optional
    UsePrimaryEmail
    boolean
    Indicates whether the primary email should be used when communicating with the Contact. Optional
    PrimaryEmail
    string (90)
    Contact’s primary email. This is used to identify the user. Required if UsePrimaryEmail is true. Either FirstName, LastName or PrimaryEmail is required. Combination of FirstName, LastName, PrimaryEmail and Client must be unique. Required
    (conditional)
    UseSecondaryEmail
    boolean
    Indicates whether the secondary email should be used when communicating with the Contact. Optional
    SecondaryEmail
    string (90)
    Contact’s secondary email Required if UseSecondaryEmail is true. Required
    (conditional)
    Phone1
    string (90)
    Contact’s phone number. Optional
    Phone2
    string (90)
    Contact’s secondary phone number, if applicable. Optional
    Fax
    string (90)
    Contact’s fax number. Optional
    HomePhone
    string (90)
    Contact’s home phone. Optional
    FacebookUrl
    string (90)
    URL for Contact’s Facebook account. Optional
    TwitterUrl
    string (90)
    URL for Contact’s Twitter account. Optional
    YouTubeUrl
    string (90)
    URL for Contact’s YouTube Channel. Optional
    LinkedInUrl
    string (90)
    URL for Contact’s LinkedIn account. Optional
    OtherSocialMediaUrl
    string (90)
    URL for any other social media platforms for this Contact. Optional
    Address
    object
    Contact’s home address. Optional
    PostalAddress
    object
    Contact’s postal address, if it is different to their home address. If postal address is null, the primary address will be used for post. Optional
    AccountManager
    object
    Contact’s Account Manager. To view the Account Manager’s details, refer to Staff endpoint. Optional
    Role
    object
    Contact’s Role. Optional
    Client
    object
    Indicates which Client the Contact is associated with. Combination of FirstName, LastName, PrimaryEmail and Client must be unique. Required
    Address
    Field Name Description Required
    StreetAddress
    string (90)
    Contact’s home street address. Optional
    StreetAddress2
    string (90)
    Second field for Contact’s home street address. Optional
    Suburb
    string (90)
    Contact’s home suburb. Optional
    City
    string (90)
    Contact’s home Town or City. Optional
    State
    string
    Contact’s home state abbreviation. E.g. ‘QLD’. Optional
    Country
    string
    Contact’s home country name. E.g. ‘Australia’. Required if State or PostalState is not null. Required.
    (Conditional)
    PostCode
    string (90)
    Contact’s home post code. Optional
    Postal Address
    Field Name Description Required
    PostalStreetAddress
    string (90)
    Contact’s postal street address, if it is different to their home address. Optional
    PostalStreetAddress2
    string (90)
    Second field for Contacts postal street address, if it is different to their home address. Optional
    PostalSuburb
    string (90)
    Contact’s postal suburb, if it is different to their home address. Optional
    PostalCity
    string (90)
    Contact’s postal Town or City, if it is different to their home address. Optional
    PostalState
    string
    Contact’s postal state abbreviation, if it is different to their home address. E.g. ‘NSW’. Optional
    PostalPostCode
    string (90)
    Post code for Client’s postal address, if it is different to their home address. Optional

    Example JSON format:

    {
      "value": [
        {
          "FirstName": "Bruce",
          "LastName": "Wayne",
          "PersonalTitle": "Other",
          "PersonalTitleOther": "Professor",
          "Teams": "Executive Management, Human Resources",
          "PositionTitle": "CEO",
          "AcceptsEmailContact": "Yes",
          "AcceptsSmsContact": "Unsubscribed",
          "UniqueCode": "AC65512345",
          "NdisNumber": "43123456",
          "Gender": "Male",
          "SendBirthdayReminder": true,
          "Birthday": "1978-04-17",
          "SendPartnerBirthdayReminder": true,
          "PartnerBirthday": "1979-06-24",
          "PartnerFirstName": "Jane",
          "PartnerLastName": "Doe",
          "NumberOfChildren": 3,
          "HobbiesInterests": "Arts & Crafts, colouring books.",
          "AdditionalInformation": "Wants to volunteer in the community",
          "UsePrimaryEmail": true,
          "PrimaryEmail": "bruce.wayne@gmail.com",
          "UseSecondaryEmail": false,
          "SecondaryEmail": "bruce.wayne@outlook.com",
          "Phone1": "04123456789",
          "Phone2": "87625432109",
          "Fax": "(03) 1234 5678",
          "HomePhone": "(07) 8877 6655",
          "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": "https://www.google.com",
          "Address": {
            "StreetAddress": "Unit 1234",
            "StreetAddress2": "360 Sinclair Street",
            "Suburb": "NOBLE PARK",
            "City": "Gotham City",
            "State": "QLD",
            "Country": "Australia",
            "PostCode": "hello world"
          },
          "PostalAddress": {
            "PostalAddress": "PO Box 4321",
            "PostalAddress2": "PO Box 6543",
            "PostalSuburb": "Postal Gotham",
            "PostalCity": "Postal Gotham City",
            "PostalState": "NSW",
            "PostalPostCode": "Postal 5432"
          },
          "AccountManager": {
            "StaffGuid": "af0c497c-9958-4f04-a691-e8c3623f93ee",
          },
          "PrimaryRole": {
            "RoleGuid": "d0426984-47d5-4bd8-a5d9-bdc79f21991b",
          },
          "Client": {
            "ClientGuid": "53e1e0c4-03b2-eb11-b82b-08626626e1a4",
          }
        }
      ]
    }

    Previous article Next article