APIs

Dados de Veículos

Este tema contém os padrões MDM para tipos de veículos, modelos de veículos, tipos de carrocerias, tipos de tração, composições de tração, combustíveis, tipos de identificações veiculares e a base de veículos cadastrados no MDM

Tipos de veículos (vehicleType)

  • Descrição
    Esta entidade padroniza os seguintes atributos de tipos de veículos:

    • Id
    • nome
    • modal logístico
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador do tipo de veículoint
    namenome do tipo de veículostring
    transportationTypeIddata.id (identificador) do modal logístico associado ao tipo de veículointtransportationTypeId
    transportationTypeNamenome do modal logístico associado ao tipo de veículostringtransportationTypeName
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "641b0dbcccef2b9e4ea7e4c1",
              "entityType": "vehicleType",
              "revision": 3,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "VehicleType Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "This entity provides the default most commom model used at nstech Platform",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "An integer value",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "data": {
                          "title": "the composition of the document object",
                          "$id": "#/properties/data",
                          "type": "object",
                          "required": [
                              "name",
                              "transportationType"
                          ],
                          "properties": {
                              "name": {
                                  "title": "Name of vehicle type.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 200
                              },
                              "transportationType": {
                                  "$id": "#/properties/data/properties/transportationType",
                                  "type": "object",
                                  "examples": [
                                      "{\"customer_code\": \"11222333000199\"}"
                                  ],
                                  "required": [
                                      "dataId",
                                      "name"
                                  ],
                                  "properties": {
                                      "dataId": {
                                          "title": "id of transportation type",
                                          "$id": "#/properties/data/properties/transportationType/properties/dataId",
                                          "type": "integer"
                                      },
                                      "name": {
                                          "title": "Name of transportation type.",
                                          "$id": "#/properties/data/properties/transportationType/properties/name",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLenght": 200
                                      }
                                  }
                              },
                              "dataId": {
                                  "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/data/properties/dataId",
                                  "type": "integer"
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "vehicleType": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [],
              "effectiveDate": "2023-03-22T14:16:28.495Z",
              "status": true,
              "deleted": false
          }
      }
      
  • 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": "636fec9bdd04eb0288a17e1d",
                "entityType": "vehicleType",
                "revision": 1,
                "data": {
                    "name": "Cavalo mecânico",
                    "transportationType": {
                        "dataId": 1,
                        "name": "Transporte rodoviário"
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Cavalo mecânico"
                    }
                },
                "createdAt": "2022-11-12T18:57:31.032Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T18:57:31.032Z"
            },
            {
                "_id": "636feca6dd04eb0288a17e1f",
                "entityType": "vehicleType",
                "revision": 1,
                "data": {
                    "name": "Toco",
                    "transportationType": {
                        "dataId": 1,
                        "name": "Transporte rodoviário"
                    },
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Toco"
                    }
                },
                "createdAt": "2022-11-12T18:57:42.686Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T18:57:42.686Z"
            }
        ],
        "page": 1,
        "limit": 2,
        "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/vehicleType/queryByTemplate/all?page=2&limit=2"
    }
    

