First part of the setup process
[tolino-api-docs.git] / api / pageplace.bosh-bosh-rest-reseller-selection.rst
1 ==============================================================
2 ``GET https://bosh.pageplace.de/bosh/rest/reseller/selection``
3 ==============================================================
4
5 Fetch list of book sellers the e-reader can be used with.
6
7 Step 2 of the `Setup process`_.
8
9 ``pageplace.de`` seems to have a list of hardware IDs and their
10 associated sellers.
11 E-reader devices sold by thalia.de can only choose thalia as book shop
12 when it is being setup.
13
14 Only those book shops are returned that the device may be used with.
15
16 Request
17 =======
18 Header
19   ``hardware_id``
20     Required.
21
22     Example: ``665fc389ef4e47258c5db9fa7821bd19``
23   ``client_type``
24     Example: ``TOLINO_VISION_3``
25   ``client_version``
26     Example: ``14.1.0``
27
28 GET parameters
29   ``client_type``
30     Required.
31
32     Example: ``TOLINOVISION3_14.1.0``
33   ``countryCode``
34     Required.
35
36     The two-letter uppercase country code taken from `GET https://bosh.pageplace.de/bosh/rest/reseller/countries`_
37
38     Example: ``DE``
39   ``languageCode``
40     Two-letter e-reader interface language code.
41
42     Does not seem to have any influence on the response.
43
44     Example: ``en``
45
46 Response
47 ========
48
49 Non-rebrandable device
50 ----------------------
51 HTTP status code ``200 OK``.
52
53 Returns only one reseller.
54
55 Example:
56
57 .. include:: pageplace.bosh-bosh-rest-reseller-selection.response.json
58    :code:
59
60
61 Missing countryCode parameter
62 -----------------------------
63 Status Code: ``400 Bad Request``
64
65 .. include:: pageplace.bosh-bosh-rest-reseller-selection.response-missingparam.json
66    :code:
67
68
69 Missing hardware_id header
70 --------------------------
71 When no or an unknown ``hardware_id`` header is passed,
72 a ``404 Not Found`` status code is returned together with an error message:
73
74 .. include:: pageplace.bosh-bosh-rest-reseller-selection.response-nohardwareid.json
75    :code: