1
+ {
2
+ "openapi" : " 3.0.1" ,
3
+ "servers" : [
4
+ {
5
+ "description" : " API para Cadastro de Unidades de Medida dos produtos TOTVS" ,
6
+ "url" : " {{host}}/api/cdp/v1" ,
7
+ "variables" : {
8
+ "serverUrl" : {
9
+ "default" : " localhost"
10
+ },
11
+ "serverHttpPort" : {
12
+ "default" : " 8080"
13
+ }
14
+ }
15
+ }
16
+ ],
17
+ "info" : {
18
+ "description" : " API para a entidade UnityMeasuresPublic para produtos TOTVS" ,
19
+ "version" : " 1.000" ,
20
+ "title" : " UnityMeasure" ,
21
+ "contact" : {
22
+ "name" : " T-Talk" ,
23
+ "url" : " https://api.totvs.com.br" ,
24
+ "email" : " comiteintegracao@totvs.com.br"
25
+ },
26
+ "x-totvs" : {
27
+ "messageDocumentation" : {
28
+ "name" : " UnityMeasuresPublic" ,
29
+ "description" : " Cadastro de Unidades de Medida" ,
30
+ "segment" : " Backoffice"
31
+ },
32
+ "productInformation" : [
33
+ {
34
+ "product" : " Datasul" ,
35
+ "contact" : " SUPPLY.BCK.ADM.VENDAS.D@totvs.com.br" ,
36
+ "description" : " Cadastro de Unidades de Medida" ,
37
+ "adapter" : " "
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ "paths" : {
43
+ "/unityMeasuresPublic" : {
44
+ "get" : {
45
+ "tags" : [
46
+ " UnityMeasuresPublic"
47
+ ],
48
+ "summary" : " Retorna lista de Unidades de Medida" ,
49
+ "x-totvs" : {
50
+ "productInformation" : [
51
+ {
52
+ "product" : " Datasul" ,
53
+ "available" : true ,
54
+ "minimalVersion" : " 12.1.23"
55
+ }
56
+ ]
57
+ },
58
+ "description" : " Retorna lista de Unidades de Medida" ,
59
+ "operationId" : " getUnityMeasuresPublic" ,
60
+ "parameters" : [
61
+ {
62
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
63
+ },
64
+ {
65
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Order"
66
+ },
67
+ {
68
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Fields"
69
+ },
70
+ {
71
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Page"
72
+ },
73
+ {
74
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/PageSize"
75
+ },
76
+ {
77
+ "$ref" : " #/components/parameters/totalCountParameter"
78
+ },
79
+ {
80
+ "$ref" : " #/components/parameters/filterParameter"
81
+ }
82
+ ],
83
+ "responses" : {
84
+ "200" : {
85
+ "description" : " Operação realizada com sucesso!" ,
86
+ "content" : {
87
+ "application/json" : {
88
+ "schema" : {
89
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/UnityMeasuresPublic_1_000.json#/definitions/PagedUnityMeasures"
90
+ }
91
+ }
92
+ }
93
+ },
94
+ "404" : {
95
+ "description" : " Registro não encontrado!" ,
96
+ "content" : {
97
+ "application/json" : {
98
+ "schema" : {
99
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "post" : {
107
+ "tags" : [
108
+ " UnityMeasuresPublic"
109
+ ],
110
+ "summary" : " Inclui uma Unidade de Medida" ,
111
+ "x-totvs" : {
112
+ "productInformation" : [
113
+ {
114
+ "product" : " Datasul" ,
115
+ "available" : true ,
116
+ "minimalVersion" : " 12.1.23"
117
+ }
118
+ ]
119
+ },
120
+ "description" : " Inclui uma Unidade de Medida conforme dados enviados na requisição." ,
121
+ "operationId" : " postUnityMeasuresPublic" ,
122
+ "parameters" : [
123
+ {
124
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
125
+ }
126
+ ],
127
+ "requestBody" : {
128
+ "description" : " Unidade de Medida a ser incluída." ,
129
+ "content" : {
130
+ "application/json" : {
131
+ "schema" : {
132
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/UnityMeasuresPublic_1_000.json#/definitions/UnityMeasuresInfo"
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "responses" : {
138
+ "200" : {
139
+ "description" : " Operação realizada com sucesso!" ,
140
+ "content" : {
141
+ "application/json" : {
142
+ "schema" : {
143
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/UnityMeasuresPublic_1_000.json#/definitions/UnityMeasuresInfo"
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "400" : {
149
+ "description" : " Erro durante inclusão da Unidade de Medida!" ,
150
+ "content" : {
151
+ "application/json" : {
152
+ "schema" : {
153
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "put" : {
161
+ "tags" : [
162
+ " UnityMeasuresPublic"
163
+ ],
164
+ "summary" : " Atualiza Unidade de Medida" ,
165
+ "x-totvs" : {
166
+ "productInformation" : [
167
+ {
168
+ "product" : " Datasul" ,
169
+ "available" : true ,
170
+ "minimalVersion" : " 12.1.23"
171
+ }
172
+ ]
173
+ },
174
+ "description" : " Altera uma Unidade de Medida conforme dados enviados na requisição." ,
175
+ "operationId" : " putUnityMeasuresPublic" ,
176
+ "parameters" : [
177
+ {
178
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
179
+ }
180
+ ],
181
+ "requestBody" : {
182
+ "description" : " Unidade de Medida a ser incluída." ,
183
+ "content" : {
184
+ "application/json" : {
185
+ "schema" : {
186
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/UnityMeasuresPublic_1_000.json#/definitions/UnityMeasuresInfo"
187
+ }
188
+ }
189
+ }
190
+ },
191
+ "responses" : {
192
+ "200" : {
193
+ "description" : " Operação realizada com sucesso!" ,
194
+ "content" : {
195
+ "application/json" : {
196
+ "schema" : {
197
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/UnityMeasuresPublic_1_000.json#/definitions/UnityMeasuresInfo"
198
+ }
199
+ }
200
+ }
201
+ },
202
+ "400" : {
203
+ "description" : " Erro durante inclusão da Unidade de Medida!" ,
204
+ "content" : {
205
+ "application/json" : {
206
+ "schema" : {
207
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ },
215
+ "/unityMeasuresPublic/{code}" : {
216
+ "delete" : {
217
+ "tags" : [
218
+ " UnityMeasuresPublic"
219
+ ],
220
+ "summary" : " Remove uma Unidade de Medida" ,
221
+ "x-totvs" : {
222
+ "productInformation" : [
223
+ {
224
+ "product" : " Datasul" ,
225
+ "available" : true ,
226
+ "minimalVersion" : " 12.1.23"
227
+ }
228
+ ]
229
+ },
230
+ "description" : " Remove uma Unidade de Medida" ,
231
+ "operationId" : " deleteUnityMeasuresPublic" ,
232
+ "parameters" : [
233
+ {
234
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
235
+ },
236
+ {
237
+ "in" : " path" ,
238
+ "name" : " code" ,
239
+ "description" : " Código" ,
240
+ "required" : true ,
241
+ "schema" : {
242
+ "type" : " integer"
243
+ }
244
+ }
245
+ ],
246
+ "responses" : {
247
+ "200" : {
248
+ "description" : " Operação realizada com sucesso!" ,
249
+ "content" : {
250
+ "application/json" : {}
251
+ }
252
+ },
253
+ "404" : {
254
+ "description" : " Registro não encontrado!" ,
255
+ "content" : {
256
+ "application/json" : {
257
+ "schema" : {
258
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+ },
267
+ "components" : {
268
+ "parameters" : {
269
+ "totalCountParameter" : {
270
+ "name" : " totalCount" ,
271
+ "in" : " query" ,
272
+ "description" : " Considera a contagem total dos registros, respeitando os filtros anteriores." ,
273
+ "required" : false ,
274
+ "schema" : {
275
+ "type" : " boolean" ,
276
+ "default" : false
277
+ }
278
+ },
279
+ "filterParameter" : {
280
+ "name" : " $filter" ,
281
+ "in" : " query" ,
282
+ "description" : " Permite a criação de filtros mais complexos, utilizando sintaxe básica de SQL." ,
283
+ "required" : false ,
284
+ "schema" : {
285
+ "type" : " string" ,
286
+ "format" : " string"
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
0 commit comments