Changes

stoney core: Resellers Resource - REST API

74 bytes removed, 10:00, 5 August 2014
/* Reseller creation response message */
= Resellers resource methods =
== Reseller creation (POST) ==
To create a new reseller the client needs to send a HTTP <code>POST</code> request on the reseller collection resource URI <code>https://api.example.com/v1/resellers</code> (also see [[Application_Programming_Interface_(API)#Base_URI|Base URI]]), including the associated reseller informationsinformation.The service will generate a new reseller and responds with a HTTP status code <code>201</code> (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 information about the new reseller.
=== Reseller creation request message ===
|object
|yes
|An object holding the billing address informations information for the given reseller. Refer to the [[#billingAddress_object|billingAddress object table]] for more informationsinformation.
|
|
|object
|no
|An object holding the shipping address informations information for the given reseller. Refer to the [[#shippingAddress_object|shippingAddress object table]] for more informationsinformation.
|
|
</pre>
|<pre>
Content-Type: Content-Type: application/json; charset=UTF-8
Location: https://api.example.com/v1/resellers/4000001
</pre>
|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 informationsinformation.
|
|
"isCompany": true,
"isActive": true,
"resellerName": "Reseller Ltd."
"countryCode": "CH",
"postalCode": "3012",
|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 informationsinformation.
|
|
=== Reseller element retrieval (GET) ===
To retrieve an existing reseller and fetch the informations information associated with it, the client needs to send a HTTP <code>GET</code> request on the reseller's element resource URI (such as <code>https://api.example.com/v1/resellers/4000001</code>.The service responds with a HTTP status code 200 (OK) on success and returns the associated reseller informationsinformation.
==== Reseller element retrieval request message ====
|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 HostingReseller Ltd."</source>
|-
|object
|yes
|An object holding the billing address informations information for the given reseller. Refer to the [[#billingAddress_object|billingAddress object table]] for more informationsinformation.
|
|
|object
|no
|An object holding the shipping address informations information for the given reseller. Refer to the [[#shippingAddress_object|shippingAddress object table]] for more informationsinformation.
|
|
|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 informationsinformation.
|
|
==== Reseller update response message body ====
On success (<code>200</code>) an empty response message body will be returned, otherwise an [[stoney_core:_REST_API#Error_codes_and_responses|error object]] will provide further informations information about the failure.
== Reseller partly update (PATCH) ==
==== Reseller partly update response message body ====
On success (<code>200</code>) an empty response message body will be returned, otherwise an [[stoney_core:_REST_API#Error_codes_and_responses|error object]] will provide further informations information about the failure.
== Reseller deletion (DELETE) ==
==== Reseller deletion response message body ====
On success (<code>200</code>) an empty response message body will be returned, otherwise an [[stoney_core:_REST_API#Error_codes_and_responses|error object]] will provide further informations information about the failure.
== Reseller search ==
SLB, editor, reviewer
3,368
edits