{
  "info": {
    "_postman_id": "a53928be-5a35-42fb-aa9b-c932c5bf613c",
    "name": "DimLogic",
    "description": "This is a Postman collection that helps the user understand the DimLogic API offered by Evergrowth Consulting. The user must fill in the variables on the collection variables page, and supply their own password into the field on the Authorization page:\n\n```\n{{vault:applicationSecret}}\n\n ```",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "10198554",
    "_collection_link": "https://go.postman.co/collection/10198554-a53928be-5a35-42fb-aa9b-c932c5bf613c?source=collection_link"
  },
  "item": [
    {
      "name": "Enumerate companies",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/v2.0/companies",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "v2.0",
            "companies"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Enumerate DimLogic metadata",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/$metadata",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "$metadata"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic rulesets",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "method": "GET",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic ruleset singleton",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "method": "GET",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets({{ruleHeaderId}})",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets({{ruleHeaderId}})"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic ruleset singleton lines",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "method": "GET",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets({{ruleHeaderId}})/ruleDetails",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets({{ruleHeaderId}})",
            "ruleDetails"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic deep insert singleton",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n\t\"ruleId\": \"RULETWO\",\r\n\t\"parentControlDimension\": \"AREA\",\r\n\t\"controllingValueCode\": \"60\",\r\n\t\"dimLogicScope\": \"All\",\r\n\t\"ruleDetails\": [\r\n\t\t{\r\n\t\t\t\"dimensionCode\": \"BUSINESSGROUP\",\r\n\t\t\t\"dimensionValue\": \"INDUSTRIAL\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"dimensionCode\": \"CUSTOMERGROUP\",\r\n\t\t\t\"dimensionValue\": \"SMALL\"\r\n\t\t}\r\n\t]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic surface patch only",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "If-Match",
            "value": "*",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\r\n\t\"ruleId\": \"RULETWO\",\r\n\t\"parentControlDimension\": \"AREA\",\r\n\t\"controllingValueCode\": \"60\",\r\n\t\"dimLogicScope\": \"GeneralJournal\",\r\n\t\"ruleDetails\": [\r\n\t\t{\r\n\t\t\t\"dimensionCode\": \"BUSINESSGROUP\",\r\n\t\t\t\"dimensionValue\": \"INDUSTRIAL\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"dimensionCode\": \"CUSTOMERGROUP\",\r\n\t\t\t\"dimensionValue\": \"LARGE\"\r\n\t\t}\r\n\t]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets({{ruleHeaderId}})",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets({{ruleHeaderId}})"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic line patch only",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "If-Match",
            "value": "*",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"dimensionValue\": \"MEDIUM\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets({{ruleHeaderId}})/ruleDetails({{ruleLineId}})",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets({{ruleHeaderId}})",
            "ruleDetails({{ruleLineId}})"
          ]
        }
      },
      "response": []
    },
    {
      "name": "DimLogic deep delete singleton",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "If-Match",
            "value": "*",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/evergrowth/dimlogic/v2.0/companies({{companyId}})/rulesets({{ruleHeaderId}})",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "api",
            "evergrowth",
            "dimlogic",
            "v2.0",
            "companies({{companyId}})",
            "rulesets({{ruleHeaderId}})"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Evaluate request",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"dimensionCode\": \"AREA\",\r\n    \"dimensionValue\": \"70\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/ODataV4/dimlogicActions_Evaluate?company=CRONUS%20Canada%2C%20Inc.",
          "protocol": "https",
          "host": [
            "api",
            "businesscentral",
            "dynamics",
            "com"
          ],
          "path": [
            "v2.0",
            "{{tenantId}}",
            "{{environmentName}}",
            "ODataV4",
            "dimlogicActions_Evaluate"
          ],
          "query": [
            {
              "key": "company",
              "value": "CRONUS%20Canada%2C%20Inc."
            }
          ]
        }
      },
      "response": []
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "clientId",
        "value": "{{clientId}}",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "client_credentials",
        "type": "string"
      },
      {
        "key": "refreshTokenUrl",
        "value": "https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token",
        "type": "string"
      },
      {
        "key": "clientSecret",
        "value": "{{vault:applicationSecret}}",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/authorize",
        "type": "string"
      },
      {
        "key": "refreshRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "tokenRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "authRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "tokenName",
        "value": "Base",
        "type": "string"
      },
      {
        "key": "challengeAlgorithm",
        "value": "S256",
        "type": "string"
      },
      {
        "key": "scope",
        "value": "https://api.businesscentral.dynamics.com/.default",
        "type": "string"
      },
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ]
}