Difference between revisions of "stoney core: Resellers Resource - REST API"

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Reseller creation request message body)
(Reseller creation request message body)
Line 57: Line 57:
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|
 
|
|
+
|<pre>isCompany: true</pre>
isCompany: true
+
  
 
|-
 
|-
Line 67: Line 66:
 
|
 
|
 
|
 
|
|
+
|<pre>
"billingAddress":
+
"billingAddress":
{
+
{
    "organizationName": "Reseller Ltd.",
+
  "organizationName": "Reseller Ltd.",
    "gender": 'm',
+
  "gender": 'm',
    "givenName": "Name",
+
  "givenName": "Name",
    "surname": "Surname",
+
  "surname": "Surname",
    "postalAddress": "Street Number",
+
  "postalAddress": "Street Number",
    "countryCode": "CH",
+
  "countryCode": "CH",
    "postalCode": "Postal Code",
+
  "postalCode": "Postal Code",
    "localityName": "Locality",
+
  "localityName": "Locality",
    "preferredLanguage": "en-GB",
+
  "preferredLanguage": "en-GB",
    "mail": "name.surname@example.com",
+
  "mail": "name.surname@example.com",
    "telephoneNumber": "+41 00 000 00 00",
+
  "telephoneNumber": "+41 00 000 00 00",
    "mobileTelephoneNumber": "+41 00 000 00 00",
+
  "mobileTelephoneNumber": "+41 00 000 00 00",
    "websiteURL": "https://www.example.com/"
+
  "websiteURL": "https://www.example.com/"
}
+
}
 +
</pre>
  
 
|}
 
|}

Revision as of 14:37, 11 December 2013

Overview

The reseller resource represents the bla, bla, bla...

Reseller resource methods

Reseller creation (POST)

To create a new reseller the client needs to send a HTTP POST request on the reseller collection resource URI https://api.example.com/v1/resellers (also see Base URI), including the associated reseller informations. The service will generate a new reseller and responds with a HTTP status code 201 (Created) on success. The newly created reseller URI is returned within the HTTP location header, which can be used by the client to gather informations about the new reseller.

Reseller creation request message

HTTP request part Content Example
Request lines POST <Request-URI> HTTP 1.1

HOST: <Host>

POST /v1/resellers/ HTTP 1.1

HOST: api.example.com

Request headers Accept: <Type>/<Subtype>

Content-Type: <Type>/<Subtype>

Accept: application/json

Content-Type: application/json

Request body JSON object { ... }

Reseller creation request message body

Parameter name Data type Mandatory Description Allowed content Default value Example
isCompany boolean yes true if the reseller represents a company, false if it's an individual person. true or false
isCompany: true
billingAddress object yes An object holding the billing address informations for the given reseller.
"billingAddress":
{
  "organizationName": "Reseller Ltd.",
  "gender": 'm',
  "givenName": "Name",
  "surname": "Surname",
  "postalAddress": "Street Number",
  "countryCode": "CH",
  "postalCode": "Postal Code",
  "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/"
}

Reseller creation response message

Reseller retrieval (GET)

Reseller update (PUT)

Reseller partly update (PATCH)

Reseller deletion (DELETE)

Links