APIs

SKUs de Produtos

Este tema contém os padrões MDM para recorrências de produtos, categorias de SKUs, famílias de SKUs e SKUs da plataforma

Recorrências (recurrency)


Categorias de SKUs (skuCategory)


Famílias de SKUs (skuFamily)

  • Descrição
    Esta entidade padroniza os seguintes atributos de famílias de SKUs

    • Id
    • nome
    • categoria
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador da família do SKUint
    namenome da família do SKUstring
    skuCategoryIdidentificador da categoria do SKUintskuCategoryId
    skuCategoryNamenome da categoria do SKUstringskuCategoryName
    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": "6408e48a2fdf838348471ee6",
              "entityType": "skuFamily",
              "revision": 2,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "skuFamily Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "skuFamily 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"
                          ],
                          "$id": "#/properties/data",
                          "type": "object",
                          "properties": {
                              "name": {
                                  "title": "SKU family name.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 20
                              },
                              "skuCategory": {
                                  "$id": "#/properties/data/properties/skuCategory",
                                  "type": "object",
                                  "properties": {
                                      "skuCategoryId": {
                                          "title": "SKU category Id.",
                                          "$id": "#/properties/data/properties/skuCategory/properties/skuCategoryId",
                                          "type": "integer"
                                      },
                                      "skuCategoryName": {
                                          "title": "SKU category name.",
                                          "$id": "#/properties/data/properties/skuCategory/properties/skuCategoryName",
                                          "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": {
                      "skuFamily": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [
                  "name"
              ],
              "effectiveDate": "2023-01-23T22:16:40.463Z",
              "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": "63cf07cbf055e538ed17d668",
                "entityType": "skuFamily",
                "revision": 1,
                "data": {
                    "name": "Pedágio",
                    "skuCategory": {
                        "skuCategoryId": 1,
                        "skuCategoryName": "Serviços financeiros"
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Pedágio"
                    }
                },
                "createdAt": "2023-01-23T22:18:51.231Z",
                "updatedAt": "2023-01-23T22:18:51.231Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            },
            {
                "_id": "63cf07cc1dde420cf9960b8c",
                "entityType": "skuFamily",
                "revision": 1,
                "data": {
                    "name": "Nfe",
                    "skuCategory": {
                        "skuCategoryId": 8,
                        "skuCategoryName": "Documentos fiscais"
                    },
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Nfe"
                    }
                },
                "createdAt": "2023-01-23T22:18:52.574Z",
                "updatedAt": "2023-01-23T22:18:52.574Z",
                "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/skuFamily/queryByTemplate/all?page=2&limit=2"
    }
    

SKUs da plataforma (skuPlatform)

  • Descrição
    Esta entidade padroniza os seguintes atributos de SKUs da plataforma:

    • Id
    • nome
    • tipo
    • família
    • categoria
    • recorrência
  • Estrutura dos Campos

    CampoDescriçãoTipoLink
    dataIdidentificador do SKU do produtoint
    namenome do SKU do produtostring
    skuType [array]tipo do SKU: software, serviçostring
    skuFamilyIdidentificador da família do SKUintskuFamilyId
    skuFamilyNamenome da família do SKUstringskuFamilyName
    skuCategoryIdidentificador da categoria do SKUintskuCategoryId
    skuCategoryNamenome da categoria do SKUstringskuCategoryName
    skuRecurrencyIdidentificador da recorrência do SKUintskuRecurrencyId
    skyRecurrencyNamenome da recorrência do SKUstringskuRecurrencyName
    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": "6408e48a2fdf838348471ee7",
              "entityType": "skuPlatform",
              "revision": 2,
              "dataIdentifierSetup": [
                  "name"
              ],
              "jsonSchema": {
                  "title": "skuPlatform Entity",
                  "required": [
                      "entityType",
                      "revision",
                      "data"
                  ],
                  "properties": {
                      "entityType": {
                          "title": "skuPlatform 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"
                          ],
                          "$id": "#/properties/data",
                          "type": "object",
                          "properties": {
                              "name": {
                                  "title": "SKU family name.",
                                  "$id": "#/properties/data/properties/name",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLenght": 200
                              },
                              "skuType": {
                                  "title": "SKU family name.",
                                  "$id": "#/properties/data/properties/skuType",
                                  "type": "array"
                              },
                              "skuFamily": {
                                  "$id": "#/properties/data/properties/skuFamily",
                                  "type": "object",
                                  "properties": {
                                      "skuFamilyId": {
                                          "title": "SKU family dataId.",
                                          "$id": "#/properties/data/properties/skuFamily/properties/skuFamilyId",
                                          "type": "integer"
                                      },
                                      "skuFamilyName": {
                                          "title": "SKU family name.",
                                          "$id": "#/properties/data/properties/skuFamily/properties/skuFamilyName",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLenght": 200
                                      },
                                      "skuCategory": {
                                          "$id": "#/properties/data/properties/skuFamily/properties/skuCategory",
                                          "type": "object",
                                          "properties": {
                                              "skuCategoryId": {
                                                  "title": "SKU category Id.",
                                                  "$id": "#/properties/data/properties/skuFamily/properties/skuCategory/properties/skuCategoryId",
                                                  "type": "integer"
                                              },
                                              "skuCategoryName": {
                                                  "title": "SKU category name.",
                                                  "$id": "#/properties/data/properties/skuFamily/properties/skuCategory/properties/skuCategoryName",
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLenght": 200
                                              }
                                          }
                                      }
                                  }
                              },
                              "skuRecurrency": {
                                  "$id": "#/properties/data/properties/skuRecurrency",
                                  "type": "object",
                                  "properties": {
                                      "skuRecurrencyId": {
                                          "title": "SKU recurrency Id.",
                                          "$id": "#/properties/data/properties/skuRecurrency/properties/skuRecurrencyId",
                                          "type": "integer"
                                      },
                                      "skuRecurrencyName": {
                                          "title": "SKU recurrency name.",
                                          "$id": "#/properties/data/properties/skuRecurrency/properties/skuRecurrencyName",
                                          "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": {
                      "skuPlatform": {
                          "create": true,
                          "update": true,
                          "delete": true,
                          "view": true
                      }
                  }
              },
              "sensiblePropertiesPath": [
                  "name"
              ],
              "effectiveDate": "2023-01-23T22:17:01.664Z",
              "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": "63cf07dff055e538ed17d674",
                "entityType": "skuPlatform",
                "revision": 1,
                "data": {
                    "name": "Administração conta Autotrac",
                    "skuFamily": {
                        "skuFamilyId": 3,
                        "skuFamilyName": "Monitoramento",
                        "skuCategory": {
                            "skuCategoryId": 6,
                            "skuCategoryName": "Gestão de riscos"
                        }
                    },
                    "dataId": 1,
                    "dataIdentifier": {
                        "name": "Administração conta Autotrac"
                    }
                },
                "createdAt": "2023-01-23T22:19:11.347Z",
                "updatedAt": "2023-01-23T22:19:11.347Z",
                "deleted": false,
                "userCreator": "service-account-mdm"
            },
            {
                "_id": "63cf07e0f055e538ed17d676",
                "entityType": "skuPlatform",
                "revision": 1,
                "data": {
                    "name": "Aplicativo mobile",
                    "skuFamily": {
                        "skuFamilyId": 3,
                        "skuFamilyName": "Monitoramento",
                        "skuCategory": {
                            "skuCategoryId": 5,
                            "skuCategoryName": "Gestão logística"
                        }
                    },
                    "dataId": 2,
                    "dataIdentifier": {
                        "name": "Aplicativo mobile"
                    }
                },
                "createdAt": "2023-01-23T22:19:12.214Z",
                "updatedAt": "2023-01-23T22:19:12.214Z",
                "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/skuPlatform/queryByTemplate/all?page=2&limit=2"
    }