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 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. Numbers next to the data type (e.g. string (500)), indicate the maximum number of characters accepted for that field. Required fields for POST and PUT requests are indicated in the ‘Description’ column.

    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=KeyContact).

    Field Description
    ClientGuid
    Guid (Identifier)
    Client’s id. This is a read only field.
    BusinessName
    string (255)
    The name of the organisation that the Client belongs to, if applicable.
    UniqueCode
    string (100)
    Client’s unique code.
    BusinessPhone
    string (200)
    The phone of the organisation that the Client belongs to, if applicable.
    BusinessPhone2
    string (200)
    The secondary phone of the organisation that the Client belongs to, if applicable.
    ExternalReference
    string (100)
    An external reference for this Client (e.g. an id in a third-party application).
    BusinessFax
    string (200)
    Client’s fax number.
    WebAddress
    string (200)
    The URL for the Client’s personal website, if applicable.
    StreetAddress
    string (200)
    Client’s street address.
    StreetAddress2
    string (200)
    Second field for the Client’s street address.
    Suburb
    string (200)
    Client’s suburb.
    TownCity
    string (100)
    Client’s Town or City.
    PostCode
    string (200)
    Client’s post code for their primary address.
    PostalAddress
    string (200)
    Client’s postal address, if it is different to their primary address.
    PostalAddress2
    string (200)
    Second field for Client’s postal address, if it is different to their primary address.
    PostalTown
    string (200)
    Town for the Client’s postal address, if the postal address is different to their primary address.
    PostalTownCity
    string (100)
    Town or City for the Client’s postal address, if the postal address is different to their primary address.
    PostalPostCode
    string (200)
    Post code for Client’s postal address, if the postal address is different to their primary address.
    CreationDate
    string
    The date the Client’s record was created. This is a read only field.
    ModifyDate
    string
    The date when the Client’s record was last modified. This is a read only field.
    ArchiveDate
    string
    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. This is a read only field.
    KeyContact
    object
    Indicates the Key Contact associated with this Client.
    State
    object
    Client’s State.
    50: Australian Capital Territory
    100: New South Wales
    200: Northern Territory
    300: Queensland
    400: South Australia
    500: Tasmania
    600: Victoria
    700: Western Australia
    Country
    object
    Client’s country of residence.
    100: Australia
    200: New Zealand
    17600: Norway
    4800: China
    600: United States
    PostalState
    object
    Client’s postal State, if the postal address is different to their primary address.
    50: Australian Capital Territory
    100: New South Wales
    200: Northern Territory
    300: Queensland
    400: South Australia
    500: Tasmania
    600: Victoria
    700: Western Australia

    Example JSON format:

    {
      "@odata.context": "https://api.mypcorp.com/$metadata#Client(State(),Country(),PostalState(),KeyContact())",
      "value": [
        {
          "ClientGuid": "30978644-2877-eb11-b82a-08626626e1a4",
          "BusinessName": "Wayne Enterprises",
          "UniqueCode": "333",
          "BusinessPhone": "8123 4567",
          "BusinessPhone2": "8890 1234",
          "ExternalReference": "0987654321",
          "BusinessFax": "8765 4321",
          "WebAddress": "www.waynecorm.org",
          "StreetAddress": "Unit 123",
          "StreetAddress2": "360 Sinclair Street",
          "Suburb": "NOBLE PARK",
          "TownCity": "Gotham City",
          "PostCode": "1234",
          "PostalAddress": "PO Box 4321",
          "PostalAddress2": "PO Box 6543",
          "PostalTown": "Postal Gotham",
          "PostalTownCity": "Postal Gotham City",
          "PostalPostCode": "Postal 5432",
          "CreationDate": "2021-02-25T15:13:58.68+10:00",
          "ModifyDate": "2021-02-25T15:13:58.68+10:00",
          "ArchiveDate": "2020-05-27T00:00:00+10:00",
          "CustomFields": [
            {
              "Name": "Services provided",
              "Responses": [
                "Plan manager",
                "Support coordinator",
                "Plan manager",
                "Support coordinator"
              ]
            }
          ],
          "KeyContact": {
            "ContactGuid": "e0c44fd2-69ad-4b3c-65f5-08d8d47156ec",
            "ClientFirstName": "Jane",
            "ClientLastName": "Doe",
            "Uri": "https://api.mypcorp.com/contact/e0c44fd2-69ad-4b3c-65f5-08d8d47156ec"
          },
          "State": {
            "StateId": 100,
            "FullName": "New South Wales",
            "Abbreviation": "NSW"
          },
          "Country": {
            "CountryId": 100,
            "Name": "Australia",
            "FinancialYearStartMonth": 7,
            "StateName": "State"
          },
          "PostalState": {
            "StateId": 100,
            "FullName": "New South Wales",
            "Abbreviation": "NSW"
          }
        }
      ]
    }

    Return home Next article