Modelos de veículos (vehicleModel)

  • Descrição
    Esta entidade padroniza os seguintes atributos de modelos do veículos:

    • Id
    • nome
    • fabricante
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador do modelo de veículoint
    namenome do modelo de veículostring
    companyIddata.id (identificador) da empresa fabricante do veículointcompanyId
    companyNamenome da empresa fabricante do veículostringcompanyName
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "6408e48c2fdf838348471eec",
              "entityType": "vehicleModel",
              "revision": 2,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "Vehicle Model Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "Vehicle Model Entity",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "The review of this entity.",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "data": {
                          "title": "The composition of the document object.",
                          "required": [
                              "name",
                              "company"
                          ],
                          "$id": "#/properties/data",
                          "type": "object",
                          "properties": {
                              "name": {
                                  "title": "Name of Vehicle Model.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 200
                              },
                              "company": {
                                  "$id": "#/properties/data/properties/company",
                                  "type": "object",
                                  "required": [
                                      "dataid",
                                      "name"
                                  ],
                                  "properties": {
                                      "dataid": {
                                          "title": "Value of company dataId.",
                                          "$id": "#/properties/data/properties/company/properties/dataId",
                                          "type": "integer"
                                      },
                                      "name": {
                                          "title": "Company name.",
                                          "$id": "#/properties/data/properties/company/properties/name",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLenght": 200
                                      }
                                  }
                              },
                              "dataId": {
                                  "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/data/properties/dataId",
                                  "type": "integer"
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "vehicleModel": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [
                  "name",
                  "company.dataid",
                  "company.name"
              ],
              "effectiveDate": "2023-01-23T17:54:20.354Z",
              "status": true,
              "deleted": false
          }
      }
      
  • 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": "63cecd4df055e538ed175946",
                "entityType": "vehicleModel",
                "revision": 1,
                "data": {
                    "name": "MARRUÁ 2.8 12V 132cv TDI Diesel",
                    "company": {
                        "dataid": 24,
                        "name": "Agrale"
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "MARRUÁ 2.8 12V 132cv TDI Diesel"
                    }
                },
                "createdAt": "2023-01-23T18:09:17.470Z",
                "updatedAt": "2023-01-23T18:09:17.470Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            },
            {
                "_id": "63cecd57f055e538ed175948",
                "entityType": "vehicleModel",
                "revision": 1,
                "data": {
                    "name": "MARRUÁ AM 100 2.8  CS TDI Diesel",
                    "company": {
                        "dataid": 24,
                        "name": "Agrale"
                    },
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "MARRUÁ AM 100 2.8  CS TDI Diesel"
                    }
                },
                "createdAt": "2023-01-23T18:09:27.507Z",
                "updatedAt": "2023-01-23T18:09:27.507Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            }
        ],
        "page": 1,
        "limit": 2,
        "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/vehicleModel/queryByTemplate/all?page=2&limit=2"
    }
    

Tipos de carrocerias (bodyworkType)

  • Descrição
    Esta entidade padroniza o seguinte atributos de tipos de carroceria de veículos:

    • Id
    • nome
    • modal logístico
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador do tipo de carroceriaint
    namenome do tipo de carroceriastring
    transportationTypeIddata.id (identificador) do modal logístico associado ao tipo de carroceriainttransportationTypeId
    transportationTypeNamenome do modal logístico associado ao tipo de carroceriastringtransportationTypeName
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "641b0a22ccef2b9e4ea6aa72",
              "entityType": "bodyworkType",
              "revision": 3,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "BodyworkType Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "This entity provides the default most commom model used at nstech Platform",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "An integer value",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "data": {
                          "title": "The composition of the document object",
                          "$id": "#/properties/data",
                          "type": "object",
                          "required": [
                              "name",
                              "transportationType"
                          ],
                          "properties": {
                              "name": {
                                  "title": "Name of bodywork type.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 200
                              },
                              "transportationType": {
                                  "$id": "#/properties/data/properties/transportationType",
                                  "type": "object",
                                  "examples": [
                                      "{\"customer_code\": \"11222333000199\"}"
                                  ],
                                  "required": [
                                      "dataId",
                                      "name"
                                  ],
                                  "properties": {
                                      "dataId": {
                                          "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/data/properties/transportationType/properties/dataId",
                                          "type": "integer"
                                      },
                                      "name": {
                                          "title": "Name of transportation type.",
                                          "$id": "#/properties/data/properties/transportationType/properties/name",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLenght": 200
                                      }
                                  }
                              },
                              "dataId": {
                                  "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/data/properties/dataId",
                                  "type": "integer"
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "bodyworkType": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [],
              "effectiveDate": "2023-03-22T14:01:06.244Z",
              "status": true,
              "deleted": false
          }
      }
      
  • 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": "636febfb062b1fff9d9d02f4",
                "entityType": "bodyworkType",
                "revision": 1,
                "data": {
                    "name": "Baú",
                    "transportationType": {
                        "dataId": 1,
                        "name": "Transporte rodoviário"
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Baú"
                    }
                },
                "createdAt": "2022-11-12T18:54:51.529Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T18:54:51.529Z"
            },
            {
                "_id": "636fec05062b1fff9d9d02f6",
                "entityType": "bodyworkType",
                "revision": 1,
                "data": {
                    "name": "Sider",
                    "transportationType": {
                        "dataId": 1,
                        "name": "Transporte rodoviário"
                    },
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Sider"
                    }
                },
                "createdAt": "2022-11-12T18:55:01.028Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T18:55:01.028Z"
            }
        ],
        "page": 1,
        "limit": 2,
        "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/bodyworkType/queryByTemplate/all?page=2&limit=2"
    }
    

