Table of contents

    Overview

    A Client is an organisation or company that is a customer of the Subscriber. To call the client endpoint, use one of the URLs from the following table:

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

    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.

    Client
    Field Description
    ClientGuid
    Guid (Identifier)
    Client’s id.
    BusinessName
    string
    The name of the organisation that the Client belongs to, if applicable.
    BusinessNumber
    string
    The Australian Business Number (ABN) of this Client.
    UniqueCode
    string
    Client’s unique code.
    IsSelf
    boolean
    This indicates if this client is the subscriber themselves or the other clients they have in ARM.
    ExternalReference
    string
    An external reference for this Client (e.g. an id in a third-party application).
    BusinessPhone
    string
    The phone of the organisation that the Client belongs to, if applicable.
    BusinessPhone2
    string
    The secondary phone of the organisation that the Client belongs to, if applicable.
    BusinessFax
    string
    Client’s fax number.
    WebAddress
    string
    The URL for the Client’s personal website, if applicable.
    Address
    object
    Client’s address.
    PostalAddress
    object
    Client’s postal address, if the postal address is different to their primary address.
    CreationDate
    datetime
    The date the Client’s record was created.
    ModifyDate
    datetime
    The date when the Client’s record was last modified.
    ArchiveDate
    datetime
    Date when the Client was archived, if they have been archived.
    CustomFields
    object
    Custom field(s) of a Client. This field is accessible only when the endpoint is called with Client’s id.
    KeyContact
    object
    Indicates the Key Contact associated with this Client.
    Address
    Field Description
    StreetAddress
    string
    Client’s street address.
    StreetAddress2
    string
    Second field for the Client’s street address.
    Suburb
    string
    Client’s suburb.
    City
    string
    Client’s Town or City.
    State
    string
    Client’s State.
    Country
    string
    Client’s country of residence.
    PostCode
    string
    Client’s post code for their primary address.
    Postal Address
    Field Description
    PostalAddress
    string
    Client’s postal address, if it is different to their primary address.
    PostalAddress2
    string
    Second field for Client’s postal address, if it is different to their primary address.
    PostalSuburb
    string
    Suburb for the Client’s postal address, if the postal address is different to their primary address.
    PostalCity
    string
    Town or City for the Client’s postal address, if the postal address is different to their primary address.
    PostalState
    string
    Client’s postal State, if the postal address is different to their primary address.
    PostalPostCode
    string
    Post code for Client’s postal address, if the postal address is different to their primary address.

    Example JSON response format:

    {
      "@odata.context": "https://api.mypcorp.com/$metadata#Client(*,KeyContact())",
      "value": [
        {
          "ClientGuid": "53e1e0c4-03b2-eb11-b82b-08626626e1a4",
          "BusinessName": "Wayne Enterprises Industries",
          "BusinessNumber": "5",
          "UniqueCode": "Gotham123",
          "IsSelf": false,
          "ExternalReference": "0987654321",
          "BusinessPhone": "8123 4567",
          "BusinessPhone2": "8890 1234",
          "BusinessFax": "8765 4321",
          "WebAddress": "www.waynecorp.org",
          "CreationDate": "2021-05-11T12:51:23.417+10:00",
          "ModifyDate": "2021-05-11T12:51:23.417+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": "af2ad07b-195f-47a1-9b30-b951c735e08a",
              "Name": "Services provided",
              "Responses": [
                {
                  "Response": "Plan manager"
                }
              ]
            }
          ],
          "KeyContact": {
            "ContactGuid": "03f27516-04b2-eb11-b82b-08626626e1a4",
            "FirstName": "Bruce",
            "LastName": "Wayne"
          }
        }
      ]
    }

    Post

    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].

    Client
    Field Description Required
    BusinessName
    string (255)
    The name of the organisation that the Client belongs to, if applicable. Must be unique. Required
    BusinessNumber
    string (200)
    The Australian Business Number (ABN) of this Client. Optional
    UniqueCode
    string (100)
    Client’s unique code. Must be unique. Optional
    ExternalReference
    string (100)
    An external reference for this Client (e.g. an id in a third-party application). Optional
    BusinessPhone
    string (100)
    The phone of the organisation that the Client belongs to, if applicable. Optional
    BusinessPhone2
    string (100)
    The secondary phone of the organisation that the Client belongs to, if applicable. Optional
    BusinessFax
    string (100)
    Client’s fax number. Optional
    WebAddress
    string (100)
    The URL for the Client’s personal website, if applicable. Optional
    Address
    object
    Client’s address. Optional
    PostalAddress
    object
    Client’s postal address, if the postal address is different to their primary address. If postal address is null, the primary address will be used for post. Optional
    KeyContact
    object
    Indicates the Key Contact associated with this Client. Optional
    Address
    Field Description Required
    StreetAddress
    string (100)
    Client’s street address. Optional
    StreetAddress2
    string (100)
    Second field for the Client’s street address. Optional
    Suburb
    string (100)
    Client’s suburb. Optional
    City
    string (100)
    Client’s town or city. Optional
    State
    string (100)
    Client’s state abbreviation. E.g. ‘QLD’. Optional
    Country
    string (100)
    Client’s country name. E.g. ‘Australia’. Required if State or PostalState is not null. Required.
    (Conditional)
    PostCode
    string (100)
    Client’s post code for their primary address. Optional
    Postal Address
    Field Description Required
    PostalAddress
    string (100)
    Client’s postal address, if it is different to their primary address. Optional
    PostalAddress2
    string (100)
    Second field for Client’s postal address, if it is different to their primary address. Optional
    PostalSuburb
    string (100)
    Suburb for the Client’s postal address, if the postal address is different to their primary address. Optional
    PostalCity
    string (100)
    Town or City for the Client’s postal address, if the postal address is different to their primary address. Optional
    PostalState
    string (100)
    Postal state abbreviation, if the postal address is different to their primary address. E.g. ‘NSW’. Optional
    PostalPostCode
    string (100)
    Post code for Client’s postal address, if the postal address is different to their primary address. Optional

    Example JSON request format:

    {
      "value": [
        {
          "BusinessName": "Wayne Enterprises Industries",
          "BusinessNumber": 5,
          "UniqueCode": "Gotham123",
          "ExternalReference": "0987654321",
          "BusinessPhone": "8123 4567",
          "BusinessPhone2": "8890 1234",
          "BusinessFax": "8765 4321",
          "WebAddress": "www.waynecorp.org",
          "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"
          },
          "KeyContact": {
            "ContactGuid": "03f27516-04b2-eb11-b82b-08626626e1a4"
          }
        }
      ]
    }

    Return home Next article