This repository has been archived by the owner on Dec 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yml
145 lines (138 loc) · 3.6 KB
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
swagger: '2.0'
info:
title: Shevastream API
description: |
API for Shevastream.
version: "1.0.0"
host: shevastream.com
schemes:
- https
basePath: /api
produces:
- application/json
paths:
/getproducts:
get:
summary: Get available products
description: |
Returns structured data for all available products.
responses:
200:
description: OK.
schema:
type: array
items:
$ref: '#/definitions/Product'
default:
description: Internal server error (500)
/callbackrequest:
post:
summary: Callback request
description: |
Collects callback requests.
Triggers push message.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: phone
in: formData
description: Phone number to which to call
required: true
type: string
format: string
example: "+1-857-555-8908"
responses:
400:
&400
description: Bad Request. One or more parameters are invalid or missing.
200:
description: OK. The request has been saved.
default:
description: Internal server error (500)
/feedback:
post:
summary: Feedback / contact request
description: |
Collects contact requests.
Triggers push message.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: email
in: formData
description: Contact email
required: true
type: string
format: string
example: "pr@shevastream.com"
- name: name
in: formData
description: Contact name
required: true
type: string
format: string
example: "John Doe"
- name: subject
in: formData
description: Message subject
required: true
type: string
format: string
example: "Privacy policy clarification"
- name: body
in: formData
description: Message content
required: true
type: string
format: string
example: "Dear representative, ..."
responses:
400:
&400
description: Bad Request. One or more parameters are invalid or missing.
200:
description: OK. The feedback has been saved.
default:
description: Internal server error (500)
definitions:
Product:
type: object
required:
- id
- name
- cost
- imageurls
- information
- description
- characteristics
- videodata
properties:
id:
type: number
description: Unique identifier for the product.
name:
type: string
description: Product's title.
cost:
type: number
description: Product's cost.
imageurls:
type: string
description: JSONified list of URLs to product's pictures.
information:
type: string
description: Product's extra information.
description:
type: string
description: Product's description.
characteristics:
type: string
description: |
JSONified list of properties (strings).
May contain HTML.
videodata:
type: string
description: |
JSON object that has following properties
HasVideo - boolean - if this products has apromo video
Url - string - URL for video if product has one