Tipos de tração (tractionType)


Composições de tração (tractionComposition)


Combustíveis (fuel)

  • Descrição
    Esta entidade padroniza os seguintes atributos de combustíveis:

    • Id
    • nome
    • sigla
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdIdentificador do combustívelint
    namenome do combustívelstring
    abbrevsigla do combustívelstring
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "6408e4862fdf838348471ed7",
              "entityType": "fuel",
              "revision": 3,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "Fuel Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "This entity provides the default most commom model used at nstech Platform",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "The review of this entity.",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "data": {
                          "title": "the composition of the document object",
                          "$id": "#/properties/data",
                          "type": "object",
                          "required": [
                              "name"
                          ],
                          "properties": {
                              "name": {
                                  "title": "Name of fuel type.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 40
                              },
                              "abbrev": {
                                  "title": "Abbreviation of Fuel type.",
                                  "$id": "#/properties/data/properties/abbrev",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 10
                              },
                              "dataId": {
                                  "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/data/properties/dataId",
                                  "type": "integer"
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "fuel": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [],
              "effectiveDate": "2023-01-24T19:10:13.002Z",
              "status": true,
              "deleted": false
          }
      }
      
  • 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": "636fbb44dd04eb0288a17dae",
                "entityType": "fuel",
                "revision": 1,
                "data": {
                    "name": "Etanol",
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Etanol"
                    }
                },
                "createdAt": "2022-11-12T15:27:00.555Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T15:27:00.555Z"
            },
            {
                "_id": "636fbb51062b1fff9d9d028a",
                "entityType": "fuel",
                "revision": 1,
                "data": {
                    "name": "Gasolina",
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Gasolina"
                    }
                },
                "createdAt": "2022-11-12T15:27:13.170Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T15:27:13.170Z"
            }
        ],
        "page": 1,
        "limit": 2,
        "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/fuel/queryByTemplate/all?page=2&limit=2"
    }
    

Tipos de identificações (identificationType)

  • Descrição
    Esta entidade padroniza os seguintes atributos de tipos de identificadores:

    • Id
    • nome
    • modais logísticos associados ao identificador
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador do tipo de identificaçãoint
    namenome do tipo de identificaçãostring
    transportationTypeId [array]array de identificadores dos modais logísticos associados ao documentointtransportationTypeId
    transportationTypeName [array]array de nome dos modais logísticos associados ao documentostringtransportationTypeName
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "6408e4862fdf838348471ed9",
              "entityType": "identificationType",
              "revision": 2,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "identificationType Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "Device Model Entity",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "The review of this entity.",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "data": {
                          "title": "The composition of the document object.",
                          "required": [
                              "name",
                              "transportationType"
                          ],
                          "$id": "#/properties/data",
                          "type": "object",
                          "properties": {
                              "name": {
                                  "title": "Name of Device Model.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 200
                              },
                              "transportationType": {
                                  "$id": "#/properties/data/properties/transportationType",
                                  "type": "array",
                                  "items": {
                                      "type": "object",
                                      "properties": {
                                          "transportationTypeId": {
                                              "$id": "#/properties/data/properties/accessoryType/properties/transportationTypeId",
                                              "type": "integer"
                                          },
                                          "transportationTypeName": {
                                              "$id": "#/properties/data/properties/accessoryType/properties/transportationTypeName",
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLenght": 200
                                          }
                                      }
                                  }
                              },
                              "dataId": {
                                  "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/data/properties/dataId",
                                  "type": "integer"
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "identificationType": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [
                  "name",
                  "transportationType"
              ],
              "effectiveDate": "2023-01-23T22:08:58.937Z",
              "status": true,
              "deleted": false
          }
      }
      
  • 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": "63cf05851dde420cf9960b72",
                "entityType": "identificationType",
                "revision": 1,
                "data": {
                    "name": "Placa",
                    "transportationType": [
                        {
                            "transportationTypeId": 1,
                            "transportationTypeName": "Transporte rodoviário"
                        }
                    ],
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Placa"
                    }
                },
                "createdAt": "2023-01-23T22:09:09.191Z",
                "updatedAt": "2023-01-23T22:09:09.191Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            },
            {
                "_id": "63cf05851dde420cf9960b74",
                "entityType": "identificationType",
                "revision": 1,
                "data": {
                    "name": "Chassi",
                    "transportationType": [
                        {
                            "transportationTypeId": 1,
                            "transportationTypeName": "Transporte rodoviário"
                        }
                    ],
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Chassi"
                    }
                },
                "createdAt": "2023-01-23T22:09:09.215Z",
                "updatedAt": "2023-01-23T22:09:09.215Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            }
        ],
        "page": 1,
        "limit": 2,
        "nextPageURL": "Last Page"
    }
    

