|
| 1 | +{ |
| 2 | + "openapi": "3.0.1", |
| 3 | + "servers": [ |
| 4 | + { |
| 5 | + "description": "API para a entidade Marca (Brand) para Marca de Produto TOTVS", |
| 6 | + "url": "{{host}}/api/est/v1", |
| 7 | + "variables": { |
| 8 | + "serverUrl": { |
| 9 | + "default": "localhost" |
| 10 | + }, |
| 11 | + "serverHttpPort": { |
| 12 | + "default": "8012" |
| 13 | + } |
| 14 | + } |
| 15 | + } |
| 16 | + ], |
| 17 | + "info": { |
| 18 | + "description": "API para informações de Marca para Marca de Produto TOTVS", |
| 19 | + "version": "1.000", |
| 20 | + "title": "Marca", |
| 21 | + "contact": { |
| 22 | + "name": "T-Talk", |
| 23 | + "url": "api.totvs.com.br", |
| 24 | + "email": "comiteintegracao@totvs.com.br" |
| 25 | + }, |
| 26 | + "x-totvs": { |
| 27 | + "messageDocumentation": { |
| 28 | + "name": "Brand", |
| 29 | + "description": "Cadastro de Marca", |
| 30 | + "segment": "Serviços" |
| 31 | + }, |
| 32 | + "productInformation": [ |
| 33 | + { |
| 34 | + "product": "RM", |
| 35 | + "contact": "", |
| 36 | + "description": "Cadastro de Marca", |
| 37 | + "adapter": "" |
| 38 | + } |
| 39 | + ] |
| 40 | + } |
| 41 | + }, |
| 42 | + "paths": { |
| 43 | + "/Brands": { |
| 44 | + "get": { |
| 45 | + "tags": ["Brand"], |
| 46 | + "summary": "Retorna lista de Marcas", |
| 47 | + "x-totvs": { |
| 48 | + "productInformation": [ |
| 49 | + { |
| 50 | + "product": "RM", |
| 51 | + "available": true, |
| 52 | + "note": "Este verbo esta disponivel com todos os parametros", |
| 53 | + "minimalVersion": "12.1.34" |
| 54 | + } |
| 55 | + ] |
| 56 | + }, |
| 57 | + "description": "Retorna lista completa de Marcas", |
| 58 | + "operationId": "getBrands", |
| 59 | + "parameters": [ |
| 60 | + { |
| 61 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" |
| 62 | + }, |
| 63 | + { |
| 64 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Order" |
| 65 | + }, |
| 66 | + { |
| 67 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Page" |
| 68 | + }, |
| 69 | + { |
| 70 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/PageSize" |
| 71 | + }, |
| 72 | + { |
| 73 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Fields" |
| 74 | + } |
| 75 | + ], |
| 76 | + "responses": { |
| 77 | + "200": { |
| 78 | + "description": "Operação realizada com sucesso", |
| 79 | + "content": { |
| 80 | + "application/json": { |
| 81 | + "schema": { |
| 82 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_v1_000.json#/definitions/PagedBrands" |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + }, |
| 87 | + "400": { |
| 88 | + "description": "Erro na listagem das Marcas", |
| 89 | + "content": { |
| 90 | + "application/json": { |
| 91 | + "schema": { |
| 92 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 93 | + } |
| 94 | + } |
| 95 | + } |
| 96 | + }, |
| 97 | + "404": { |
| 98 | + "description": "Registro não encontrado", |
| 99 | + "content": { |
| 100 | + "application/json": { |
| 101 | + "schema": { |
| 102 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 103 | + } |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + } |
| 108 | + }, |
| 109 | + "post": { |
| 110 | + "tags": ["Brands"], |
| 111 | + "summary": "Inclui uma Marca", |
| 112 | + "operationId": "postBrand", |
| 113 | + "x-totvs": { |
| 114 | + "productInformation": [ |
| 115 | + { |
| 116 | + "product": "RM", |
| 117 | + "available": true, |
| 118 | + "note": "Este verbo esta disponivel com todos os parametros", |
| 119 | + "minimalVersion": "12.1.34" |
| 120 | + } |
| 121 | + ] |
| 122 | + }, |
| 123 | + "parameters": [ |
| 124 | + { |
| 125 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" |
| 126 | + } |
| 127 | + ], |
| 128 | + "requestBody": { |
| 129 | + "content": { |
| 130 | + "application/json": { |
| 131 | + "schema": { |
| 132 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + "description": "Inclui uma Marca" |
| 137 | + }, |
| 138 | + "responses": { |
| 139 | + "200": { |
| 140 | + "description": "Operação realizada com sucesso", |
| 141 | + "content": { |
| 142 | + "application/json": { |
| 143 | + "schema": { |
| 144 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 145 | + } |
| 146 | + } |
| 147 | + } |
| 148 | + }, |
| 149 | + "400": { |
| 150 | + "description": "erro no momento da Inclusão", |
| 151 | + "content": { |
| 152 | + "application/json": { |
| 153 | + "schema": { |
| 154 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 155 | + } |
| 156 | + } |
| 157 | + } |
| 158 | + } |
| 159 | + } |
| 160 | + } |
| 161 | + }, |
| 162 | + "/Brands/{Code}": { |
| 163 | + "get": { |
| 164 | + "tags": ["Brands"], |
| 165 | + "summary": "Retorna Marca pelo seu Código", |
| 166 | + "description": "Retorna Marca pelo seu Código", |
| 167 | + "operationId": "getBrand", |
| 168 | + "x-totvs": { |
| 169 | + "productInformation": [ |
| 170 | + { |
| 171 | + "product": "RM", |
| 172 | + "available": true, |
| 173 | + "note": "Este verbo esta disponivel com todos os parametros", |
| 174 | + "minimalVersion": "12.1.34" |
| 175 | + } |
| 176 | + ] |
| 177 | + }, |
| 178 | + "parameters": [ |
| 179 | + { |
| 180 | + "$ref": "#/components/parameters/Code" |
| 181 | + }, |
| 182 | + { |
| 183 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" |
| 184 | + } |
| 185 | + ], |
| 186 | + "responses": { |
| 187 | + "200": { |
| 188 | + "description": "Operação realizada com sucesso", |
| 189 | + "content": { |
| 190 | + "application/json": { |
| 191 | + "schema": { |
| 192 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 193 | + } |
| 194 | + } |
| 195 | + } |
| 196 | + }, |
| 197 | + "404": { |
| 198 | + "description": "Marca não localizada na base", |
| 199 | + "content": { |
| 200 | + "application/json": { |
| 201 | + "schema": { |
| 202 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 203 | + } |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + }, |
| 209 | + "put": { |
| 210 | + "tags": ["Brands"], |
| 211 | + "summary": "Atualiza cadastro de Marca conforme dados enviados na requisição", |
| 212 | + "description": "Atualiza cadastro de Marca conforme dados enviados na requisição", |
| 213 | + "operationId": "putBrand", |
| 214 | + "x-totvs": { |
| 215 | + "productInformation": [ |
| 216 | + { |
| 217 | + "product": "RM", |
| 218 | + "available": true, |
| 219 | + "note": "Este verbo esta disponivel com todos os parametros", |
| 220 | + "minimalVersion": "12.1.34" |
| 221 | + } |
| 222 | + ] |
| 223 | + }, |
| 224 | + "parameters": [ |
| 225 | + { |
| 226 | + "$ref": "#/components/parameters/Code" |
| 227 | + }, |
| 228 | + { |
| 229 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" |
| 230 | + } |
| 231 | + ], |
| 232 | + "requestBody": { |
| 233 | + "content": { |
| 234 | + "application/json": { |
| 235 | + "schema": { |
| 236 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 237 | + } |
| 238 | + } |
| 239 | + }, |
| 240 | + "description": "Marca a ser atualizada" |
| 241 | + }, |
| 242 | + "responses": { |
| 243 | + "200": { |
| 244 | + "description": "Operação realizada com sucesso", |
| 245 | + "content": { |
| 246 | + "application/json": { |
| 247 | + "schema": { |
| 248 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 249 | + } |
| 250 | + } |
| 251 | + } |
| 252 | + }, |
| 253 | + "400": { |
| 254 | + "description": "Erro no momento da Inclusão", |
| 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 | + "404": { |
| 264 | + "description": "Marca não localizada na base", |
| 265 | + "content": { |
| 266 | + "application/json": { |
| 267 | + "schema": { |
| 268 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 269 | + } |
| 270 | + } |
| 271 | + } |
| 272 | + } |
| 273 | + } |
| 274 | + }, |
| 275 | + "delete": { |
| 276 | + "tags": ["Brands"], |
| 277 | + "summary": "Exclui Marca cadastrada conforme dados enviados na requisição", |
| 278 | + "description": "Exclui Marca cadastrada conforme dados enviados na requisição", |
| 279 | + "operationId": "DeleteBrand", |
| 280 | + "x-totvs": { |
| 281 | + "productInformation": [ |
| 282 | + { |
| 283 | + "product": "RM", |
| 284 | + "available": true |
| 285 | + } |
| 286 | + ] |
| 287 | + }, |
| 288 | + "parameters": [ |
| 289 | + { |
| 290 | + "$ref": "#/components/parameters/Code" |
| 291 | + }, |
| 292 | + { |
| 293 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" |
| 294 | + } |
| 295 | + ], |
| 296 | + "responses": { |
| 297 | + "200": { |
| 298 | + "description": "Operação realizada com sucesso", |
| 299 | + "content": { |
| 300 | + "application/json": { |
| 301 | + "schema": { |
| 302 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Brands_1_000.json#/definitions/BrandsInfo" |
| 303 | + } |
| 304 | + } |
| 305 | + } |
| 306 | + }, |
| 307 | + "400": { |
| 308 | + "description": "erro no momento da Inclusão", |
| 309 | + "content": { |
| 310 | + "application/json": { |
| 311 | + "schema": { |
| 312 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 313 | + } |
| 314 | + } |
| 315 | + } |
| 316 | + }, |
| 317 | + "404": { |
| 318 | + "description": "Marca não localizada na base", |
| 319 | + "content": { |
| 320 | + "application/json": { |
| 321 | + "schema": { |
| 322 | + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" |
| 323 | + } |
| 324 | + } |
| 325 | + } |
| 326 | + } |
| 327 | + } |
| 328 | + } |
| 329 | + } |
| 330 | + }, |
| 331 | + "components": { |
| 332 | + "parameters": { |
| 333 | + "Code": { |
| 334 | + "name": "Code", |
| 335 | + "in": "path", |
| 336 | + "required": true, |
| 337 | + "description": "Identificador Único representando a Marca", |
| 338 | + "schema": { |
| 339 | + "type": "string" |
| 340 | + } |
| 341 | + }, |
| 342 | + "Brands": { |
| 343 | + "name": "Brands", |
| 344 | + "in": "query", |
| 345 | + "description": "Códigos de Marca retornados pelo get separado por vírgula (,) ", |
| 346 | + "required": false, |
| 347 | + "example": "param1,param2", |
| 348 | + "schema": { |
| 349 | + "type": "string" |
| 350 | + } |
| 351 | + } |
| 352 | + }, |
| 353 | + "schemas": {} |
| 354 | + } |
| 355 | +} |
0 commit comments