In this document:
A management system needs to add a client company to the platform in order to subscribe it later to some cloud services.
To create a customer, you need to consider the following.
Property | Type | Sample value | Notes |
---|---|---|---|
aps.type |
URI | “http://parallels.com/aps/types/pa/account/1.2” | Exact match with the ID specified in the PAAccount APS type. |
type |
String enum | “CLIENT” | This creates a customer account. |
personal |
Boolean | false | Creating a company, not a person. |
companyName |
String | “ISV One” | Assign a name to the customer company. |
addressPostal |
Structure | {“streetAddress”:”11, ISVone”, “locality”:”Herndon”, “region”:”VA”, “countryName”:”us”, “postalCode”:”12345”} | Enter full postal address as specified by the http://aps-standard.org/types/core/contact/1.1#Address
structure in the Account type. |
adminContact |
Structure | {“email”:”isv1@aps.test”, “givenName”:”Mike”, “familyName”:”Wilson”, “telVoice”:”1(888)1234567”} | Enter the administrative contacts. |
billingContact |
Structure | {“email”:”isv1@aps.test”, “givenName”:”Mike”, “familyName”:”Wilson”, “telVoice”:”1(888)1234567”} | Enter the billing contacts. |
techContact |
Structure | {“email”:”isv1@aps.test”, “givenName”:”Mike”, “familyName”:”Wilson”, “telVoice”:”1(888)1234567”} | Enter the technical contacts. |
Note
Some properties, for example, companyName
and addressPostal
,
are inherited from the standard account APS type.
Before you start creating a new account, verify if there is an account with similar properties. The following examples provide typical use cases that narrow a list of requested objects by adding an RQL filter to a request.
Get a list of all customers:
GET /aps/2/resources?implementing(http://parallels.com/aps/types/pa/account/1.2),eq(type,CLIENT)
Get a list of accounts whose company name or contact mail address match the respective properties of the new customer.
GET /aps/2/resources?implementing(http://parallels.com/aps/types/pa/account/1.2),or(eq(companyName,ISV%20one),eq(adminContact.email,isv1@aps.test))
If there is a match with some properties of the new customer you are going to create, you can preliminary modify the properties that you want to be unique.
The following procedure is valid for the case when the platform does not contain the BSS (business support system).
To create a customer with required properties, use a POST request with the source data similar to the following:
POST /aps/2/resources/
{ "aps":{
"type":"http://parallels.com/aps/types/pa/account/1.2"
},
"type":"CLIENT",
"personal":false,
"companyName":"ISV one",
"addressPostal":{
"countryName":"us",
"locality":"Herndon",
"postalCode":"12345",
"region":"VA",
"streetAddress":"11, ISVone ave."
},
"adminContact":{
"email":"isv1@aps.test",
"givenName":"Mike",
"familyName":"Wilson",
"telVoice":"1(888)1234567"
},
"billingContact":{
"email":"isv1@aps.test",
"givenName":"Mike",
"familyName":"Wilson",
"telVoice":"1(888)1234567"
},
"techContact":{
"email":"isv1@aps.test",
"givenName":"Mike",
"familyName":"Wilson",
"telVoice":"1(888)1234567"
}
}
In case of success, the response looks as follows:
HTTP/1.1 200 OK
{
"aps": {
"type": "http://parallels.com/aps/types/pa/account/1.2",
"id": "e489cb96-e988-475a-854b-0d0a67a18aed",
"status": "aps:ready",
"revision": 4,
"modified": "2016-09-29T10:15:26Z",
"package": {
"id": "e86ef200-5751-4c2c-b342-e65483ede6d0",
"href": "/aps/2/packages/e86ef200-5751-4c2c-b342-e65483ede6d0"
},
},
"addressPostal": {
"countryName": "us",
"locality": "Herndon",
"postalCode": "12345",
"region": "VA",
"streetAddress": "11, ISVone ave."
},
"adminContact": {
"email": "isv1@aps.test",
"familyName": "Wilson",
"givenName": "Mike",
"locale": "en_US",
"middleName": "",
"organizationName": "",
"telVoice": "+18881234567"
},
"billingContact": {
"email": "isv1@aps.test",
"familyName": "Wilson",
"givenName": "Mike",
"locale": "en_US",
"middleName": "",
"organizationName": "",
"telVoice": "+18881234567"
},
"companyName": "ISV one",
"id": 10,
"locked": false,
"personal": false,
"techContact": {
"email": "isv1@aps.test",
"familyName": "Wilson",
"givenName": "Mike",
"locale": "en_US",
"middleName": "",
"organizationName": "",
"telVoice": "+18881234567"
},
"type": "CLIENT",
"accounts": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/accounts"
}
},
"brands": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/brands"
}
},
"domains": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/domains"
}
},
"subscriptions": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/subscriptions"
}
},
"templates": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/templates"
}
},
"users": {
"aps": {
"link": "collection",
"href": "/aps/2/resources/e489cb96-e988-475a-854b-0d0a67a18aed/users"
}
}
}
Similarly, you can add more customers.
You have successfully created one or more customers whom you can subscribe to services. You can use additional verification of their existence:
Note
The new customer does not have staff members (administrators) yet.