1
+ {
2
+ "openapi" : " 3.0.1" ,
3
+ "servers" : [
4
+ {
5
+ "description" : " API para Cadastro de Clientes 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 CustomerPublic para produtos TOTVS" ,
19
+ "version" : " 1.000" ,
20
+ "title" : " CustomerPublic" ,
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" : " CustomerPublic" ,
29
+ "description" : " Cadastro de Clientes" ,
30
+ "segment" : " Backoffice"
31
+ },
32
+ "productInformation" : [
33
+ {
34
+ "product" : " Datasul" ,
35
+ "contact" : " SUPPLY.BCK.ADM.VENDAS.D@totvs.com.br" ,
36
+ "description" : " Cadastro de Clientes" ,
37
+ "adapter" : " "
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ "paths" : {
43
+ "/customerPublic" : {
44
+ "get" : {
45
+ "tags" : [
46
+ " CustomerPublic"
47
+ ],
48
+ "summary" : " Retorna lista de Clientes" ,
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 Clientes" ,
59
+ "operationId" : " getCustomerPublic" ,
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" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Expand"
78
+ },
79
+ {
80
+ "$ref" : " #/components/parameters/totalCountParameter"
81
+ },
82
+ {
83
+ "$ref" : " #/components/parameters/filterParameter"
84
+ },
85
+ {
86
+ "$ref" : " #/components/parameters/lastUpdateParameter"
87
+ }
88
+ ],
89
+ "responses" : {
90
+ "200" : {
91
+ "description" : " Operação realizada com sucesso!" ,
92
+ "content" : {
93
+ "application/json" : {
94
+ "schema" : {
95
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/PagedCustomers"
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "404" : {
101
+ "description" : " Registro não encontrado!" ,
102
+ "content" : {
103
+ "application/json" : {
104
+ "schema" : {
105
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ },
112
+ "post" : {
113
+ "tags" : [
114
+ " CustomerPublic"
115
+ ],
116
+ "summary" : " Inclui um Cliente" ,
117
+ "x-totvs" : {
118
+ "productInformation" : [
119
+ {
120
+ "product" : " Datasul" ,
121
+ "available" : true ,
122
+ "minimalVersion" : " 12.1.23"
123
+ }
124
+ ]
125
+ },
126
+ "description" : " Inclui um Cliente conforme dados enviados na requisição." ,
127
+ "operationId" : " postCustomerPublic" ,
128
+ "parameters" : [
129
+ {
130
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
131
+ }
132
+ ],
133
+ "requestBody" : {
134
+ "description" : " Cliente a ser incluído." ,
135
+ "content" : {
136
+ "application/json" : {
137
+ "schema" : {
138
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "responses" : {
144
+ "200" : {
145
+ "description" : " Operação realizada com sucesso!" ,
146
+ "content" : {
147
+ "application/json" : {
148
+ "schema" : {
149
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "500" : {
155
+ "description" : " Erro durante inclusão do Cliente!" ,
156
+ "content" : {
157
+ "application/json" : {
158
+ "schema" : {
159
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "/customerPublic/{customerID}" : {
168
+ "put" : {
169
+ "tags" : [
170
+ " CustomerPublic"
171
+ ],
172
+ "summary" : " Altera um Cliente" ,
173
+ "x-totvs" : {
174
+ "productInformation" : [
175
+ {
176
+ "product" : " Datasul" ,
177
+ "available" : true ,
178
+ "minimalVersion" : " 12.1.23"
179
+ }
180
+ ]
181
+ },
182
+ "description" : " Altera um Cliente conforme dados enviados na requisição." ,
183
+ "operationId" : " putCustomerPublic" ,
184
+ "parameters" : [
185
+ {
186
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
187
+ },
188
+ {
189
+ "in" : " path" ,
190
+ "name" : " customerID" ,
191
+ "description" : " Código do Cliente" ,
192
+ "required" : true ,
193
+ "schema" : {
194
+ "type" : " integer"
195
+ }
196
+ }
197
+ ],
198
+ "requestBody" : {
199
+ "description" : " Cliente a ser incluído." ,
200
+ "content" : {
201
+ "application/json" : {
202
+ "schema" : {
203
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "responses" : {
209
+ "200" : {
210
+ "description" : " Operação realizada com sucesso!" ,
211
+ "content" : {
212
+ "application/json" : {
213
+ "schema" : {
214
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "500" : {
220
+ "description" : " Erro durante inclusão do Cliente!" ,
221
+ "content" : {
222
+ "application/json" : {
223
+ "schema" : {
224
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "patch" : {
232
+ "tags" : [
233
+ " CustomerPublic"
234
+ ],
235
+ "summary" : " Altera um Cliente" ,
236
+ "x-totvs" : {
237
+ "productInformation" : [
238
+ {
239
+ "product" : " Datasul" ,
240
+ "available" : true ,
241
+ "minimalVersion" : " 12.1.23"
242
+ }
243
+ ]
244
+ },
245
+ "description" : " Altera um Cliente conforme dados enviados na requisição." ,
246
+ "operationId" : " patchCustomerPublic" ,
247
+ "parameters" : [
248
+ {
249
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
250
+ },
251
+ {
252
+ "in" : " path" ,
253
+ "name" : " customerID" ,
254
+ "description" : " Código do Cliente" ,
255
+ "required" : true ,
256
+ "schema" : {
257
+ "type" : " integer"
258
+ }
259
+ }
260
+ ],
261
+ "requestBody" : {
262
+ "description" : " Cliente a ser incluído." ,
263
+ "content" : {
264
+ "application/json" : {
265
+ "schema" : {
266
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "responses" : {
272
+ "200" : {
273
+ "description" : " Operação realizada com sucesso!" ,
274
+ "content" : {
275
+ "application/json" : {
276
+ "schema" : {
277
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo"
278
+ }
279
+ }
280
+ }
281
+ },
282
+ "500" : {
283
+ "description" : " Erro durante inclusão do Cliente!" ,
284
+ "content" : {
285
+ "application/json" : {
286
+ "schema" : {
287
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
293
+ },
294
+ "delete" : {
295
+ "tags" : [
296
+ " CustomerPublic"
297
+ ],
298
+ "summary" : " Remove um Cliente" ,
299
+ "x-totvs" : {
300
+ "productInformation" : [
301
+ {
302
+ "product" : " Datasul" ,
303
+ "available" : true ,
304
+ "minimalVersion" : " 12.1.23"
305
+ }
306
+ ]
307
+ },
308
+ "description" : " Remove um Cliente" ,
309
+ "operationId" : " deleteCustomerPublic" ,
310
+ "parameters" : [
311
+ {
312
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization"
313
+ },
314
+ {
315
+ "in" : " path" ,
316
+ "name" : " customerID" ,
317
+ "description" : " Código do Cliente" ,
318
+ "required" : true ,
319
+ "schema" : {
320
+ "type" : " integer"
321
+ }
322
+ }
323
+ ],
324
+ "responses" : {
325
+ "200" : {
326
+ "description" : " Operação realizada com sucesso!" ,
327
+ "content" : {
328
+ "application/json" : {}
329
+ }
330
+ },
331
+ "404" : {
332
+ "description" : " Registro não encontrado!" ,
333
+ "content" : {
334
+ "application/json" : {
335
+ "schema" : {
336
+ "$ref" : " https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel"
337
+ }
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ },
345
+ "components" : {
346
+ "parameters" : {
347
+ "totalCountParameter" : {
348
+ "name" : " totalCount" ,
349
+ "in" : " query" ,
350
+ "description" : " Considera a contagem total dos registros, respeitando os filtros anteriores." ,
351
+ "required" : false ,
352
+ "schema" : {
353
+ "type" : " boolean" ,
354
+ "default" : false
355
+ }
356
+ },
357
+ "filterParameter" : {
358
+ "name" : " $filter" ,
359
+ "in" : " query" ,
360
+ "description" : " Permite a criação de filtros mais complexos, utilizando sintaxe básica de SQL." ,
361
+ "required" : false ,
362
+ "schema" : {
363
+ "type" : " string" ,
364
+ "format" : " string"
365
+ }
366
+ },
367
+ "lastUpdateParameter" : {
368
+ "name" : " lastUpdate" ,
369
+ "in" : " query" ,
370
+ "description" : " Retorna os registros alterados após a data enviada." ,
371
+ "required" : false ,
372
+ "schema" : {
373
+ "type" : " string" ,
374
+ "format" : " date-time" ,
375
+ "pattern" : " ISO-8601"
376
+ }
377
+ }
378
+
379
+ }
380
+ }
381
+ }
0 commit comments