Base de veículos cadastrados (vehicle)

  • Descrição
    Esta entidade é uma base de dados veículos. Cada veículo cadastrado tem um identificador único (Id), além de outros atributos, tais como:
    Ano de fabricação, modelo de fabricação, país, estado, cidade, dados de identificação como número da placa e chassi, proprietário, dados do documento principal, cor, tipo, fabricante, modelo, combustível, informações sobre tração, carroceria, capacidade de carga, acessórios e dispositivos

  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdIdentificador do veículoint
    manufacturingYearano de fabricaçãoint
    modelYearano do modeloint
    countryIddata.id (identificador) do paísintcountryId
    countryNamenome do paísstringcountryName
    provinceIdidentificador do estadointprovinceId
    provinceNamenome do estadostringprovinceName
    cityIdidentificador da cidadeintcityId
    cityNamenome da cidadestringcityName
    Identification [array]
    identificationTypeIdarray de identificadores do tipo de identificadorintidentificationTypeId
    identificationTypeNamearray de nomes do tipo de identificadorstringidentificationTypeName
    identificationDataarray de números de identificaçãostring
    Owner
    ownerTypetipo de proprietário (pessoa ou empresa)string
    Namenome do proprietário (pessoa ou empresa)string
    countryIdidentificador do paísintcountryId
    countryNamenome do paísstringcountryName
    documentIdidentificador do documento de identificação principalintdocumentId
    documentNamenome do documento de identificação principalstringdocumentName
    documentNumbernúmero do documento de identificação principalstring
    Main vehicle document [array]
    countryIdidentificador do paísintcountryId
    countryNamenome do paísstringcountryName
    documentIdidentificador do tipo de documentointdocumentId
    documentNamenome do tipo de documentostringdocumentName
    docCategoryIdidentificador da categoria do documentointdocCategoryId
    docCategoryNamenome da categoria do documentostringdocCategoryName
    documentNumbernúmero do documentostring
    docIssuerIdidentificador do órgão emissor do documentointdocIssuerId
    docIssuerNamenome do órgão emissor do documentostringdocIssuerName
    provinceIssuerIdidentificador do estado do órgão emissor do documentointprovinceId
    provinceIssuerNamenome do estado do órgão emissor do documentostringProvinceName
    issueDatedata de emissão do documentostring
    expirationDatedata de vencimento do documentostring
    firstIssueDatedata da primeira emissão do documentostring
    docPicturefoto do documentobase64
    complementdados adicionais do documentoobjeto
    Vehicle color
    colorIdidentificador da corintcolorId
    colorNamenome da corstringcolorName
    Vehicle Type
    vehicleTypeIdidentificador do tipo de veículointvehicleTypeId
    vehicleTypeNamenome do tipo de veículostringvehicleTypeName
    Vehicle Manufacturer
    vehicleManufacturerIdidentificador da empresa fabricanteintcompanyId
    vehicleManufacturerNamenome da empresa fabricantestringcompanyName
    Vehicle Model
    vehicleModelIdidentificador do modelointvehicleModelId
    vehicleModelNamenome do modelostringvehicleModelName
    Fuel
    fuelIdidentificador do combustívelintfuelId
    fuelNamenome do combustívelstringfuelName
    Traction
    tractionTypeIdidentificador do tipo de traçãointtractionTypeId
    tractionTypeNamenome do tipo de traçãostringtractionTypeName
    tractionCompositionIdidentificador da composição de traçãointtractionCompositonId
    tractionCompositionNamenome da composição de traçãostringtractionCompositionName
    Transportation Type
    TransportationTypeIdidentificador do modalinttransportationTypeId
    TransportationTypeNamenome do modalstringtransportationTypeName
    Trailler/bodywork Type
    bodyworkTypeIdidentificador do tipo de carroceriaintbodyworktypeId
    bodyworkTypeNamenome do tipo de carroceriastringbodyworkTypeName
    Capacity [array]
    transportationCapacitycapacidade de volume (carga)int
    measuringUnitIdidentificador da unidade de medidaintmeasuringUnitId
    measuringUnitNamenome da unidade de medidastringmeasuringUnitName
    Accessory Type [array]
    accessoryTypeIdarray de identificadores de tipos de acessóriosintaccessorytypeId
    accessorytypeNamearray de nomes de tipos de acessóriosstringaccessorytypeName
    Device type [array]
    deviceTypeIdarray de identificadores de tipos de dispositivosintdeviceTypeId
    devicetypeNamearray de tipos de dispositivosstringdeviceTypeName
    deviceModelIdarray de identificadores de modelos de dispositivosintdeviceModelId
    deviceModelNamearray de nomes de modelos de dispositivosstringdeviceModelName
    deviceSerialNumberarray de números de série de dispositivosstring
    deviceCompanyIdarray de identificadores de empresas de rastreamentointcompanyId
    deviceCompanyNamearray de nomes de empresas de rastreamentostringcompanyName
    dataIdentifieridentificador de unicidade da entidadestring
  • Como consultar ultima versão do schema da entidade

    • Exemplo de retorno
      Clique em "JSON"
      
      {
          "statusCode": 200,
          "success": true,
          "message": "Success",
          "document": {
              "_id": "640f73ed2fd6c99175bae738",
              "entityType": "vehicle",
              "revision": 2,
              "dataIdentifierSetup": [
                  "identification.identificationTypeId",
                  "identification.identificationTypeName",
                  "identification.identificationData"
              ],
              "jsonSchema": {
                  "title": "",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "accessoryType",
                          "pattern": "^(.*)$",
                          "$id": "#/properties/entityType",
                          "type": "string"
                      },
                      "revision": {
                          "title": "The review of this entity.",
                          "default": 1,
                          "$id": "#/properties/revision",
                          "type": "integer"
                      },
                      "dataId": {
                          "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",
                          "properties": {
                              "name": {
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string"
                              },
                              "manufacturingYear": {
                                  "$id": "#/properties/data/properties/manufacturingYear",
                                  "type": "string",
                                  "minLength": 10,
                                  "maxLength": 10
                              },
                              "modelYear": {
                                  "$id": "#/properties/data/properties/modelYear",
                                  "type": "string",
                                  "minLength": 10,
                                  "maxLength": 10
                              },
                              "countryId": {
                                  "$id": "#/properties/data/properties/countryId",
                                  "type": "integer"
                              },
                              "countryName": {
                                  "$id": "#/properties/data/properties/countryName",
                                  "type": "string"
                              },
                              "provinceId": {
                                  "$id": "#/properties/data/properties/provinceId",
                                  "type": "integer"
                              },
                              "provinceName": {
                                  "$id": "#/properties/data/properties/provinceName",
                                  "type": "string"
                              },
                              "cityId": {
                                  "$id": "#/properties/data/properties/cityId",
                                  "type": "integer"
                              },
                              "cityName": {
                                  "$id": "#/properties/data/properties/cityName",
                                  "type": "string"
                              },
                              "identification": {
                                  "$id": "#/properties/data/properties/identification",
                                  "type": "object",
                                  "properties": {
                                      "identificationTypeId": {
                                          "$id": "#/properties/data/properties/identification/properties/identificationTypeId",
                                          "type": "integer"
                                      },
                                      "identificationTypeName": {
                                          "$id": "#/properties/data/properties/identification/properties/identificationTypeName",
                                          "type": "string"
                                      },
                                      "identificationData": {
                                          "$id": "#/properties/data/properties/identification/properties/identificationData",
                                          "type": "string"
                                      }
                                  }
                              },
                              "owner": {
                                  "$id": "#/properties/data/properties/owner",
                                  "type": "object",
                                  "properties": {
                                      "ownerType": {
                                          "$id": "#/properties/data/properties/owner/properties/ownerType",
                                          "type": "string"
                                      },
                                      "name": {
                                          "$id": "#/properties/data/properties/owner/properties/name",
                                          "type": "string"
                                      },
                                      "countryId": {
                                          "$id": "#/properties/data/properties/owner/properties/countryId",
                                          "type": "integer"
                                      },
                                      "countryName": {
                                          "$id": "#/properties/data/properties/owner/properties/countryName",
                                          "type": "string"
                                      },
                                      "documentId": {
                                          "$id": "#/properties/data/properties/owner/properties/documentId",
                                          "type": "integer"
                                      },
                                      "documentName": {
                                          "$id": "#/properties/data/properties/owner/properties/documentName",
                                          "type": "string"
                                      },
                                      "documentData": {
                                          "$id": "#/properties/data/properties/owner/properties/documentData",
                                          "type": "string"
                                      }
                                  }
                              },
                              "document": {
                                  "$id": "#/properties/data/properties/document",
                                  "type": "array",
                                  "items": {
                                      "type": "object",
                                      "properties": {
                                          "countryId": {
                                              "$id": "#/properties/data/properties/document/properties/countryId",
                                              "type": "integer"
                                          },
                                          "countryName": {
                                              "$id": "#/properties/data/properties/document/properties/countryName",
                                              "type": "string"
                                          },
                                          "documentId": {
                                              "$id": "#/properties/data/properties/document/properties/documentId",
                                              "type": "integer"
                                          },
                                          "documentName": {
                                              "$id": "#/properties/data/properties/document/properties/documentName",
                                              "type": "string"
                                          },
                                          "documentData": {
                                              "$id": "#/properties/data/properties/document/properties/documentData",
                                              "type": "string"
                                          },
                                          "docCategoryId": {
                                              "$id": "#/properties/data/properties/document/properties/docCategoryId",
                                              "type": "integer"
                                          },
                                          "docCategoryName": {
                                              "$id": "#/properties/data/properties/document/properties/docCategoryName",
                                              "type": "string"
                                          },
                                          "docIssuerId": {
                                              "$id": "#/properties/data/properties/document/properties/docIssuerId",
                                              "type": "integer"
                                          },
                                          "docIssuerName": {
                                              "$id": "#/properties/data/properties/document/properties/docIssuerName",
                                              "type": "string"
                                          },
                                          "provinceIssuerId": {
                                              "$id": "#/properties/data/properties/document/properties/provinceIssuerId",
                                              "type": "integer"
                                          },
                                          "provinceIssuerName": {
                                              "$id": "#/properties/data/properties/document/properties/provinceIssuerName",
                                              "type": "string"
                                          },
                                          "issueDate": {
                                              "$id": "#/properties/data/properties/document/properties/issueDate",
                                              "type": "string",
                                              "minLength": 10,
                                              "maxLength": 10
                                          },
                                          "expirationDate": {
                                              "$id": "#/properties/data/properties/document/properties/expirationDate",
                                              "type": "string",
                                              "minLength": 10,
                                              "maxLength": 10
                                          },
                                          "firstIssueDate": {
                                              "$id": "#/properties/data/properties/document/properties/firstIssueDate",
                                              "type": "string",
                                              "minLength": 10,
                                              "maxLength": 10
                                          },
                                          "docPicture": {
                                              "$id": "#/properties/data/properties/document/properties/docPicture",
                                              "type": "string"
                                          },
                                          "complement": {
                                              "$id": "#/properties/data/properties/document/properties/complement",
                                              "type": "string"
                                          }
                                      }
                                  }
                              },
                              "color": {
                                  "$id": "#/properties/data/properties/color",
                                  "type": "object",
                                  "properties": {
                                      "colorId": {
                                          "$id": "#/properties/data/properties/color/properties/colorId",
                                          "type": "integer"
                                      },
                                      "colorName": {
                                          "$id": "#/properties/data/properties/color/properties/colorName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "type": {
                                  "$id": "#/properties/data/properties/type",
                                  "type": "object",
                                  "properties": {
                                      "vehicleTypeId": {
                                          "$id": "#/properties/data/properties/type/properties/vehicleTypeId",
                                          "type": "integer"
                                      },
                                      "vehicleTypeName": {
                                          "$id": "#/properties/data/properties/type/properties/vehicleTypeName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "manufacturer": {
                                  "$id": "#/properties/data/properties/manufacturer",
                                  "type": "object",
                                  "properties": {
                                      "vehicleManufacturerId": {
                                          "$id": "#/properties/data/properties/manufacturer/properties/vehicleManufacturerId",
                                          "type": "integer"
                                      },
                                      "vehicleManufacturerName": {
                                          "$id": "#/properties/data/properties/manufacturer/properties/vehicleManufacturerName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "model": {
                                  "$id": "#/properties/data/properties/model",
                                  "type": "object",
                                  "properties": {
                                      "vehicleModelId": {
                                          "$id": "#/properties/data/properties/model/properties/vehicleModelId",
                                          "type": "string"
                                      },
                                      "vehicleModelName": {
                                          "$id": "#/properties/data/properties/model/properties/vehicleModelName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "fuel": {
                                  "$id": "#/properties/data/properties/fuel",
                                  "type": "object",
                                  "properties": {
                                      "fuelId": {
                                          "$id": "#/properties/data/properties/fuel/properties/fuelId",
                                          "type": "string"
                                      },
                                      "fuelName": {
                                          "$id": "#/properties/data/properties/fuel/properties/fuelName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "traction": {
                                  "$id": "#/properties/data/properties/traction",
                                  "type": "object",
                                  "properties": {
                                      "tractionTypeId": {
                                          "$id": "#/properties/data/properties/traction/properties/tractionTypeId",
                                          "type": "string"
                                      },
                                      "tractionTypeName": {
                                          "$id": "#/properties/data/properties/traction/properties/tractionTypeName",
                                          "type": "string"
                                      },
                                      "tractionCompositionId": {
                                          "$id": "#/properties/data/properties/traction/properties/tractionCompositionId",
                                          "type": "string"
                                      },
                                      "tractionCompositionName": {
                                          "$id": "#/properties/data/properties/traction/properties/tractionCompositionName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "transportation": {
                                  "$id": "#/properties/data/properties/transportation",
                                  "type": "object",
                                  "properties": {
                                      "transportationTypeId": {
                                          "$id": "#/properties/data/properties/transportation/properties/transportationTypeId",
                                          "type": "string"
                                      },
                                      "transportationTypeName": {
                                          "$id": "#/properties/data/properties/transportation/properties/transportationTypeName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "bodywork": {
                                  "$id": "#/properties/data/properties/bodywork",
                                  "type": "object",
                                  "properties": {
                                      "bodyworkTypeId": {
                                          "$id": "#/properties/data/properties/bodywork/properties/bodyworkTypeId",
                                          "type": "string"
                                      },
                                      "bodyworkTypeName": {
                                          "$id": "#/properties/data/properties/bodywork/properties/bodyworkTypeName",
                                          "type": "string"
                                      }
                                  }
                              },
                              "capacity": {
                                  "$id": "#/properties/data/properties/capacity",
                                  "type": "array",
                                  "items": {
                                      "type": "object",
                                      "properties": {
                                          "transportationCapacity": {
                                              "$id": "#/properties/data/properties/capacity/properties/transportationCapacity",
                                              "type": "integer"
                                          },
                                          "measuringUnitId": {
                                              "$id": "#/properties/data/properties/capacity/properties/measuringUnitId",
                                              "type": "string"
                                          },
                                          "measuringUnitName": {
                                              "$id": "#/properties/data/properties/capacity/properties/measuringUnitName",
                                              "type": "string"
                                          }
                                      }
                                  }
                              },
                              "accessoryType": {
                                  "$id": "#/properties/data/properties/accessoryType",
                                  "type": "array",
                                  "items": {
                                      "type": "object",
                                      "properties": {
                                          "accessoryTypeId": {
                                              "$id": "#/properties/data/properties/accessoryType/properties/accessoryTypeId",
                                              "type": "string"
                                          },
                                          "accessoryTypeName": {
                                              "$id": "#/properties/data/properties/accessoryType/properties/accessoryTypeName",
                                              "type": "string"
                                          }
                                      }
                                  }
                              },
                              "deviceType": {
                                  "$id": "#/properties/data/properties/deviceType",
                                  "type": "array",
                                  "items": {
                                      "type": "object",
                                      "properties": {
                                          "deviceTypeId": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceTypeId",
                                              "type": "string"
                                          },
                                          "deviceTypeName": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceTypeName",
                                              "type": "string"
                                          },
                                          "deviceModelId": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceModelId",
                                              "type": "string"
                                          },
                                          "deviceModelName": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceModelName",
                                              "type": "string"
                                          },
                                          "deviceSerialNumber": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceSerialNumber",
                                              "type": "string"
                                          },
                                          "deviceCompanyId": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceCompanyId",
                                              "type": "string"
                                          },
                                          "deviceCompanyName": {
                                              "$id": "#/properties/data/properties/deviceType/properties/deviceCompanyName",
                                              "type": "string"
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  },
                  "$id": "http://example.org/root.json#",
                  "type": "object",
                  "definitions": {},
                  "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "authDefinition": {
                  "resources": {
                      "accessoryType": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [],
              "queryTemplates": [
                  {
                      "queryByDataIdentifier": {
                          "query": "{ \"dataIdentifier\": { \"identification\": { \"identificationTypeId\": paramTypeId, \"identificationTypeName\": paramTypeName, \"identificationData\": paramData }}}",
                          "description": "Get Person by dataIdentifier",
                          "options": "{\"sort\": {\"data.name\": 1}}",
                          "parametersRules": [
                              {
                                  "paramTypeId": {
                                      "type": "integer",
                                      "description": "Country Id",
                                      "minValue": 0
                                  },
                                  "paramTypeName": {
                                      "type": "integer",
                                      "description": "Document Id",
                                      "minValue": 0
                                  },
                                  "paramData": {
                                      "type": "string",
                                      "description": "Document Number",
                                      "minValue": 0
                                  }
                              }
                          ]
                      }
                  },
                  {
                      "queryByDataId": {
                          "query": "{ \"dataId\": paramDataId }",
                          "description": "Get Person by dataId",
                          "options": "{\"limit\": 1}",
                          "parametersRules": [
                              {
                                  "paramDataId": {
                                      "type": "integer",
                                      "description": "DataId",
                                      "minValue": 0
                                  }
                              }
                          ]
                      }
                  },
                  {
                      "queryByObjectId": {
                          "query": "{ \"_id\": paramObjectId }",
                          "description": "Get Person by ObjectId",
                          "parametersRules": [
                              {
                                  "paramObjectId": {
                                      "type": "string",
                                      "description": "ObjectId as string"
                                  }
                              }
                          ]
                      }
                  }
              ],
              "effectiveDate": "2023-03-13T19:05:17.885Z",
              "status": true,
              "deleted": false
          }
      }
      
  • Exemplo de chamada ao endpoint (GET) usando "queryTemplate (identificationType)"

    Produçãohttps://platform.nstech.com.br/api/mdm/entities/vehicle/queryByTemplate/queryByDataIdentifier?paramCountryId=76&paramVehiclePlate=AAW2695
    Homologaçãohttps://dev.nstech.com.br/platform/api/mdm-stg/entities/vehicle/queryByTemplate/queryByDataIdentifier?paramCountryId=76&paramVehiclePlate=AAW2695
    • Exemplo de retorno
      Clique em "JSON"
      
      {
        "statusCode": 200,
        "success": true,
        "message": "Success",
        "document": [
          {
            "_id": "6553e4769a7d1155bc400d0e",
            "status": true,
            "deleted": false,
            "updatedAt": "2023-11-14T21:19:50.108Z",
            "userCreator": "mdm-surrogate",
            "createdAt": "2023-11-14T21:19:50.108Z",
            "effectiveDate": "2023-11-14T21:19:50.108Z",
            "entityType": "vehicle",
            "revision": 4,
            "data": {
              "manufacturingYear": "2001",
              "modelYear": "2001",
              "countryId": 76,
              "countryName": "Brasil",
              "identificationDocument": {
                "countryId": 76,
                "countryName": "Brasil",
                "vehiclePlate": "AAW2695"
              },
              "owner": {
                "ownerType": "L",
                "name": "ALL AMERICA LATINA LOGISTICA INTERMODAL LTDA",
                "countryId": 76,
                "countryName": "Brasil",
                "documentId": 20,
                "documentName": "Cadastro nacional de pessoas jurídicas",
                "documentData": "03172874000114"
              },
              "color": {
                "colorId": 15,
                "colorName": "Vermelho"
              },
              "type": {
                "vehicleTypeId": 4,
                "vehicleTypeName": "Carreta"
              },
              "model": {},
              "fuel": {},
              "bodywork": {},
              "deviceType": [{}],
              "dataIdentifier": {
                "identificationDocument": {
                  "vehiclePlate": "AAW2695",
                  "countryId": 76
                }
              }
            }
          }
        ],
        "page": 1,
        "limit": 100
      }
      
  • Exemplo de chamada ao endpoint (GET) usando “data id”

    Produção
    Homologação
  • Exemplo de chamada ao endpoint (GET) usando “updatedAt”

    Produção
    Homologação
  • Exemplo de retorno


Insira nos campos param1 e param2 as informações relativas as CountryId e VehiclePlate, respectivamente.

Language
Credentials
Header
Click Try It! to start a request and see the response here!