Este tema contém os padrões MDM para tipos de contratos (usados para motoristas e também para veículos)
Tipos de contratos (contractType)
-
Descrição
Esta entidade padroniza os seguintes atributos de tipos de contratos para motoristas e veículos:
Id e nome -
Estrutura dos Campos
Campo Descrição Tipo Link dataId Identificador do tipo de contrato int name nome do tipo de contrato string dataIdentifier identificador de unicidade da entidade string -
Como consultar ultima versão do schema da entidade
- Exemplo de retorno
Clique em "JSON"
{ "statusCode": 200, "success": true, "message": "Success", "document": { "_id": "63d02cac103c11016f07e767", "entityType": "contractType", "revision": 2, "dataIdentifierSetup": [ "name" ], "jsonSchema": { "title": "", "required": [ "entityType", "revision", "data" ], "properties": { "entityType": { "title": "contractType", "pattern": "^(.*)$", "$id": "#/properties/entityType", "type": "string" }, "revision": { "title": "The review of this entity.", "default": 1, "$id": "#/properties/revision", "type": "integer" }, "id": { "title": "The Unique Key for a document of this entity. If you don't know, don't put this in the document and it will be generated automatically.", "$id": "#/properties/dataId", "type": "integer" }, "data": { "title": "The composition of the document object.", "$id": "#/properties/data", "type": "object", "required": [ "name" ], "properties": { "name": { "title": "Name of contract type", "$id": "#/properties/data/properties/name", "type": "string", "minLength": 3, "maxLength": 200 } } } }, "$id": "http://example.org/root.json#", "type": "object", "definitions": {}, "$schema": "http://json-schema.org/draft-07/schema#" }, "authDefinition": { "resources": { "contractType": { "create": true, "update": true, "delete": true, "view": true } } }, "sensiblePropertiesPath": [], "effectiveDate": "2023-01-24T19:08:28.077Z", "status": true, "deleted": false } }
- Exemplo de retorno
-
Exemplo de chamada ao endpoint (GET) pela API get records by queryTemplate
-
Exemplo de chamada ao endpoint (GET) usando “data id”
-
Exemplo de chamada ao endpoint (GET) usando “updatedAt”
-
Exemplo de retorno
Clique em "JSON"
{ "statusCode": 200, "success": true, "message": "Success", "document": [ { "_id": "636fbbf2dd04eb0288a17db7", "entityType": "contractType", "revision": 1, "data": { "name": "Próprio", "dataId": 1, "dataIdentifier": { "name": "Próprio" } }, "createdAt": "2022-11-12T15:29:54.802Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T15:29:54.802Z" }, { "_id": "636fbbfbdd04eb0288a17db9", "entityType": "contractType", "revision": 1, "data": { "name": "Agregado", "dataId": 2, "dataIdentifier": { "name": "Agregado" } }, "createdAt": "2022-11-12T15:30:03.947Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T15:30:03.947Z" }, { "_id": "636fbc04062b1fff9d9d0292", "entityType": "contractType", "revision": 1, "data": { "name": "Terceiro", "dataId": 3, "dataIdentifier": { "name": "Terceiro" } }, "createdAt": "2022-11-12T15:30:12.566Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T15:30:12.566Z" } ], "page": 1, "limit": 5, "nextPageURL": "Last Page" }