{
  "opencollection": "1.0.0",
  "info": {
    "name": "Horizon API V1 AccountExternalTruckIdentifier DriverDays API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "DriverDays",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Retrieve DriverDays that belong to a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days",
            "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": "filter[customer_account_ids]",
                "value": "",
                "type": "query",
                "description": "The associated Customer Account IDs"
              },
              {
                "name": "filter[vendor_account_ids]",
                "value": "",
                "type": "query",
                "description": "The associated Vendor Account IDs"
              },
              {
                "name": "filter[driver_ids]",
                "value": "",
                "type": "query",
                "description": "The assigned Driver IDs"
              },
              {
                "name": "filter[start_date]",
                "value": "",
                "type": "query",
                "description": "Start date range"
              },
              {
                "name": "filter[end_date]",
                "value": "",
                "type": "query",
                "description": "End date range"
              },
              {
                "name": "search[datagrid]",
                "value": "",
                "type": "query",
                "description": "Search string for datagrid queries"
              },
              {
                "name": "sort[driver_day_date]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver Day Date `asc` or `desc`"
              },
              {
                "name": "sort[driver][first_name]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver First Name `asc` or `desc`"
              },
              {
                "name": "sort[driver][last_name]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver Last Name `asc` or `desc`"
              },
              {
                "name": "sort[vendor_account][name]",
                "value": "",
                "type": "query",
                "description": "Sort by Vendor Account Name `asc` or `desc`"
              }
            ]
          },
          "docs": "Retrieve `DriverDays` that belong to a `Company` by `ID`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `driver.first_name`\n * `driver.last_name`\n * `vendor_account.name`\n * `equipment_external_ids`"
        },
        {
          "info": {
            "name": "Typeahead search on DriverDays by Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/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 `driver_day_id` property for `DriverDays` visible to the currently authenticated `Company`."
        },
        {
          "info": {
            "name": "Retrieve Payable Invoices for a DriverDay for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/invoices/payables",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              }
            ]
          },
          "docs": "Retrieve `Payable Invoices` for a `DriverDay` for a `Company`"
        },
        {
          "info": {
            "name": "Retrieve Receivable Invoices for a DriverDay for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/invoices/receivables",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              }
            ]
          },
          "docs": "Retrieve `Receivable Invoices` for a `DriverDay` for a `Company`"
        },
        {
          "info": {
            "name": "Retrieve Jobs that belong to a DriverDay for a Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/jobs",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay 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 `Jobs` that belong to a `DriverDay` for a `Company`"
        },
        {
          "info": {
            "name": "Retrieve FileAttachments for all Jobs in a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/jobs/file_attachments",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              },
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay 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 all `FileAttachments` for `Jobs` that belong to a `DriverDay`. This includes file attachments attached to the jobs themselves, as well as attachments on loads and tickets within those jobs."
        },
        {
          "info": {
            "name": "Retrieve all Signatures for a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/signatures",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              },
              {
                "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 all `Signatures` for a `DriverDay`"
        },
        {
          "info": {
            "name": "Create or update the DriverSignature on a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/signatures/driver",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              },
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": []
            }
          },
          "docs": "Create or update the `DriverSignature` on a `DriverDay`."
        },
        {
          "info": {
            "name": "Delete the DriverSignature from a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/signatures/driver",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              },
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ]
          },
          "docs": "Delete the `DriverSignature` from a `DriverDay`."
        },
        {
          "info": {
            "name": "Create or update the DropoffSignature on a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/signatures/dropoff",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              },
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": []
            }
          },
          "docs": "Create or update the `DropoffSignature` on a `DriverDay`."
        },
        {
          "info": {
            "name": "Delete the DropoffSignature from a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.tread-horizon.com/v1/companies/:company-id/driver_days/:driver-day-id/signatures/dropoff",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              },
              {
                "name": "company-id",
                "value": "",
                "type": "path",
                "description": "Company ID"
              }
            ]
          },
          "docs": "Delete the `DropoffSignature` from a `DriverDay`."
        },
        {
          "info": {
            "name": "Retrieve DriverDays visible to the current Company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/driver_days",
            "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": "filter[customer_account_ids]",
                "value": "",
                "type": "query",
                "description": "The associated Customer Account IDs"
              },
              {
                "name": "filter[vendor_account_ids]",
                "value": "",
                "type": "query",
                "description": "The associated Vendor Account IDs"
              },
              {
                "name": "filter[driver_ids]",
                "value": "",
                "type": "query",
                "description": "The assigned Driver IDs"
              },
              {
                "name": "filter[start_date]",
                "value": "",
                "type": "query",
                "description": "Start date range"
              },
              {
                "name": "filter[end_date]",
                "value": "",
                "type": "query",
                "description": "End date range"
              },
              {
                "name": "search[datagrid]",
                "value": "",
                "type": "query",
                "description": "Search string for datagrid queries"
              },
              {
                "name": "sort[driver_day_date]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver Day Date `asc` or `desc`"
              },
              {
                "name": "sort[driver][first_name]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver First Name `asc` or `desc`"
              },
              {
                "name": "sort[driver][last_name]",
                "value": "",
                "type": "query",
                "description": "Sort by Driver Last Name `asc` or `desc`"
              },
              {
                "name": "sort[vendor_account][name]",
                "value": "",
                "type": "query",
                "description": "Sort by Vendor Account Name `asc` or `desc`"
              }
            ]
          },
          "docs": "Retrieve `DriverDays` visible to the current authenticated `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `driver.first_name`\n * `driver.last_name`\n * `vendor_account.name`\n * `equipment_external_ids`"
        },
        {
          "info": {
            "name": "Approve a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/driver_days/:driver-day-id/approve",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay Id"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deprecated in favor of \"Approve a `DriverDay` as a `Company`\"\n\nApprove a `DriverDay` by ID\n\nThis endpoint requires the `approve_driver_day` permission."
        },
        {
          "info": {
            "name": "Retrieve Jobs that belong to a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/driver_days/:driver-day-id/jobs",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay 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 `Jobs` that belong to a `DriverDay`"
        },
        {
          "info": {
            "name": "Unapprove a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/driver_days/:driver-day-id/unapprove",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "driver-day-id",
                "value": "",
                "type": "path",
                "description": "DriverDay Id"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deprecated in favor of \"Unapprove a `DriverDay` as a `Company`\"\n\nUnapprove a `DriverDay` by ID\n\nThis endpoint requires the `approve_driver_day` permission."
        },
        {
          "info": {
            "name": "Retrieve DriverDay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/driver_days/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              }
            ]
          },
          "docs": "Retrieve `DriverDay` by ID"
        },
        {
          "info": {
            "name": "Update a DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.tread-horizon.com/v1/driver_days/:id",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "DriverDay ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a `DriverDay` by ID"
        },
        {
          "info": {
            "name": "Retrieve current User's DriverDay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/users/me/driver_day",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ]
          },
          "docs": "Retrieve current `User`'s `DriverDay`"
        },
        {
          "info": {
            "name": "Update Driver to Break State for Current Driver Day",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/users/me/driver_day/break",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the current authenticated driver to break state for their active `DriverDay`.\nThis endpoint requires the `Driver` role"
        },
        {
          "info": {
            "name": "Mark the current DriverDay as off duty",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/users/me/driver_day/off_duty",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Mark the current `DriverDay` as off duty by calling the `DriverDayService.off_duty!` service method.\nThis endpoint requires the `Driver` role"
        },
        {
          "info": {
            "name": "Start or resume the current DriverDay",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.tread-horizon.com/v1/users/me/driver_day/on_duty",
            "headers": [
              {
                "name": "Accept-Language",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Start or resume the current `DriverDay`.\nThis endpoint requires the `Driver` role"
        },
        {
          "info": {
            "name": "Retrieve current User's Previous DriverDays",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.tread-horizon.com/v1/users/me/driver_days/previous",
            "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": "filter[start_date]",
                "value": "",
                "type": "query",
                "description": "Start date range"
              },
              {
                "name": "filter[end_date]",
                "value": "",
                "type": "query",
                "description": "End date range"
              }
            ]
          },
          "docs": "Retrieve current `User`'s Previous `DriverDays`. It does not include the current `DriverDay` for the current `User`."
        }
      ]
    }
  ],
  "bundled": true
}