Application Packaging Standard

Last updated 18-Mar-2019

ContactManagement

This APS type represents the platform built-in Contact Management Service that exposes some operations to get data necessary for operating account contacts. The considered APS type operates contact primitives like countries, ZIP codes, and other.

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "ContactManagement",
  "id": "http://www.parallels.com/pa/pa-core-services/contact-management/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "access": {
    "global": true
  },
  "operations": {
    "initialize": {
      "path": "contact/initialize",
      "verb": "POST",
      "errorResponse": {
        "type": "object"
      }
    },
    "countries": {
      "path": "contact/countries",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "Country"
        }
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "zipLookup": {
      "path": "contact/zipLookup",
      "verb": "GET",
      "response": {
        "type": "ZipCodeResult"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "country": {
          "kind": "query",
          "type": "string"
        },
        "zip": {
          "kind": "query",
          "type": "string"
        }
      }
    },
    "hideWelcome": {
      "path": "welcome/hide",
      "verb": "POST",
      "errorResponse": {
        "type": "object"
      }
    }
  },
  "structures": {
    "Country": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ZipCodeResult": {
      "type": "object",
      "properties": {
        "countryCode": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "stateCode": {
          "type": "string"
        },
        "adminName2": {
          "type": "string"
        },
        "adminCode2": {
          "type": "string"
        },
        "adminName3": {
          "type": "string"
        },
        "adminCode3": {
          "type": "string"
        },
        "latitude": {
          "type": "string"
        },
        "longitude": {
          "type": "string"
        },
        "accuracy": {
          "type": "string"
        }
      }
    }
  }
}

Custom Operations

OPERATION VERB PATH RETURNS Description
countries GET contact/countries If successful, returns a list of Country structures in the response body. The contact/countries custom operation is used to get a list of countries available in the platform. For each country, it returns the country ID, name, and a list of states/provinces if the latter exist.
zipLookup GET contact/zipLookup If successful, returns a list of ZipCodeResult structures in the response body. The contact/zipLookup?country={country-code}&zip={zipCode} custom operation finds the geographical location by country code and zip code. For example, GET /aps/2/resources/36a90fde-85a3-4ce0-b6cb-d934dd3704eb/contact/zipLookup?country=US&zip=64114.

countries

HTTP Request

GET /aps/2/resources/{aps-id}/contact/countries

Description

The contact/countries custom operation is used to get a list of countries available in the platform. For each country, it returns the country ID, name, and a list of states/provinces if the latter exist.

Returns

If successful, returns a list of Country structures in the response body.

zipLookup

HTTP Request

GET /aps/2/resources/{aps-id}/contact/zipLookup

Description

The contact/zipLookup?country={country-code}&zip={zipCode} custom operation finds the geographical location by country code and zip code. For example, GET /aps/2/resources/36a90fde-85a3-4ce0-b6cb-d934dd3704eb/contact/zipLookup?country=US&zip=64114.

Parameters

PARAMETER TYPE DESCRIPTION
country String Country code
zip String Zip code

Returns

If successful, returns a list of ZipCodeResult structures in the response body.

Structures

Country

Country

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
id String Not Required   Country code.
name String Not Required   Country name.

InitializationData

Initialization Data - used for internal purposes.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
addressLine1 String Not Required   Address line
addressLine2 String Not Required   Address line 2
bvt Boolean Not Required   Is BVT
city String Not Required   City
companyName String Not Required   Company Name
country String Not Required   Country
currencyId String Not Required   Currency Id
dnsServiceTemplateId String Not Required   DNS service template id
email String Not Required   Email
faxArea String Not Required   Fax Area code
faxCountry String Not Required   Fax Country code
faxExtension String Not Required   Fax extension
faxNumber String Not Required   Fax number
firstName String Not Required   First Name
lastName String Not Required   Last Name
middleName String Not Required   Middle Name
newPassword String Not Required   New Password
phoneArea String Not Required   Phone Area code
phoneCountry String Not Required   Phone Country code
phoneExtension String Not Required   Phone Extension
phoneNumber String Not Required   Phone Number
postalCode String Not Required   Postal Code
providerToken String Not Required   Provider token
secret String Not Required   Secret
state String Not Required   State
taxRegistrationId String Not Required   Tax Registration Id

ZipCodeResult

The structure contains geographical data returned by the zipLookup operation.

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
accuracy String Not Required   Accuracy.
adminCode2 String Not Required   Admin Code 2.
adminCode3 String Not Required   Admin Code 3.
adminName2 String Not Required   Admin Name 2.
adminName3 String Not Required   Admin Name 3.
city String Not Required   City.
countryCode String Not Required   Country code.
latitude String Not Required   Latitude.
longitude String Not Required   Longitude.
postalCode String Not Required   Postal code.
state String Not Required   State.
stateCode String Not Required   State Code.

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.