-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
155 lines (149 loc) · 4.51 KB
/
openapi.yaml
File metadata and controls
155 lines (149 loc) · 4.51 KB
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
146
147
148
149
150
151
152
153
154
155
openapi: 3.0.3
info:
title: SIC Code Lookup API
version: 1.0.0
description: Retrieve the official description for a specific SIC Code or retrieve SIC Codes whose descriptions contain a given keyword.
servers:
- url: https://siccodeapi.p.rapidapi.com
components:
securitySchemes:
RapidApiKey:
type: apiKey
in: header
name: X-RapidAPI-Key
RapidApiHost:
type: apiKey
in: header
name: X-RapidAPI-Host
schemas:
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
security:
- RapidApiKey: []
RapidApiHost: []
paths:
/SICCodeAPI/code:
get:
summary: Get SIC Description by Code
description: Retrieve the official SIC Description for a given SIC Code.
parameters:
- name: code
in: query
required: true
description: SIC Code (e.g. 0111)
schema:
type: string
example: "0111"
responses:
"200":
description: JSON object mapping SIC Code to Description
content:
application/json:
schema:
type: object
additionalProperties:
type: string
examples:
example:
value:
"0111": "Grow cereals & other crops"
"400":
description: Missing or empty SIC Code parameter
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
missingCode:
value:
error: No code parameter provided.
"403":
description: Not authorized (missing RapidAPI headers or not subscribed)
"404":
description: SIC code not found
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
notFound:
value:
error: Code "0111" not found.
"429":
description: Rate limit exceeded
"500":
description: SIC Code data unavailable
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
dataUnavailable:
value:
error: SIC Code data is unavailable.
/SICCodeAPI/description:
get:
summary: Search SIC Codes by Description
description: Retrieve SIC Codes whose Descriptions contain a given keyword.
parameters:
- name: descrip
in: query
required: true
description: Search keyword (case-insensitive) e.g. "fishing"
schema:
type: string
example: "fishing"
responses:
"200":
description: JSON object mapping SIC Codes to Descriptions
content:
application/json:
schema:
type: object
additionalProperties:
type: string
examples:
example:
value:
"0501": "Fishing"
"03110": "Marine fishing"
"03120": "Freshwater fishing"
"400":
description: Missing or empty description parameter
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
missingDescription:
value:
error: No description parameter provided.
"403":
description: Not authorized (missing RapidAPI headers or not subscribed)
"404":
description: No SIC Codes had Descriptions containing the keyword
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
notFound:
value:
error: Description "fishing" not found.
"429":
description: Rate limit exceeded
"500":
description: SIC Code data is unavailable
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
dataUnavailable:
value:
error: SIC Code data is unavailable