{
  "openapi": "3.1.0",
  "info": {
    "title": "TRAK connector operations for Dynamics 365 Field Service",
    "version": "1.0.0",
    "description": "Outbound operations used by TRAK. The provider hosts these endpoints. Field lists describe the portion used by the connector."
  },
  "servers": [
    {
      "url": "https://{organisation}.crm.dynamics.com/api/data/v9.2",
      "variables": {
        "organisation": {
          "default": "example"
        }
      }
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/msdyn_workorders": {
      "get": {
        "summary": "Read work orders",
        "description": "Row identity: msdyn_workorderid. Display field: msdyn_name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "msdyn_workorderid": {
                            "type": "string"
                          },
                          "msdyn_name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_msdyn_workorders"
      }
    },
    "/accounts": {
      "get": {
        "summary": "Read customers",
        "description": "Row identity: accountid. Display field: name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountid": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_dataverse_accounts"
      }
    },
    "/msdyn_customerassets": {
      "get": {
        "summary": "Read customer assets",
        "description": "Row identity: msdyn_customerassetid. Display field: msdyn_name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "msdyn_customerassetid": {
                            "type": "string"
                          },
                          "msdyn_name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_msdyn_customerassets"
      }
    },
    "/msdyn_workorderservicetasks": {
      "get": {
        "summary": "Read service tasks",
        "description": "Row identity: msdyn_workorderservicetaskid. Display field: msdyn_name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "msdyn_workorderservicetaskid": {
                            "type": "string"
                          },
                          "msdyn_name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_msdyn_workorderservicetasks"
      }
    },
    "/products": {
      "get": {
        "summary": "Read products and services",
        "description": "Row identity: productid. Display field: name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "productid": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_products"
      }
    },
    "/bookableresources": {
      "get": {
        "summary": "Read bookable resources",
        "description": "Row identity: bookableresourceid. Display field: name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bookableresourceid": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_bookableresources"
      }
    },
    "/bookableresourcebookings": {
      "get": {
        "summary": "Read resource bookings",
        "description": "Row identity: bookableresourcebookingid. Display field: name.",
        "parameters": [
          {
            "name": "$top",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            },
            "description": "Sample size. The adapter bounds this to 1–200 rows."
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded sample of records. Check external IDs and the continuation indicator before relying on the sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bookableresourcebookingid": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Provider error or insufficient access to this entity."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_bookableresourcebookings"
      }
    },
    "/WhoAmI": {
      "get": {
        "summary": "Verify the Dataverse application identity",
        "responses": {
          "200": {
            "description": "Verify the Dataverse application identity. The check reads the identity fields.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "UserId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "OrganizationId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The provider could not complete this check."
          },
          "401": {
            "description": "ERP rejected the configured credentials."
          },
          "403": {
            "description": "Application lacks permission to this resource."
          },
          "404": {
            "description": "Resource or licensed module could not be found."
          },
          "429": {
            "description": "Rate limit reached; wait before requesting another sample."
          }
        },
        "operationId": "get_whoami"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {}
  }
}
