APIs

Tipos de Operações Logísticas

Este tema contém os padrões MDM para tipos de operações logísticas

Tipos de operações logísticas (operationType)

  • Descrição
    Esta entidade padroniza os seguintes atributos de tipos de operações logísticas:

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

    CampoDescriçãoTipoLink
    dataIdIdentificador do tipo de operação logísticaint
    namenome do tipo de operação logísticastring
    abbrevSigla do tipo de operação logísticastring
    transportationTypeId [array]array de identificadores dos modais logísticos associados à operação logísticainttransportationTypeId
    transportationTypeName [array]array de nome dos modais logísticos associados à operação logísticastringtransportationTypeName
    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": "6408e4882fdf838348471ee0",
              "entityType": "operationType",
              "revision": 3,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "operationType",
                          "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",
                              "abbrev",
                              "transportationType"
                          ],
                          "properties": {
                              "name": {
                                  "title": "Name of logistic operation type.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 3,
                                  "maxLength": 200
                              },
                              "abbrev": {
                                  "title": "Abbreviation of logistic operation type.",
                                  "$id": "#/properties/data/properties/abbrev",
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 200
                              },
                              "transportationType": {
                                  "$id": "#/properties/data/properties/transportationType",
                                  "type": "object",
                                  "required": [
                                      "dataId",
                                      "name"
                                  ],
                                  "properties": {
                                      "dataId": {
                                          "title": "Id [array] of transportation type associated with the document.",
                                          "$id": "#/properties/data/properties/transportationType/dataId",
                                          "type": "array",
                                          "items": {
                                              "type": "integer"
                                          }
                                      },
                                      "name ": {
                                          "title": "Name [array] of transportation type associated with the document.",
                                          "$id": "#/properties/data/properties/transportationType/name",
                                          "type": "array",
                                          "items": {
                                              "type": "string",
                                              "minLength": 2,
                                              "maxLength": 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": {
                      "operationType": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [],
              "effectiveDate": "2023-01-25T17:55:06.371Z",
              "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": "636ff3c3ce9d5627804ceb34",
                "entityType": "operationType",
                "revision": 1,
                "data": {
                    "name": "Lotação",
                    "abbrev": "FTL",
                    "transportationType": {
                        "dataId": [
                            1
                        ],
                        "name": [
                            "Transporte rodoviário"
                        ]
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Lotação"
                    }
                },
                "createdAt": "2022-11-12T19:28:03.400Z",
                "deleted": false,
                "userCreator": "service-account-mdm",
                "updatedAt": "2022-11-12T19:28:03.400Z"
            }
        ],
        "page": 1,
        "limit": 1,
        "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/operationType/queryByTemplate/all?page=2&limit=1"
    }