Changes

stoney core: Customers Resource - REST API

7,047 bytes added, 15:17, 19 May 2014
/* Customer creation request message body (Company ) */
| JSON object
| <source lang="javascript">{ ... }</source>
 
|}
 
==== Customer creation request message body (Company ) ====
{| class="wikitable sortable" style="width: 100%;" id="customer_object"
|-
|+ align="top" style="text-align:left;"|Customer Object
! Parameter name
! Data type
! Mandatory
! Description
! Valid content
![http://www.pcre.org/ PCRE]
! Default value
! Example
 
|-
|<code>isCompany</code>
|boolean
|yes
|<code>true</code> if the customer represents a company, <code>false</code> if it's an individual person.
|<code>true</code> or <code>false</code>
|
|
|<source lang="javascript">"isCompany": true</source>
 
|-
|<code>isActive</code>
|boolean
|yes
|
|<code>true</code> or <code>false</code>
|
|<code>true</code>
|<source lang="javascript">"isActive": true</source>
 
|-
|<code>customerName</code>
|string
|yes
|The customer's display name. Mostly the same as the <code>organizationName</code> or the <code>givenName</code> and <code>surname</code> out of the [[#billingAddress_object|billingAddress object]], but can also be the name of a brand.
|UTF-8 {64}
|
|
|<source lang="javascript">"customerName": "Super-duper Hosting"</source>
 
|-
|<code>id</code>
|integer
|yes
|The identification number the newly created customer resource should belong to.
|
|@TODO add regex
|
|<source lang="javascript">"belongsToResellerID": 4000001</source>
 
|-
|[[#billingAddress_object|<code>billingAddress</code>]]
|object
|yes
|An object holding the billing address informations for the given customer. Refer to the [[#billingAddress_object|billingAddress object table]] for more informations.
|
|
|
|<source lang="javascript">
"billingAddress":
{
"organizationName": "Customer Ltd.",
"gender": 'm',
"givenName": "Name",
"surname": "Surname",
"postalAddress": "Street Number",
"countryCode": "CH",
"postalCode": "1234",
"localityName": "Locality",
"preferredLanguage": "en-GB",
"mail": "name.surname@example.com",
"telephoneNumber": "+41 00 000 00 00",
"mobileTelephoneNumber": "+41 00 000 00 00",
"websiteURL": "https://www.example.com/"
}
</source>
 
|-
|[[#shippingAddress_object|<code>shippingAddress</code>]]
|object
|no
|An object holding the shipping address informations for the given customer. Refer to the [[#shippingAddress_object|shippingAddress object table]] for more informations.
|
|
|
|<source lang="javascript">
"shippingAddress":
{
"organizationName": "Customer Ltd.",
"gender": 'm',
"givenName": "Name",
"surname": "Surname",
"postalAddress": "Street Number",
"countryCode": "CH",
"postalCode": "1234",
"localityName": "Locality",
"preferredLanguage": "en-GB",
"mail": "name.surname@example.com",
"telephoneNumber": "+41 00 000 00 00",
"mobileTelephoneNumber": "+41 00 000 00 00",
"websiteURL": "https://www.example.com/"
}
</source>
 
|}
 
{| class="wikitable sortable" style="width: 100%;" id="billingAddress_object"
|-
|+ align="top" style="text-align:left;"|billingAddress Object
!Parameter name
!Data type
!Mandatory
!Description
!Valid content
![http://www.pcre.org/ PCRE]
!Default value
!Example
 
|-
|<code>organizationName</code>
|string
|no
|The name of the organization.
|
|@TODO: Add regex
|
|<source lang="javascript">"organizationName": "Customer Ltd."</source>
 
|-
|<code>gender</code>
|string
|yes
|The gender of the address holder
|Either <code>f</code> for female, <code>m</code> for male or <code>n</code> for neutral.
|
|
|<source lang="javascript">"gender": "f"</source>
 
|-
|<code>givenName</code>
|string
|yes
|The given name (first name or forename) of the address holder.
|UTF-8 {64}
|@TODO: Add regex
|
|<source lang="javascript">"givenName": "Name"</source>
 
|-
|<code>surname</code>
|string
|yes
|The surname (last name or family name) of the address holder.
|UTF-8 {64}
|@TODO: Add regex
|
|<source lang="javascript">"surname": "Surname"</source>
 
|-
|<code>postalAddress</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"postalAddress": ""</source>
 
|-
|<code>countryCode</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"countryCode": ""</source>
 
|-
|<code>postalCode</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"postalCode": ""</source>
 
|-
|<code>localityName</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"localityName": ""</source>
 
|-
|<code>preferredLanguage</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"preferredLanguage": ""</source>
 
|-
|<code>mail</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"mail": ""</source>
 
|-
|<code>telephoneNumber</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"telephoneNumber": ""</source>
 
|-
|<code>mobileTelephoneNumber</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"mobileTelephoneNumber": ""</source>
 
|-
|<code>websiteURL</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"websiteURL": ""</source>
 
|}
 
{| class="wikitable sortable" style="width: 100%;" id="shippingAddress_object"
|-
|+ align="top" style="text-align:left;"|shippingAddress Object
!Parameter name
!Data type
!Mandatory
!Description
!Valid content
![http://www.pcre.org/ PCRE]
!Default value
!Example
 
|-
|<code>organizationName</code>
|string
|no
|The name of the organization.
|
|@TODO: Add regex
|
|<source lang="javascript">"organizationName": "Customer Ltd."</source>
 
|-
|<code>gender</code>
|string
|yes
|The gender of the address holder
|Either <code>f</code> for female, <code>m</code> for male or <code>n</code> for neutral.
|
|
|<source lang="javascript">"gender": "f"</source>
 
|-
|<code>givenName</code>
|string
|yes
|The given name (first name or forename) of the address holder.
|
|@TODO: Add regex
|
|<source lang="javascript">"givenName": "Name"</source>
 
|-
|<code>surname</code>
|string
|yes
|The surname (last name or family name) of the address holder.
|
|@TODO: Add regex
|
|<source lang="javascript">"surname": "Surname"</source>
 
|-
|<code>postalAddress</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"postalAddress": ""</source>
 
|-
|<code>countryCode</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"countryCode": ""</source>
 
|-
|<code>postalCode</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"postalCode": ""</source>
 
|-
|<code>localityName</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"localityName": ""</source>
 
|-
|<code>preferredLanguage</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"preferredLanguage": ""</source>
 
|-
|<code>mail</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"mail": ""</source>
 
|-
|<code>telephoneNumber</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"telephoneNumber": ""</source>
 
|-
|<code>mobileTelephoneNumber</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"mobileTelephoneNumber": ""</source>
 
|-
|<code>websiteURL</code>
|string
|yes
|
|
|@TODO: Add regex
|
|<source lang="javascript">"websiteURL": ""</source>
|}
SLB, editor, reviewer
3,368
edits