{
  "opencollection": "1.0.0",
  "info": {
    "name": "Horizon API V1 AccountExternalTruckIdentifier Companies API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Companies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Retrieve a list of Companies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[datagrid]",
                "value": "",
                "type": "query",
                "description": "Search string for datagrid queries"
              }
            ]
          },
          "docs": "Retrieve `Companies` visible to the currently authenticated `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `legal_name`\n * `dba_name`\n * `parent_company:legal_name`\n * `type`\n * `saas_billing_plan`\n * `usage_status`"
        },
        {
          "info": {
            "name": "Create a Company",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.tread-horizon.com/v1/companies",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new `Company`\n\nThis endpoint requires the `create_company` permission"
        },
        {
          "info": {
            "name": "Retrieve a Company by Tread ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/tread_id/:tread-id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "tread-id",
                "value": "",
                "type": "path",
                "description": "Tread ID"
              }
            ]
          },
          "docs": "Retrieve a `Company` by a `Tread ID`. \n\nThis endpoint requires the `connect_companies` `IamPermission`."
        },
        {
          "info": {
            "name": "Typeahead search on Companies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/typeahead",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[query]",
                "value": "",
                "type": "query",
                "description": "Search string for queries"
              }
            ]
          },
          "docs": "Typeahead search against the `legal_name` property for `Companies` visible to the currently authenticated `Company`.\n"
        },
        {
          "info": {
            "name": "Return child Companies that belong to a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/children",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[datagrid]",
                "value": "",
                "type": "query",
                "description": "Search string for datagrid queries"
              }
            ]
          },
          "docs": "Return child `Companies` for a `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `legal_name`\n * `dba_name`\n * `parent_company:legal_name`\n * `type`\n * `saas_billing_plan`\n * `usage_status`"
        },
        {
          "info": {
            "name": "Typeahead search on Children for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/children/typeahead",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[query]",
                "value": "",
                "type": "query",
                "description": "Search string for queries"
              }
            ]
          },
          "docs": "Typeahead search against the `legal_name` property on `Children` for a `Company`."
        },
        {
          "info": {
            "name": "Retrieve connected Companies For a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/connected_companies",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              }
            ]
          },
          "docs": "Retrieve connected `Companies` For a `Company`"
        },
        {
          "info": {
            "name": "Typeahead search on connected Companies for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/connected_companies/typeahead",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[query]",
                "value": "",
                "type": "query",
                "description": "Search string for queries"
              }
            ]
          },
          "docs": "Typeahead search against the `legal_name` property on connected `Companies` for a given `Company`.\n"
        },
        {
          "info": {
            "name": "Retrieve the logo for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/logo",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ]
          },
          "docs": "Retrieve the logo for a `Company`."
        },
        {
          "info": {
            "name": "Update the logo for a Company",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/logo",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Add or replace the `logo` for a `Company`. \n\nThis endpoint requires the `edit_company` `IamPermission`\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `logo` must be the `DirectUpload`'s `signed_id`\n* If you're using a file then you must use the `multipart/form-data` mime-type and `logo` must be a file.\n\nIn both cases the following restrictions apply:\n * `logo` cannot be larger than 100kb.\n * `logo` must be one of the following image types: `png`, `jpeg"
        },
        {
          "info": {
            "name": "Retrieve managed Companies for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              }
            ]
          },
          "docs": "Retrieve managed `Companies` for another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`."
        },
        {
          "info": {
            "name": "Retrieve a single managed Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Managed Company ID"
              }
            ]
          },
          "docs": "Retrieve a managed `Company` by ID."
        },
        {
          "info": {
            "name": "Create a managed Company",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Managed Company ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a managed `Company` for another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`."
        },
        {
          "info": {
            "name": "Delete a managed Company",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Managed Company ID"
              }
            ]
          },
          "docs": "Delete a managed `Company` from another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`."
        },
        {
          "info": {
            "name": "Retrieve connected Companies for a Managed Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies/:managed-company-id/connected_companies",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Managing Company ID"
              },
              {
                "name": "managed-company-id",
                "value": "",
                "type": "path",
                "description": "Managed Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              }
            ]
          },
          "docs": "Retrieve connected `Companies` for a Managed `Company`"
        },
        {
          "info": {
            "name": "Typeahead search connected Companies for a Managed Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/managed_companies/:managed-company-id/connected_companies/typeahead",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Managing Company ID"
              },
              {
                "name": "managed-company-id",
                "value": "",
                "type": "path",
                "description": "Managed Company ID"
              },
              {
                "name": "page[limit]",
                "value": "",
                "type": "query",
                "description": "The maximum number of paginated results to return"
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "The cursor to start paginating after"
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "The cursor to stop paginating at"
              },
              {
                "name": "search[query]",
                "value": "",
                "type": "query",
                "description": "Search string for queries"
              }
            ]
          },
          "docs": "Typeahead search against the `legal_name` property on connected `Companies` for a Managed `Company`."
        },
        {
          "info": {
            "name": "Retrieve a single Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ]
          },
          "docs": "Retrieve a `Company` by ID"
        },
        {
          "info": {
            "name": "Update a Company",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.tread-horizon.com/v1/companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a `Company` by ID\n\nThis endpoint requires the `edit_company` permission"
        },
        {
          "info": {
            "name": "Delete a Company",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.tread-horizon.com/v1/companies/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ]
          },
          "docs": "Delete a `Company` by ID\n\nThis endpoint requires the `delete_company` permission"
        },
        {
          "info": {
            "name": "Create a DirectUpload",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.tread-horizon.com/v1/direct_uploads",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a `DirectUpload`.\n\nThe `checksum` _must_ be calculated exactly the way `rails` expects it ([javascript example](https://github.com/rails/rails/blob/main/activestorage/app/javascript/activestorage/file_checksum.js)).\n\nYou should upload the file to `direct_upload.url` using any provided headers from `direct_upload.headers`.\n\nOnce this is done you can use `signed_id` in place of a file in any endpoint that accepts file uploads."
        }
      ]
    }
  ],
  "bundled": true
}