Difference between revisions of "stoney core: Resellers Resource - REST API"
From stoney cloud
(→Reseller creation request message) |
(→Reseller creation request message) |
||
Line 45: | Line 45: | ||
! Mandatory | ! Mandatory | ||
! Description | ! Description | ||
− | ! | + | ! Allowed content |
! Default value | ! Default value | ||
! Example | ! Example | ||
|- | |- | ||
− | | | + | |<code>isCompany</code> |
− | | | + | |boolean |
− | | | + | |yes |
− | | | + | |<code>true</code> if the reseller represents a company, <code>false</code> if it's an individual person. |
− | | | + | |<code>true</code> or <code>false</code> |
− | | | + | | - |
− | | | + | |<code>true</code> |
|} | |} |
Revision as of 13:12, 11 December 2013
Contents
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
|
POST /v1/resellers/ HTTP 1.1
|
Request headers | Accept: <Type>/<Subtype>
|
Accept: application/json
|
Request body | JSON object | { ... }
|
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
|
- | true
|