{
  "opencollection": "1.0.0",
  "info": {
    "name": "Air Departments API",
    "version": "v2"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Departments",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List departments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/:companyId/departments",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              },
              {
                "name": "externalId",
                "value": "department-external-id",
                "type": "query",
                "description": "External id of the department."
              }
            ]
          },
          "docs": "This endpoint lists departments of a company."
        },
        {
          "info": {
            "name": "Create department",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/:companyId/departments",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "This endpoint creates a department."
        },
        {
          "info": {
            "name": "Get department",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/:companyId/departments/:departmentId",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              },
              {
                "name": "departmentId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for department."
              }
            ]
          },
          "docs": "This endpoint gets a department by ID."
        },
        {
          "info": {
            "name": "Update department",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/:companyId/departments/:departmentId",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              },
              {
                "name": "departmentId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for department."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "This endpoint updates department by ID."
        },
        {
          "info": {
            "name": "Delete department",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/:companyId/departments/:departmentId",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              },
              {
                "name": "departmentId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for department."
              },
              {
                "name": "detachUsers",
                "value": "",
                "type": "query",
                "description": "Whether to remove this entity's reference from associated user entities."
              }
            ]
          },
          "docs": "This endpoint deletes department by ID."
        },
        {
          "info": {
            "name": "List departments",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/:companyId/departments/list",
            "params": [
              {
                "name": "companyId",
                "value": "4974a66b-7493-4f41-908c-58ba81093947",
                "type": "path",
                "description": "Identifier for company."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "This endpoint lists departments of a company."
        }
      ]
    }
  ],
  "bundled": true
}