-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Criação da API de Clientes do Backoffice Datasul * Especificação dos campos obrigatórios * Correção no nome do schema de retorno da API
- Loading branch information
1 parent
fde68d1
commit 96f4697
Showing
2 changed files
with
2,064 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,381 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"servers": [ | ||
{ | ||
"description": "API para Cadastro de Clientes dos produtos TOTVS", | ||
"url": "{{host}}/api/cdp/v1", | ||
"variables": { | ||
"serverUrl": { | ||
"default": "localhost" | ||
}, | ||
"serverHttpPort": { | ||
"default": "8080" | ||
} | ||
} | ||
} | ||
], | ||
"info": { | ||
"description": "API para a entidade CustomerPublic para produtos TOTVS", | ||
"version": "1.000", | ||
"title": "CustomerPublic", | ||
"contact": { | ||
"name": "T-Talk", | ||
"url": "https://api.totvs.com.br", | ||
"email": "[email protected]" | ||
}, | ||
"x-totvs": { | ||
"messageDocumentation": { | ||
"name": "CustomerPublic", | ||
"description": "Cadastro de Clientes", | ||
"segment": "Backoffice" | ||
}, | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"contact": "[email protected]", | ||
"description": "Cadastro de Clientes", | ||
"adapter": "" | ||
} | ||
] | ||
} | ||
}, | ||
"paths": { | ||
"/customerPublic": { | ||
"get": { | ||
"tags": [ | ||
"CustomerPublic" | ||
], | ||
"summary": "Retorna lista de Clientes", | ||
"x-totvs": { | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"available": true, | ||
"minimalVersion": "12.1.23" | ||
} | ||
] | ||
}, | ||
"description": "Retorna lista de Clientes", | ||
"operationId": "getCustomerPublic", | ||
"parameters": [ | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" | ||
}, | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Order" | ||
}, | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Fields" | ||
}, | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Page" | ||
}, | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/PageSize" | ||
}, | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Expand" | ||
}, | ||
{ | ||
"$ref": "#/components/parameters/totalCountParameter" | ||
}, | ||
{ | ||
"$ref": "#/components/parameters/filterParameter" | ||
}, | ||
{ | ||
"$ref": "#/components/parameters/lastUpdateParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Operação realizada com sucesso!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/PagedCustomers" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"description": "Registro não encontrado!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"post": { | ||
"tags": [ | ||
"CustomerPublic" | ||
], | ||
"summary": "Inclui um Cliente", | ||
"x-totvs": { | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"available": true, | ||
"minimalVersion": "12.1.23" | ||
} | ||
] | ||
}, | ||
"description": "Inclui um Cliente conforme dados enviados na requisição.", | ||
"operationId": "postCustomerPublic", | ||
"parameters": [ | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" | ||
} | ||
], | ||
"requestBody": { | ||
"description": "Cliente a ser incluído.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Operação realizada com sucesso!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Erro durante inclusão do Cliente!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/customerPublic/{customerID}": { | ||
"put": { | ||
"tags": [ | ||
"CustomerPublic" | ||
], | ||
"summary": "Altera um Cliente", | ||
"x-totvs": { | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"available": true, | ||
"minimalVersion": "12.1.23" | ||
} | ||
] | ||
}, | ||
"description": "Altera um Cliente conforme dados enviados na requisição.", | ||
"operationId": "putCustomerPublic", | ||
"parameters": [ | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" | ||
}, | ||
{ | ||
"in": "path", | ||
"name": "customerID", | ||
"description": "Código do Cliente", | ||
"required": true, | ||
"schema": { | ||
"type": "integer" | ||
} | ||
} | ||
], | ||
"requestBody": { | ||
"description": "Cliente a ser incluído.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Operação realizada com sucesso!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Erro durante inclusão do Cliente!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"tags": [ | ||
"CustomerPublic" | ||
], | ||
"summary": "Altera um Cliente", | ||
"x-totvs": { | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"available": true, | ||
"minimalVersion": "12.1.23" | ||
} | ||
] | ||
}, | ||
"description": "Altera um Cliente conforme dados enviados na requisição.", | ||
"operationId": "patchCustomerPublic", | ||
"parameters": [ | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" | ||
}, | ||
{ | ||
"in": "path", | ||
"name": "customerID", | ||
"description": "Código do Cliente", | ||
"required": true, | ||
"schema": { | ||
"type": "integer" | ||
} | ||
} | ||
], | ||
"requestBody": { | ||
"description": "Cliente a ser incluído.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Operação realizada com sucesso!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/CustomerPublic_1_000.json#/definitions/CustomersInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Erro durante inclusão do Cliente!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"CustomerPublic" | ||
], | ||
"summary": "Remove um Cliente", | ||
"x-totvs": { | ||
"productInformation": [ | ||
{ | ||
"product": "Datasul", | ||
"available": true, | ||
"minimalVersion": "12.1.23" | ||
} | ||
] | ||
}, | ||
"description": "Remove um Cliente", | ||
"operationId": "deleteCustomerPublic", | ||
"parameters": [ | ||
{ | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" | ||
}, | ||
{ | ||
"in": "path", | ||
"name": "customerID", | ||
"description": "Código do Cliente", | ||
"required": true, | ||
"schema": { | ||
"type": "integer" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Operação realizada com sucesso!", | ||
"content": { | ||
"application/json": {} | ||
} | ||
}, | ||
"404": { | ||
"description": "Registro não encontrado!", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"parameters": { | ||
"totalCountParameter": { | ||
"name": "totalCount", | ||
"in": "query", | ||
"description": "Considera a contagem total dos registros, respeitando os filtros anteriores.", | ||
"required": false, | ||
"schema": { | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
"filterParameter": { | ||
"name": "$filter", | ||
"in": "query", | ||
"description": "Permite a criação de filtros mais complexos, utilizando sintaxe básica de SQL.", | ||
"required": false, | ||
"schema": { | ||
"type": "string", | ||
"format": "string" | ||
} | ||
}, | ||
"lastUpdateParameter": { | ||
"name": "lastUpdate", | ||
"in": "query", | ||
"description": "Retorna os registros alterados após a data enviada.", | ||
"required": false, | ||
"schema": { | ||
"type": "string", | ||
"format": "date-time", | ||
"pattern": "ISO-8601" | ||
} | ||
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.