Changes

stoney core: Search Resource - REST API

3,097 bytes added, 13:50, 14 May 2014
/* Global Search Request Response Message */
|}
=== Global Search Request Response Message ===
{| class="wikitable sortable" style="width: 100%;"
|-
|-
| [[#reseller_collection_retrieval_response_objectglobal_search_response_object|Response body]]
| JSON object
| <source lang="javascript">{ ... }</source>
 
|}
 
==== Global Search Response Message Body ====
{| class="wikitable sortable" style="width: 100%;" id="global_search_response_object"
|-
|+ align="top" style="text-align:left;"|Global Search Response Object
! Parameter name
! Data type
! Mandatory
! Description
! Valid content
! [http://www.pcre.org/ PCRE]
! Default value
! Example
 
 
|-
|
|array
|no
|An array with one or more TBD
|
|
|
|<source lang='javascript'>
{
"resellers":
{
"resources":
[
{ "id": 4000000,
"location": "https://api.example.com/v1/resellers/4000000",
"isCompany": true,
"isActive": true,
"resellerName": "Example Reseller Ltd"
},
{ "id": 4000001,
"location": "https://api.example.com/v1/resellers/4000001",
"isCompany": true,
"isActive": true,
"resellerName": "Example Reseller No 2 Ltd"
}
],
"location": "https://api.example.com/v1/resellers/?q=example"
},
"customers":
{
"resources":
[
{ "id": 5000000,
"location": "https://api.example.com/v1/customers/5000000",
"isCompany": true,
"isActive": true,
"customerName": "Example Customer Ltd"
},
{ "id": 5000001, ... }
],
"location": "https://api.example.com/v1/customers/?q=example"
},
...
}
</source>
 
 
|-
|[[stoney_core:_REST_API#Error_codes_and_responses|<code>error</code>]]
|object
|no
|In case of a failure, an error object with the appropriate error messages will be returned. Refer to the [[stoney_core:_REST_API#Error_codes_and_responses|Error codes and response chapter]] for more informations.
|
|
|
|<source lang="javascript">error { /* ... */ }</source>
 
|}
 
 
 
{| class="wikitable sortable" style="width: 100%;" id="reseller_collection_array_element_object"
|-
|+ align="top" style="text-align:left;"|Reseller Collection Array Element Object
!Parameter name
!Data type
!Mandatory
!Description
!Valid content
![http://www.pcre.org/ PCRE]
!Default value
!Example
 
|-
|<code>id</code>
|integer
|yes
|The identification number of the reseller.
|
|@TODO add regex
|
|<source lang="javascript">"id": 4000000</source>
 
|-
|<code>location</code>
|string
|yes
|The location URI of the reseller resource.
|@TODO add link to URI RFC
|
|
|<source lang="javascript">"location": "https://api.example.com/v1/resellers/4000000"</source>
 
|-
|<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>
|
|
|<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>resellerName</code>
|string
|yes
|The reseller'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.
|
|
|
|<source lang="javascript">"resellerName": "Super-duper Hosting"</source>
|}
SLB, editor, reviewer
3,368
edits