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/{ClientGuid}

    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/contact/$metadata#Client(KeyContact())",
      "value": [
        {
          "ClientGuid": "6E7ED550-D5A6-4ED5-B91B-C3856A124699",
          "BusinessName": "Wayne Enterprises Industries",
          "BusinessNumber": "12345",
          "UniqueCode": "Gotham123",
          "IsSelf": true,
          "ExternalReference": "0987654321",
          "BusinessPhone": "8123 4567",
          "BusinessPhone2": "8890 1234",
          "BusinessFax": "8765 4321",
          "WebAddress": "www.waynecorp.org",
          "CreationDate": "2021-08-17T20:14:36.69+10:00",
          "ModifyDate": "2022-10-21T09:56:33.363+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"
                }
              ]
            }
          ],
          "KeyContact": {
            "ContactGuid": "03f27516-04b2-eb11-b82b-08626626e1a4",
            "FirstName": "Bruce",
            "LastName": "Wayne",
            "ArchiveDate": null
          }
        }
      ]
    }

    Post

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

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

    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 (90)
    The Australian Business Number (ABN) of this Client. Optional
    UniqueCode
    string (90)
    Client’s unique code. Must be unique. Optional
    ExternalReference
    string (90)
    An external reference for this Client (e.g. an id in a third-party application). Optional
    BusinessPhone
    string (90)
    The phone of the organisation that the Client belongs to, if applicable. Optional
    BusinessPhone2
    string (90)
    The secondary phone of the organisation that the Client belongs to, if applicable. Optional
    BusinessFax
    string (90)
    Client’s fax number. Optional
    WebAddress
    string (90)
    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 (90)
    Client’s street address. Optional
    StreetAddress2
    string (90)
    Second field for the Client’s street address. Optional
    Suburb
    string (90)
    Client’s suburb. Optional
    City
    string (90)
    Client’s town or city. Optional
    State
    string
    Client’s state abbreviation. E.g. ‘QLD’. Optional
    Country
    string
    Client’s country name. E.g. ‘Australia’. Required if State or PostalState is not null. Required.
    (Conditional)
    PostCode
    string (90)
    Client’s post code for their primary address. Optional
    Postal Address
    Field Description Required
    PostalAddress
    string (90)
    Client’s postal address, if it is different to their primary address. Optional
    PostalAddress2
    string (90)
    Second field for Client’s postal address, if it is different to their primary address. Optional
    PostalSuburb
    string (90)
    Suburb for the Client’s postal address, if the postal address is different to their primary address. Optional
    PostalCity
    string (90)
    Town or City for the Client’s postal address, if the postal address is different to their primary address. Optional
    PostalState
    string
    Postal state abbreviation, if the postal address is different to their primary address. E.g. ‘NSW’. Optional
    PostalPostCode
    string (90)
    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": "12345",
          "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