{ "openapi": "3.0.3", "x-stoplight": { "id": "75rfxjepk4523" }, "info": { "title": "Horizon API V1", "version": "1.0", "contact": { "name": "Tread", "url": "https://tread.io", "email": "developers@tread.io" }, "description": "This is the Version 1 implementation.\n\nWhen in doubt we default to the practices outlined [here](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#advanced-queries)", "license": { "name": "Private", "url": "https://tread.io" } }, "servers": [ { "description": "production", "url": "https://api.tread-horizon.com" } ], "paths": { "/health": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Health Check", "tags": [ "Reflection" ], "responses": { "200": { "$ref": "#/components/responses/HealthCheck" }, "406": { "$ref": "#/components/responses/Error" }, "503": { "$ref": "#/components/responses/HealthCheck" } }, "operationId": "get-health", "x-internal": true, "description": "`/health` is used by load balancers in AWS as well as in our Docker image.", "security": [] } }, "/v1/accounts": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new Account", "operationId": "post-v1-accounts", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "85gw0eby5khks" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Create" } } } }, "description": "Create a new `Account`\n\nThis endpoint requires the `create_account` permission", "tags": [ "Accounts" ] }, "get": { "summary": "Retrieve all Accounts visible to the current Company", "operationId": "get-v1-accounts", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "nrsnmuc7twn2k" }, "type": "array", "items": { "$ref": "#/components/schemas/Account-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "vw1abhy4q38wk" }, "tags": [ "Accounts" ], "description": "Retrieve `Accounts` visible to the currently authenticated `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `name`\n\nFilter usage:\n * to filter a single state: `filter[account_types][]=customer`\n * to filter multiple states: `filter[account_types][]=customer&filter[account_types][]=vendor`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-account_types" }, { "$ref": "#/components/parameters/filter-material_rates" }, { "$ref": "#/components/parameters/filter-discarded" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-connected_company-company_types" }, { "$ref": "#/components/parameters/filter-auto_add_ons" }, { "$ref": "#/components/parameters/filter-label_ids" } ] } }, "/v1/accounts/bulk_update": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Bulk update Accounts", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "043ctqwh4vocf" }, "items": { "$ref": "#/components/schemas/Account-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-accounts-bulk_update", "x-stoplight": { "id": "9sf3s62gim4pp" }, "description": "Perform select bulk updates to `Accounts`.\n\nRequires the `edit_account` permission.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "czk9oddnxv50n" }, "items": { "$ref": "#/components/schemas/Account-Update-Bulk" } } } } } } } } }, "/v1/accounts/connected": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a connected Account", "tags": [ "Accounts" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-accounts-connected", "x-stoplight": { "id": "ee581r2nsvq13" }, "description": "Create a connected `Account` between two `Companies`. \n\nThis endpoint creates two complimentary connected `Accounts`:\n * a \"sender\" `Account` owned by the `Company` specified by `sender_company_id` which has the provided `sender_account_types`\n * a \"receiver\" `Account` owned by the `Company` specified by `receiver_company_id` which has the opposite `account_types`\n \nThe newly created \"sender\" `Account` is returned.\n\nThis endpoint requires the `platform_admin` `IamRole`. ", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Connected-Platform-Admin-Create" } } } } }, "get": { "summary": "Retrieve all connected Accounts visible to the current Company", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "soszlt7ej40ta" }, "items": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-accounts-connected", "x-stoplight": { "id": "19p2w6pnte1t2" }, "description": "Retrieve all connected `Accounts` visible to the currently authenticated `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/accounts/invite": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Invite a Company to connect through an Account", "operationId": "post-v1-accounts-invite", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "o9p7fcv3vchcq" }, "description": "Invite a `Company` which is not yet on the `Tread` platform to connect through an `Account`.\n\nThis will create:\n * a new `Company` named `name` using `contact` data for `primary_contact ` and `billing_contact` \n * a new `User` with information from `contact` that has the `Company Admin` `IamRole`\n * a new `Account` owned by the currently authenticated `User`'s `Company` and connected to the newly created `Company`\n\nNote that all fields in `contact` are required.\n\nThe following unique constraints must be met or a `422` will be returned:\n * `name` must be globally unique to `Companies` \n * `contact.email` and `contact.phone` must be globally unique to `Users`\n\nIf successful the newly created `Account` will be returned.\n \nThis endpoint requires the `create_account` `IamPermission`\n \n", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Invite" } } } }, "tags": [ "Accounts" ] } }, "/v1/accounts/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Accounts", "tags": [ "Typeaheads", "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "wvfdabnd4w4ar" }, "items": { "$ref": "#/components/schemas/Account-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-accounts-typeahead", "x-stoplight": { "id": "249lre4wlspeo" }, "description": "Typeahead search against the `name` property for `Accounts` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-account_types" }, { "$ref": "#/components/parameters/filter-connected" }, { "$ref": "#/components/parameters/filter-date" } ] } }, "/v1/accounts/{account-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignments for an Account", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-accounts-account-id-auto_add_on_assignments", "x-stoplight": { "id": "nv3sjczmet07b" }, "description": "Create `AutoAddOnAssignment` for an `Account`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } }, "tags": [ "AutoAddOnAssignments" ] }, "get": { "summary": "Get AutoAddOnAssignments for an Account", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": " Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-accounts-account-id-auto_add_on_assignments", "x-stoplight": { "id": "757f5cafedvsz" }, "description": "Get `AutoAddOnAssignments` for an `Account`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ], "x-internal": true, "tags": [ "AutoAddOnAssignments" ] } }, "/v1/accounts/{account-id}/auto_add_ons": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve AutoAddOns for an Account", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "vyjucvtfbwnvl" }, "items": { "$ref": "#/components/schemas/AddOn-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-accounts-account-id-auto_add_ons", "x-stoplight": { "id": "1qza5utua6bdk" }, "description": "Retrieve `AutoAddOns` for an `Account`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ], "x-internal": true, "deprecated": true } }, "/v1/accounts/{account-id}/auto_add_ons/{auto-add-on-id}/customer_add_on": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" }, { "schema": { "type": "string" }, "name": "auto-add-on-id", "in": "path", "required": true, "description": "AddOn ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete AutoAddOn for a Customer Account", "tags": [ "AddOns" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-accounts-account-id-auto_add_ons-id-customer_add_on", "x-stoplight": { "id": "ajwamzzkzdgtk" }, "description": "Delete `AutoAddOn` for a `Customer Account`", "x-internal": true } }, "/v1/accounts/{account-id}/auto_add_ons/{auto-add-on-id}/vendor_add_on": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "auto-add-on-id", "in": "path", "required": true, "description": "AddOn ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "delete": { "summary": "Delete AutoAddOn for a Vendor Account", "tags": [ "AddOns" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-accounts-account-id-auto_add_ons-id-vendor_add_on", "x-stoplight": { "id": "wauvt42ki31sr" }, "x-internal": true, "description": "Delete `AutoAddOn` for a `Vendor Account`" } }, "/v1/accounts/{account-id}/scheduled_time_offs": { "parameters": [ { "schema": { "type": "string" }, "name": "account-id", "in": "path", "required": true, "description": "Account Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create Scheduled Time Off", "tags": [ "Accounts" ], "responses": { "201": { "description": "Create Schedule Time off", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Scheduled-Time-Off-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-accounts-id-scheduled_time_offs", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Scheduled-Time-Off-Create" } } } }, "description": "Create a Scheduled Time Off for an `Account`", "x-stoplight": { "id": "1olm57uqimcn6" } }, "get": { "summary": "Retrieve Scheduled Time Offs for an Account", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Scheduled-Time-Off-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-accounts-account-id-scheduled-time-offs", "description": "Retrieve all active `ScheduledTimeOffs` visible to your `Company` for an `Account`", "tags": [ "Accounts" ], "x-stoplight": { "id": "jgfv1mbmm1pbz" } } }, "/v1/accounts/{account-id}/scheduled_time_offs/available": { "parameters": [ { "schema": { "type": "string" }, "name": "account-id", "in": "path", "required": true, "description": "Account Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Mark Schedule Available", "tags": [ "Accounts" ], "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-accounts-account-id-scheduled_time_offs-available", "description": "Mark current `Account` as available and disable any `Scheduled Time Off`", "x-stoplight": { "id": "j5d2axo7kl23u" } } }, "/v1/accounts/{account-id}/scheduled_time_offs/unavailable": { "parameters": [ { "schema": { "type": "string" }, "name": "account-id", "in": "path", "required": true, "description": "Account Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Mark Schedule Unavailable", "tags": [ "Accounts" ], "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-accounts-account-id-scheduled_time_offs-unavailable", "description": "Mark current `Account` as unavailable and create a new `Scheduled time off`", "x-stoplight": { "id": "vyxq886egaykj" } } }, "/v1/accounts/{account-id}/scheduled_time_offs/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Scheduled time off id" }, { "schema": { "type": "string" }, "name": "account-id", "in": "path", "required": true, "description": "Account Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete a Scheduled Time Off", "tags": [ "Accounts" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-accounts-account-id-scheduled_time_offs-id", "description": "Delete Scheduled Time Off for an `Account`", "x-stoplight": { "id": "d6xald6a3166r" } } }, "/v1/accounts/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Account ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Account", "operationId": "get-v1-accounts-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "z83cux1tsowcw" }, "description": "Retrieve `Account` by ID", "tags": [ "Accounts" ] }, "patch": { "summary": "Update an Account", "operationId": "patch-v1-accounts-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "zsfr920ta0thd" }, "description": "Update an `Account` by ID.\n\nThis endpoint requires the `edit_account` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Update" } } } }, "tags": [ "Accounts" ] }, "delete": { "summary": "Delete an Account", "operationId": "delete-v1-accounts-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "xrjr1vnm5auyn" }, "tags": [ "Accounts" ], "description": "Delete an `Account` by ID\n\nThis endpoint requires the `delete_account` permission" } }, "/v1/add_on_charges/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "AddOnCharge ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single AddOnCharge", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-add-on-charges-id", "x-stoplight": { "id": "ba6h588czevfo" }, "description": "Retrieve a single `AddOnCharge` by ID", "x-internal": true }, "patch": { "summary": "Update an AddOnCharge", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-add-on-charges-id", "x-stoplight": { "id": "5euad7wqjmg3i" }, "description": "Update an `AddOnCharge`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Update" } } } } }, "delete": { "summary": "Delete an AddOnCharge", "tags": [ "AddOnCharges" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-add-on-charges-id", "x-stoplight": { "id": "9xrptlgrnufur" }, "x-internal": true, "description": "Delete an `AddOnCharge`" } }, "/v1/add_ons": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOn", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-add_ons", "x-stoplight": { "id": "1936ko4biwm2y" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOn-Create" } } } }, "description": "Create an `AddOn`", "tags": [ "AddOns" ] }, "get": { "summary": "Retrieve AddOns visible to the current Company", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "var9pbjickujx" }, "type": "array", "items": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-add_ons", "x-stoplight": { "id": "b40oql5ljsouo" }, "description": "Retrieve `AddOns` visible to the current authenticated `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/add_ons/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "AddOn ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single AddOn", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-add_ons-id", "x-stoplight": { "id": "qk790biaszx9h" }, "description": "Retrieve `AddOn` by ID" }, "patch": { "summary": "Update an AddOn", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-add_ons-id", "x-stoplight": { "id": "n12ul7z8p1eb0" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOn-Update" } } } }, "description": "Update an `AddOn` by ID." } }, "/v1/agave/customers/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Agave-Customer ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update an Agave-Customer", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-Customer-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-agave-customers-id", "x-stoplight": { "id": "3ihitjkp62vnk" }, "x-internal": true, "description": "Update an `Agave-Customer`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Agave-Customer-Update" } } } } } }, "/v1/agave/items/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Agave-Item ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update an Agave-Item", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-Item-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-agave-items-id", "x-stoplight": { "id": "cs1oyxjyxh309" }, "x-internal": true, "description": "Update an `Agave-Item`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Agave-Item-Update" } } } } } }, "/v1/agave/ledger_accounts/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Agave-LedgerAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update an Agave-LedgerAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-LedgerAccount-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-agave-ledger_accounts-id", "x-stoplight": { "id": "pyo2sexut4m9u" }, "description": "Update an `Agave-LedgerAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Agave-LedgerAccount-Update" } } } } } }, "/v1/agave/link_tokens": { "parameters": [ { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Create an AgaveLinkToken for the current Company", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-LinkToken-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-agave-link_tokens", "x-stoplight": { "id": "nben505xkur8w" }, "description": "Create an `AgaveLinkToken` for the current `Company`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-internal": true, "tags": [ "Agave" ] } }, "/v1/agave/linked_accounts": { "parameters": [ { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Create an Agave-LinkedAccount for the current Company", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-LinkedAccount-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-agave-linked_accounts", "x-stoplight": { "id": "2aitl2glgzcca" }, "x-internal": true, "description": "Create an `Agave-LinkedAccount` for the current `Company`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Agave-LinkedAccount-Create" } } } }, "tags": [ "Agave" ] }, "get": { "summary": "Retrieve Agave-LinkedAccounts for the current Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Agave-LinkedAccount-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts", "x-stoplight": { "id": "4qofrkjh7tphr" }, "x-internal": true, "description": "Retrieve `Agave-LinkedAccounts` for the current `Company`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "tags": [ "Agave" ] } }, "/v1/agave/linked_accounts/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete an Agave-LinkedAccount", "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-users-me-agave-linked_accounts-id", "x-stoplight": { "id": "kvqbmo1sx8fr9" }, "x-internal": true, "description": "Delete an `Agave-LinkedAccount` by id.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Agave" ] } }, "/v1/agave/linked_accounts/{linked-account-id}/customers": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Agave-Customers for an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "3g6sa38l1xv3v" }, "items": { "$ref": "#/components/schemas/Agave-Customer-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-customers", "x-stoplight": { "id": "qzt0nu0bahjzy" }, "x-internal": true, "description": "Retrieve `Agave-Customers` for an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/customers/accounts/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Typeahead search on customer Accounts scoped to an Agave-LinkedAccount", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "1h86is9cxx3ug" }, "items": { "$ref": "#/components/schemas/Account-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-linked_accounts-linked-account-id-customers-accounts-typeahead", "x-stoplight": { "id": "njqxhggv410ww" }, "x-internal": true, "description": "`Typeahead` search on customer `Accounts` scoped to an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/import": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Enqueue data import from an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-agave-linked_accounts-linked-account-id-import", "x-stoplight": { "id": "6q3gmr9rcq6tm" }, "description": "Enqueue data import for an `Agave-LinkedAccount`\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "x-internal": true } }, "/v1/agave/linked_accounts/{linked-account-id}/items": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Agave-Items for an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ado28g222z4y2" }, "items": { "$ref": "#/components/schemas/Agave-Item-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-items", "x-stoplight": { "id": "6j68llrei5xng" }, "x-internal": true, "description": "Retrieve `Agave-Items` for an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/items/add_ons/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on AddOns scoped to an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "7mqdfzg1yho0o" }, "items": { "$ref": "#/components/schemas/AddOn-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-items-add_ons-typeahead", "x-stoplight": { "id": "hswcyuoepyzhy" }, "x-internal": true, "description": "`Typeahead` search on `AddOns` scoped to an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/items/services/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Services scoped to an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "pdwkegjy8huoz" }, "items": { "$ref": "#/components/schemas/Service-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-items-services-typeahead", "x-stoplight": { "id": "i05exkukrj5wr" }, "x-internal": true, "description": "`Typeahead` search on `Services` scoped to an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/ledger_accounts": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Agave-LedgerAccounts for an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "qhhrmwo9w76k6" }, "items": { "$ref": "#/components/schemas/Agave-LedgerAccount-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-ledger_accounts", "x-stoplight": { "id": "z5s2r0guuzarg" }, "x-internal": true, "description": "Retrieve `Agave-LedgerAccounts` for an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/vendors": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Agave-Vendors for an Agave-LinkedAccount", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Agave-Vendor-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-agave-linked_accounts-linked-account-id-vendors", "x-stoplight": { "id": "p38hj91oqbq5i" }, "x-internal": true, "description": "Retrieve `Agave-Vendors` for an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/agave/linked_accounts/{linked-account-id}/vendors/accounts/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "linked-account-id", "in": "path", "required": true, "description": "Agave-LinkedAccount ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on vendor Accounts scoped to an Agave-LinkedAccount", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "jg82x33oj649k" }, "items": { "$ref": "#/components/schemas/Account-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-linked_accounts-linked-account-id-vendors-accounts-typeahead", "x-stoplight": { "id": "wzm19zmjd4piz" }, "x-internal": true, "description": "`Typeahead` search on vendor `Accounts` scoped to an `Agave-LinkedAccount`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/agave/vendors/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Agave-Vendor ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update an Agave-Vendor", "tags": [ "Agave" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Agave-Vendor-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-agave-vendors-id", "x-stoplight": { "id": "1n1tnm0y782x6" }, "description": "Update an `Agave-Vendor`.\n\nThis endpoint requires the `manage_accounting_integration` `IamPermission`.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Agave-Vendor-Update" } } } } } }, "/v1/auth/forgot_password": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Forgot Password", "operationId": "post-v1-auth-forgot_password", "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "This endpoint accepts an `email` of the `User` which will be sent a reset password link from Stytch.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthForgotPassword-Create" } } } }, "tags": [ "Authentication" ], "security": [] } }, "/v1/auth/login": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Generate an auth token", "operationId": "post-v1-auth-login", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "This endpoint takes an `email` and `password`, and if a `User` exists with the given data it returns a `session_jwt` for usage with the API. This `session_jwt` should be added to the headers of further requests like so:\n```\nAuthorization: Bearer \n```", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthLogin-Create" }, "examples": { "Example 1": { "value": { "email": "pbailey@phauling.com", "password": "whatsupdoc" } } } } }, "description": "" }, "security": [], "tags": [ "Authentication" ] }, "delete": { "summary": "Delete an auth token", "operationId": "delete-v1-auth-login", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "This endpoints revokes the `session_jwt` passed in the Authorization header.", "tags": [ "Authentication" ] } }, "/v1/auth/magic_link": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Send a magic link email", "tags": [ "Authentication" ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-auth-magic_link", "x-stoplight": { "id": "9vhwhfp6n78q1" }, "description": "Send a magic link email", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLink-Create" } } } } } }, "/v1/auth/magic_link/login": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Login with a magic link token", "tags": [ "Authentication" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-auth-magic_link-login", "x-stoplight": { "id": "jv9hmnncx8qj8" }, "description": "Login with a magic link token.", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLink-Login" } } } } } }, "/v1/auth/otp_sms": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Send a one-time password via SMS", "tags": [ "Authentication" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/OtpSms-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-auth-otp_sms", "x-stoplight": { "id": "2i8o3qa1lk1ok" }, "description": "Send a one-time password via SMS.", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OtpSms-Create" } } } } } }, "/v1/auth/otp_sms/login": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Login with a one-time password received via SMS", "tags": [ "Authentication" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-auth-otp_sms-login", "x-stoplight": { "id": "vr5j5o6w70ww4" }, "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OtpSms-Login" } } } }, "description": "Login with a one-time password received via SMS." } }, "/v1/auth/reset_password": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Reset Password", "operationId": "post-v1-auth-reset_password", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResetPassword-Create" } } }, "description": "" }, "description": "This endpoint accepts a `password_reset_token`, which comes from the reset password link from Stytch, and also accepts a `password` which will be set as the new password. This endpoint returns a valid `session_jwt` for the `User`.", "tags": [ "Authentication" ], "security": [] } }, "/v1/auth/signup": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "User sign up", "operationId": "post-v1-auth-signup", "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "This endpoint takes a `password` and a `magic_links_token` from the invite email in order to successfully register the `User` in Stytch. This endpoint returns a valid `session_jwt` for the `User`.", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthSignup-Create" } } } }, "tags": [ "Authentication" ] } }, "/v1/auth/sso/login": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Login with a sso token", "tags": [ "Authentication" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "post-v1-auth-sso-login", "x-stoplight": { "id": "9vjhmnncx8qj8" }, "description": "Login with a sso token.", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SSO-Login" } } } } } }, "/v1/auth_methods": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Retrieve a list of AuthMethods for a given email", "tags": [ "Authentication" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AuthMethod-List" } } } } } }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-auth_methods", "x-stoplight": { "id": "pkw0lw5wbamay" }, "description": "Retrive a list of `AuthMethods` for a given `email`", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthMethod-Query" } } } } } }, "/v1/auto_add_on_assignments/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "AutoAddOnAssignment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update AutoAddOnAssignment", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-auto_add_on_assignments-id", "x-stoplight": { "id": "ow454f0kwjhfi" }, "description": "Update `AutoAddOnAssignment` by ID", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Update" } } } }, "tags": [ "AutoAddOnAssignments" ] }, "delete": { "summary": "Delete AutoAddOnAssignment", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-auto_add_on_assignments-id", "x-stoplight": { "id": "3r8r9o1v6eko9" }, "description": "Delete `AutoAddOnAssignment` by ID", "x-internal": true, "tags": [ "AutoAddOnAssignments" ] } }, "/v1/bulk_downloads": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Bulk download FileAttachments", "tags": [ "FileAttachments" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/BulkDownload-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-bulk_downloads", "x-stoplight": { "id": "qxegczlt0vjwh" }, "x-internal": true, "description": "This endpoint starts a bulk download of `FileAttachments`. \n\nThe `job_ids` and `filter[jobs]` params are mutually exclusive and at least one of these is required.\n\nOn success the caller should subscribe to the `BulkDownloadResult` `RTU` using the `id` in the response.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkDownload-Create" } } } } } }, "/v1/companies": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Company", "operationId": "post-v1-companies", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Company-Read", "x-stoplight": { "id": "7pg328jm7m9et" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create a new `Company`\n\nThis endpoint requires the `create_company` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Company-Create" } } } }, "tags": [ "Companies" ] }, "get": { "summary": "Retrieve a list of Companies", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "1ukjgv4iiql1q" }, "type": "array", "items": { "$ref": "#/components/schemas/Company-Read", "x-stoplight": { "id": "znts3ikkdf7sj" } } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies", "description": "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`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/tread_id/{tread-id}": { "parameters": [ { "schema": { "type": "string", "pattern": "^[0-9A-F]{6}$", "minLength": 6, "maxLength": 6, "example": "ABC123" }, "name": "tread-id", "in": "path", "required": true, "description": "Tread ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Company by Tread ID", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Company-Read-Typeahead" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-tread_id-tread-id", "x-stoplight": { "id": "u2m9q5u0bdimj" }, "x-internal": true, "description": "Retrieve a `Company` by a `Tread ID`. \n\nThis endpoint requires the `connect_companies` `IamPermission`." } }, "/v1/companies/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Companies", "tags": [ "Typeaheads", "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Company-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-typeahead", "description": "Typeahead search against the `legal_name` property for `Companies` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "qkqja5m9f9ixa" } } }, "/v1/companies/{company-id}/account_external_truck_identifiers": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve AccountExternalTruckIdentifiers that belong to a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Account-External-Truck-Identifier-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-account-external-truck-identifiers", "description": "Retrieve `AccountExternalTruckIdentifier` for a `Company`.\n\nFilter usage:\n * to filter by account id: `filter[account_id]=account_id`\n * to filter for records missing a company share: `filter[missing_company_share]=true`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-missing_company_share" } ], "x-internal": false, "x-stoplight": { "id": "cd3p73h6za9cz" }, "tags": [ "AccountExternalTruckIdentifier" ] } }, "/v1/companies/{company-id}/account_external_truck_identifiers/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "AccountExternalTruckIdentifier ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Retrieve a single AccountExternalTruckIdentifier", "operationId": "get-v1-companies-account_external_truck_identifiers-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-External-Truck-Identifier-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Retrieve `AccountExternalTruckIdentifier` by ID", "parameters": [], "x-stoplight": { "id": "u2lza0rlc546i" }, "tags": [ "AccountExternalTruckIdentifier" ] }, "patch": { "summary": "Update a AccountExternalTruckIdentifier", "operationId": "patch-v1-companies-account_external_truck_identifiers-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-External-Truck-Identifier-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update a `AccountExternalTruckIdentifier` by ID\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-External-Truck-Identifier-Update" } } }, "description": "" }, "x-stoplight": { "id": "07eq0gu50cjh2" }, "tags": [ "AccountExternalTruckIdentifier" ] }, "delete": { "summary": "Delete a AccountExternalTruckIdentifier", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-account_external_truck_identifiers-id", "description": "Delete a `AccountExternalTruckIdentifier` by ID\n", "x-stoplight": { "id": "bp6myefy5f95q" }, "tags": [ "AccountExternalTruckIdentifier" ] } }, "/v1/companies/{company-id}/accounts": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Accounts that belong to a Company", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "qrkdu1jkmgt50" }, "items": { "$ref": "#/components/schemas/Account-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-accounts", "x-stoplight": { "id": "dn0zfz8ziwm6x" }, "description": "Retrieve `Accounts` for a `Company`.\n\nFilter usage:\n * to filter a single state: `filter[account_types][]=customer`\n * to filter multiple states: `filter[account_types][]=customer&filter[account_types][]=vendor`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_types" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-material_rates" }, { "$ref": "#/components/parameters/filter-discarded" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-connected_company-company_types" }, { "$ref": "#/components/parameters/filter-auto_add_ons" } ], "x-internal": false } }, "/v1/companies/{company-id}/accounts/capacity/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Accounts for a Company with with Capacity Data", "tags": [ "Typeaheads", "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Account-Read-Capacity-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-accounts-capacity-typeahead", "description": "Typeahead search against the `name` property on `Accounts` for a `Company`.\n\nUnlike the standard typeahead, this endpoint includes additional fields with capacity data.\n\nAdditionally, this endpoint automatically filters to:\n\n- Connnected Accoubts\n- Vendor-type Accounts\n- Accounts that are currently scheduled on\n\nThe `availability` filter can be set to true/false to only include Accounts that are scheduled on or off for the `date` specified. If no `date` is specified then the current day is used.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-availability" }, { "$ref": "#/components/parameters/filter-show_all" }, { "$ref": "#/components/parameters/filter-label_ids" }, { "schema": { "type": "string" }, "in": "query", "name": "date", "description": "The date to query for regarding capacity. In YYYY-MM-DD format.", "required": true } ], "x-stoplight": { "id": "ki83zc9q4cndp" } } }, "/v1/companies/{company-id}/accounts/connected": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a connected Account", "tags": [ "Accounts" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-accounts-connected", "x-stoplight": { "id": "et13o92j8q1dx" }, "description": "Create a connected `Account` between two `Companies` by use of a `tread_id`.\n\nThis endpoint creates two complimentary connected `Accounts`:\n * a \"sender\" `Account` owned by the `Company` specified in the `company-id` path param which has the provided `account_types`.\n * a \"receiver\" `Account` owned by the `Company` specified in the `tread_id` which has the opposite `account_types`\n \nThe newly created \"sender\" `Account` is returned.\n\nThis endpoint must be called by a principal authorized to act on behalf of the \"sender\" `Company`.\n\nThis endpoint requires the `connect_companies` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Connected-Customer-Create" } } } }, "x-internal": true }, "get": { "summary": "Retrieve connected Accounts that belong to a Company", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "tm4j0ddqabdz8" }, "items": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-accounts-connected", "x-stoplight": { "id": "pcg42w16g8q9d" }, "description": "Retrieve connected `Accounts` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-account_types" }, { "$ref": "#/components/parameters/filter-discarded" } ] } }, "/v1/companies/{company-id}/accounts/invite": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Invite a Company to connect through an Account for a Company", "tags": [ "Accounts" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-accounts-invite", "x-stoplight": { "id": "v3m14cav2nznz" }, "description": "Invite a `Company` which is not yet on the `Tread` platform to connect through an `Account` for a `Company`.\n\nThis will create:\n * a new `Company` named `name` using `contact` data for `primary_contact ` and `billing_contact` \n * a new `User` with information from `contact` that has the `Company Admin` `IamRole`\n * a new `Account` owned by the currently authenticated `User`'s `Company` and connected to the newly created `Company`\n\nNote that all fields in `contact` are required.\n\nThe following unique constraints must be met or a `422` will be returned:\n * `name` must be globally unique to `Companies` \n * `contact.email` and `contact.phone` must be globally unique to `Users`\n\nIf successful the newly created `Account` will be returned.\n \nThis endpoint requires the `create_account` `IamPermission`\n \n", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Account-Invite" } } } } } }, "/v1/companies/{company-id}/accounts/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Accounts for a Company", "tags": [ "Typeaheads", "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "rao3u2ilhbt61" }, "items": { "$ref": "#/components/schemas/Account-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-accounts-typeahead", "x-stoplight": { "id": "0wetlqfv1ru46" }, "description": "Typeahead search against the `name` property on `Accounts` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-account_types" }, { "$ref": "#/components/parameters/filter-connected" }, { "$ref": "#/components/parameters/filter-date" } ], "x-internal": true } }, "/v1/companies/{company-id}/accounts/{account-id}/compliance_documents": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" } ], "post": { "summary": "Create Compliance Document for Account", "operationId": "post-account-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Create" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create Compliance Document for Account" }, "get": { "summary": "List Compliance Documents for Account", "operationId": "get-account-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ComplianceDocument-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "List Compliance Documents for Account" } }, "/v1/companies/{company-id}/accounts/{account-id}/compliance_documents/checklist": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" } ], "get": { "summary": "Get Compliance Checklist for Account", "operationId": "get-account-compliance-checklist", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "compliance_document_type": { "$ref": "#/components/schemas/ComplianceDocumentType-Read-Nested" }, "compliance_document": { "nullable": true, "allOf": [ { "$ref": "#/components/schemas/ComplianceDocument-Read-Nested" } ] } } } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Get Compliance Checklist for Account" } }, "/v1/companies/{company-id}/accounts/{account-id}/compliance_documents/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "account-id", "in": "path", "required": true, "description": "Account ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "ID" } ], "get": { "summary": "Show Compliance Document", "operationId": "get-account-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Show Compliance Document" }, "patch": { "summary": "Update Compliance Document", "operationId": "patch-account-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Update" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update Compliance Document" }, "delete": { "summary": "Delete Compliance Document", "operationId": "delete-account-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Delete Compliance Document" } }, "/v1/companies/{company-id}/add_ons": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOn for a Company", "tags": [ "AddOns" ], "operationId": "post-v1-companies-company-id-add_ons", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOn-Create" } } } }, "description": "Create an `AddOn` for a `Company`" }, "get": { "summary": "Retrieve AddOns that belong to a Company", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "a6yke4sq5mcv1" }, "items": { "$ref": "#/components/schemas/AddOn-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-add_ons", "x-stoplight": { "id": "gfirj6p5mz0qj" }, "description": "Retrieve `AddOns` that belong to a `Company`." } }, "/v1/companies/{company-id}/add_ons/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on AddOns for a Company", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "hi3wjxsu1x60b" }, "items": { "$ref": "#/components/schemas/AddOn-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-add_ons-typeahead", "x-stoplight": { "id": "4bo2hvhmh5lg8" }, "x-internal": true, "description": "Typeahead search against the `name` property on `AddOn` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-add_on_types" }, { "$ref": "#/components/parameters/filter-add_on_rate_types" } ] } }, "/v1/companies/{company-id}/add_ons/{id}/fuel_surcharge_rate": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "AddOn ID" } ], "get": { "summary": "Retrieve fuel surcharge rate for an AddOn", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnFuelSurchargeRate-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-add_ons-id-fuel_surcharge_rate", "description": "Retrieve fuel surcharge rate for a FuelSurcharge type AddOn for a given date. The AddOn must have `add_on_rate_type` of `FuelSurcharge` and have an associated `fuel_surcharge_schedule`.", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "schema": { "type": "string", "format": "date" }, "name": "filter[date]", "in": "query", "required": false, "description": "Date to fetch the fuel surcharge rate for. Defaults to current date if not provided." } ] } }, "/v1/companies/{company-id}/children": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Return child Companies that belong to a Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "qh7o3ai9runxr" }, "type": "array", "items": { "$ref": "#/components/schemas/Company-Read-Nested" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-id-children", "x-stoplight": { "id": "l2m3v9uf24jvn" }, "description": "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`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/{company-id}/children/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Children for a Company", "tags": [ "Typeaheads", "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Company-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-accounts-typeahead", "description": "Typeahead search against the `legal_name` property on `Children` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "0cc8k3gzl6bwu" }, "x-internal": true } }, "/v1/companies/{company-id}/company_day_job_stats/{date}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "date" }, "name": "date", "in": "path", "required": true, "description": "Date to query on" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyDayJobStat", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/CompanyDayJobStat-Read" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-company-day-job-stats-date", "description": "Retrieve `CompanyDayJobStat` for a `Company` on a given `Date`\n", "x-internal": false, "x-stoplight": { "id": "p36fjxe8umzsk" }, "tags": [ "CompanyDayJobStats" ] } }, "/v1/companies/{company-id}/company_shares": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Create a Company Share", "tags": [ "CompanyShares" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company_id-company_shares", "x-stoplight": { "id": "ln40xlp4cvnqn" }, "description": "Create a `CompanyShare`.\n\nThis endpoint requires the `create_companyshare` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyShare-Create" } } } } }, "get": { "summary": "Retrieve CompanyShares for a Company", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "nnk7jufdx6fdn" }, "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company_id-company_shares", "x-stoplight": { "id": "eswe030sesr9r" }, "description": "Retrieve `CompanyShares` for a `Company`.\n\nNote that the `sender_company_id` and `receiver_company_id` filters are mutually exclusive with `between_company_id`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[sender_company_id]", "description": "Sender Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[receiver_company_id]", "description": "Receiver Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[between_company_id]", "description": "Between Company ID" }, { "schema": { "$ref": "#/components/schemas/CompanyShareableType" }, "in": "query", "name": "filter[company_shareable_type]", "description": "Company Shareable Type" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[company_shareable_id]", "description": "Company Shareable ID" } ] } }, "/v1/companies/{company-id}/company_shares/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "CompanyShare ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update a CompanyShare as a Company", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-company_shares-id", "x-stoplight": { "id": "hqzrj1jlna4ni" }, "description": "Update a `CompanyShare` as a `Company`.\n\nThis endpoint requires the `edit_company_share` permission.\n\nNote that `external_id` can only be updated by the receiver `Company`.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyShare-Update" } } } } }, "delete": { "summary": "Delete a CompanyShare as a Company", "tags": [ "CompanyShares" ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-company_shares-id", "x-stoplight": { "id": "f9q9dkod6kvbu" }, "description": "Delete a `CompanyShare` as a `Company`.\n\nThis endpoint requires the `delete_companyshare` permission." } }, "/v1/companies/{company-id}/compliance_check": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" } ], "get": { "summary": "Check Compliance Status", "tags": [ "Compliance" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceCheck-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-compliance-check", "x-stoplight": { "id": "cc1pathget0001" }, "description": "Check compliance status for a job assignment.\n\nRequires `compliance_read` permission.", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "schema": { "type": "string", "format": "uuid" }, "name": "account_id", "in": "query", "description": "Account ID to check vendor compliance" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user_id", "in": "query", "description": "User ID to check driver compliance" }, { "schema": { "type": "string", "format": "uuid" }, "name": "equipment_id", "in": "query", "description": "Equipment ID to check equipment compliance" } ] } }, "/v1/companies/{company-id}/compliance_document_types": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Compliance Document Type", "tags": [ "Compliance" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocumentType-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-compliance-document-types", "x-stoplight": { "id": "cdt1pathpost01" }, "description": "Create a new compliance document type.\n\nRequires `compliance_write` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocumentType-Create" } } } } }, "get": { "summary": "Retrieve Compliance Document Types", "tags": [ "Compliance" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "cdt1idxarr0001" }, "items": { "$ref": "#/components/schemas/ComplianceDocumentType-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-compliance-document-types", "x-stoplight": { "id": "cdt1pathget001" }, "description": "Retrieve compliance document types for the company.\n\nRequires `compliance_read` permission.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/compliance_document_types/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Compliance Document Type ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Compliance Document Type", "tags": [ "Compliance" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocumentType-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-compliance-document-types-id", "x-stoplight": { "id": "cdt1pathshow01" }, "description": "Retrieve a compliance document type by ID.\n\nRequires `compliance_read` permission." }, "patch": { "summary": "Update a Compliance Document Type", "tags": [ "Compliance" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocumentType-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-compliance-document-types-id", "x-stoplight": { "id": "cdt1pathpatch1" }, "description": "Update a compliance document type.\n\nRequires `compliance_write` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocumentType-Update" } } } } }, "delete": { "summary": "Delete a Compliance Document Type", "tags": [ "Compliance" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-compliance-document-types-id", "x-stoplight": { "id": "cdt1pathdel001" }, "description": "Delete a compliance document type (soft delete).\n\nRequires `compliance_write` permission." } }, "/v1/companies/{company-id}/connected_companies": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve connected Companies For a Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "l9ja95bu9woa9" }, "items": { "$ref": "#/components/schemas/Company-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-connected_companies", "x-stoplight": { "id": "azyll9l637399" }, "description": "Retrieve connected `Companies` For a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/connected_companies/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on connected Companies for a Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "q7owtmifrbwjm" }, "items": { "$ref": "#/components/schemas/Company-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-connected_companies-typeahead", "x-stoplight": { "id": "lbdv3e80844da" }, "description": "Typeahead search against the `legal_name` property on connected `Companies` for a given `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/data_export/tickets/day/{date}": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "date", "in": "path", "required": true, "description": "Date of daily report" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Daily Ticket Data Export", "tags": [ "Typeaheads", "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DailyExport-Read" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/ModelError" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-daily-export-tickets-day", "description": "Returns a daily export of `tickets` for given company. Please\nnote, this endpoint is only available to users authenticating\nan `m2m_client`. This endpoint must be configured for customer\nby Tread. The file_url is signed and will be valid for 1 hour \nfrom time of api call.", "x-internal": true, "x-stoplight": { "id": "p3jfje1rwgtac" } } }, "/v1/companies/{company-id}/departments": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Department for a Company", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Department-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-departments", "x-stoplight": { "id": "uq7ml4nf26izz" }, "description": "Create a `Department` for a `Company`\n\nThis endpoint requires the `create_department` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Department-Create" } } } }, "tags": [ "Departments" ] }, "get": { "summary": "Retrieve Departments that belong to a Company", "tags": [ "Departments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "yzbiyswknpfly" }, "items": { "$ref": "#/components/schemas/Department-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-departments", "x-stoplight": { "id": "b4l3vjddvudxc" }, "description": "Retrieve `Department`s for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/departments/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Departments by Company", "tags": [ "Typeaheads", "Departments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "dxnoxece9uuo0" }, "type": "array", "items": { "$ref": "#/components/schemas/Department-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-departments-typeahead", "x-stoplight": { "id": "7axs7zey72hwu" }, "description": "Typeahead search against the `name` property on `Departments` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/driver_days": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve DriverDays that belong to a Company", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "wek234kw9yb77" }, "items": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-driver_days", "x-stoplight": { "id": "3sgcw6gi3ay0y" }, "description": "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`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/sort-driver_day_date" }, { "$ref": "#/components/parameters/sort-driver-first_name" }, { "$ref": "#/components/parameters/sort-driver-last_name" }, { "$ref": "#/components/parameters/sort-vendor_account-name" } ] } }, "/v1/companies/{company-id}/driver_days/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on DriverDays by Company", "tags": [ "DriverDays", "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DriverDay-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-typeahead", "x-stoplight": { "id": "ddtypahead01" }, "description": "Typeahead search against the `driver_day_id` property for `DriverDays` visible to the currently authenticated `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/approval_status": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "Driver Day Id" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalStatus for a Driver Day for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Approval-Status" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver-days-driver-day-id-driver_status", "description": "Retrieve `ApprovalStatus` for a visible `DriverDay` for a specific `Company`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "2nwlpo1o4637v" } } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/approvals": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a DriverDay as a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "h8hgsi1nvlpxz" }, "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-approvals", "x-stoplight": { "id": "9tqoz2dxf9td3" }, "x-internal": true, "description": "Retrieve `ApprovalAssignments` for a `DriverDay` as a `Company`", "tags": [ "ApprovalAssignments" ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/approve": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a DriverDay as a Company", "tags": [ "ApprovalAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-driver_days-driver-day-id-approve", "x-stoplight": { "id": "qcgf2529culuc" }, "x-internal": true, "description": "Approve a `DriverDay` by ID as a `Company`\n\nThis endpoint requires the `approve_driver_day` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } } } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/invoices/payables": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Payable Invoices for a DriverDay for a Company", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "zuzbo9qmc4iki" }, "items": { "$ref": "#/components/schemas/Invoice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-invoices-payables", "x-stoplight": { "id": "7lw1lr04rr2yz" }, "x-internal": true, "description": "Retrieve `Payable Invoices` for a `DriverDay` for a `Company`", "parameters": [] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/invoices/receivables": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Receivable Invoices for a DriverDay for a Company", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "dikeyqo7ro6a9" }, "items": { "$ref": "#/components/schemas/Invoice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-invoices-receivables", "x-stoplight": { "id": "v2lgplnja4j55" }, "x-internal": true, "description": "Retrieve `Receivable Invoices` for a `DriverDay` for a `Company`", "parameters": [] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/jobs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs that belong to a DriverDay for a Company", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "xyy8veijv11t2" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-jobs", "x-stoplight": { "id": "gyx48w4jql3e7" }, "x-internal": true, "description": "Retrieve `Jobs` that belong to a `DriverDay` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/jobs/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve FileAttachments for all Jobs in a DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-jobs-file_attachments", "description": "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.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/location_histories": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Location Histories for a DriverDay", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "6z2ak1r6ainf5" }, "items": { "$ref": "#/components/schemas/Job-LocationHistory-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver-days-driver-day-id-location_histories", "x-stoplight": { "id": "osd3on975q53r" }, "description": "Retrieve `LocationHistories` for a `DriverDay`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ], "tags": [ "LocationHistories" ], "x-internal": true } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/signatures": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Signatures for a DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/DriverSignature-Read" }, { "$ref": "#/components/schemas/DropoffSignature-Read" } ] } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-signatures", "x-stoplight": { "id": "ddsig1ndex001" }, "description": "Retrieve all `Signatures` for a `DriverDay`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/signatures/driver": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DriverSignature on a DriverDay", "tags": [ "DriverDays" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-driver_days-driver-day-id-signatures-driver", "x-stoplight": { "id": "ddsigdrv00001" }, "description": "Create or update the `DriverSignature` on a `DriverDay`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DriverSignature-Create" } } } } }, "delete": { "summary": "Delete the DriverSignature from a DriverDay", "tags": [ "DriverDays" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-driver_days-driver-day-id-signatures-driver", "x-stoplight": { "id": "ddsigdrvdel01" }, "description": "Delete the `DriverSignature` from a `DriverDay`." } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/signatures/dropoff": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DropoffSignature on a DriverDay", "tags": [ "DriverDays" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DropoffSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-driver_days-driver-day-id-signatures-dropoff", "x-stoplight": { "id": "ddsigdrop0001" }, "description": "Create or update the `DropoffSignature` on a `DriverDay`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DropoffSignature-Create" } } } } }, "delete": { "summary": "Delete the DropoffSignature from a DriverDay", "tags": [ "DriverDays" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-driver_days-driver-day-id-signatures-dropoff", "x-stoplight": { "id": "ddsigdropdel1" }, "description": "Delete the `DropoffSignature` from a `DriverDay`." } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/travelled_distances": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve TravelledDistances that belong to a DriverDay", "tags": [ "TravelledDistances" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TravelledDistance-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-driver_days-driver-day-id-travelled_distances", "x-stoplight": { "id": "tdd1drvday7x9k2" }, "description": "Retrieve `TravelledDistances` that belong to a `DriverDay`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/driver_days/{driver-day-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a DriverDay as a Company", "tags": [ "ApprovalAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-driver_days-driver-day-id-unapprove", "x-stoplight": { "id": "or0ir2wc8pnje" }, "x-internal": true, "description": "Unapprove a `DriverDay` by ID as a `Company`\n\n\nThis endpoint requires the `approve_driver_day` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/drivers": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Drivers for a Company", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "x3vlfb1jtsdae" }, "items": { "$ref": "#/components/schemas/Driver-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-drivers", "x-stoplight": { "id": "60j1hwpv37vsl" }, "description": "Retrieve `Drivers` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-availability" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-show_all" }, { "$ref": "#/components/parameters/filter-date" }, { "$ref": "#/components/parameters/filter-auto_add_ons" }, { "$ref": "#/components/parameters/filter-sender_company_types" }, { "$ref": "#/components/parameters/filter-label_ids" } ] } }, "/v1/companies/{company-id}/drivers/faceted_search": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "description": "Company ID", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Search Drivers based on the current Dispatch results", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Driver-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-drivers-faceted_search", "description": "Searches `Drivers` in a typeahead style but instead of all `Drivers` for a `Company` this returns all `Drivers` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs that belong to a `Company`.", "parameters": [ { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" } ], "tags": [ "Drivers", "Typeaheads" ], "x-internal": false, "x-stoplight": { "id": "fkv07ysacff6n" } } }, "/v1/companies/{company-id}/drivers/geofence_triggers": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Generate GeofenceTriggers for Drivers", "tags": [ "GeofenceTriggers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "prtw11y6c2yxw" }, "items": { "$ref": "#/components/schemas/GeofenceTrigger-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-drivers-geofence_triggers", "x-stoplight": { "id": "lkzb3w5dg6aor" }, "description": "Generate `GeofenceTriggers` for `Drivers` based on the provided `NextBillionGeofences`. \n\nThe `GeofenceTriggers` are not persisted.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeofenceTrigger-Create" } } } } } }, "/v1/companies/{company-id}/drivers/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Drivers", "tags": [ "Drivers" ], "responses": { "200": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "5tq8lfrhvt7as" }, "items": { "$ref": "#/components/schemas/Driver-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-drivers-typeahead", "x-stoplight": { "id": "mcrkqprl1p1i0" }, "description": "Typeahead search against the `first_name` and `last_name` property on `Drivers` for a `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-date" }, { "$ref": "#/components/parameters/filter-availability" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-show_all" }, { "$ref": "#/components/parameters/filter-sender_company_types" }, { "$ref": "#/components/parameters/filter-label_ids" }, { "$ref": "#/components/parameters/sort-name" } ] } }, "/v1/companies/{company-id}/drivers/{driver-id}/device_status": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Get Device Status for a Driver", "operationId": "get-v1-companies-company-id-drivers-driver-id-device_status", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/DeviceStatus" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Get GPS data and other data like device permissions for a Driver. Requires driver authorization.", "x-stoplight": { "id": "driver-device-status" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/drivers/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Driver by ID for a Company", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Driver-Read-Show" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-drivers-id", "x-stoplight": { "id": "4rb8ndkzwiu83" }, "description": "Retrieve a `Driver` by ID for a `Company`" } }, "/v1/companies/{company-id}/equipment": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an Equipment for a Company", "operationId": "post-v1-companies-company-id-equipment", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "pz7cbtd73nq8l" }, "description": "Create an `Equipment` for a `Company`\n\nThis endpoint requires the `create_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Equipment-Create" } } } } }, "get": { "summary": "Retrieve Equipment that belong to a Company", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "rfa42v76i9ehj" }, "items": { "$ref": "#/components/schemas/Equipment-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-:id-equipment", "x-stoplight": { "id": "dai5d8v300f37" }, "description": "Retrieve `Equipment` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-sender_company_ids" } ] } }, "/v1/companies/{company-id}/equipment/geofence_triggers": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Generate GeofenceTriggers for Equipment", "tags": [ "GeofenceTriggers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "lz7svdxbwcapw" }, "items": { "$ref": "#/components/schemas/GeofenceTrigger-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-equipment-geofence_triggers", "x-stoplight": { "id": "j5lfl7mio6rce" }, "description": "Generate `GeofenceTriggers` for `Equipment` based on the provided `NextBillionGeofences`. \n\nThe `GeofenceTriggers` are not persisted.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeofenceTrigger-Create" } } } } } }, "/v1/companies/{company-id}/equipment/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Equipment for a Company", "tags": [ "Typeaheads", "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Equipment-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-equipment-typeahead", "description": "Typeahead search against the `name` property on `Equipment` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-sender_company_ids" } ], "x-stoplight": { "id": "6u9sp57komhev" }, "x-internal": true } }, "/v1/companies/{company-id}/equipment/{equipment-id}/compliance_documents": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" } ], "post": { "summary": "Create Compliance Document for Equipment", "operationId": "post-equipment-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Create" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create Compliance Document for Equipment" }, "get": { "summary": "List Compliance Documents for Equipment", "operationId": "get-equipment-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ComplianceDocument-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "List Compliance Documents for Equipment" } }, "/v1/companies/{company-id}/equipment/{equipment-id}/compliance_documents/checklist": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" } ], "get": { "summary": "Get Compliance Checklist for Equipment", "operationId": "get-equipment-compliance-checklist", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "compliance_document_type": { "$ref": "#/components/schemas/ComplianceDocumentType-Read-Nested" }, "compliance_document": { "nullable": true, "allOf": [ { "$ref": "#/components/schemas/ComplianceDocument-Read-Nested" } ] } } } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Get Compliance Checklist for Equipment" } }, "/v1/companies/{company-id}/equipment/{equipment-id}/compliance_documents/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "ID" } ], "get": { "summary": "Show Compliance Document for Equipment", "operationId": "get-equipment-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Show Compliance Document for Equipment" }, "patch": { "summary": "Update Compliance Document for Equipment", "operationId": "patch-equipment-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Update" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update Compliance Document for Equipment" }, "delete": { "summary": "Delete Compliance Document for Equipment", "operationId": "delete-equipment-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Delete Compliance Document for Equipment" } }, "/v1/companies/{company-id}/equipment/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Equipment by ID for a Company", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-equipment-id", "x-stoplight": { "id": "n43u5p7ctgdj2" }, "description": "Retrieve `Equipment` by ID for a `Company`" } }, "/v1/companies/{company-id}/equipment_types": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an EquipmentType for a Company", "tags": [ "EquipmentType" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/EquipmentType-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-equipment_types", "x-stoplight": { "id": "rbcq13wjmi5i7" }, "description": "Create an `EquipmentType` for a `Company`\n\nThis endpoint requires the `create_equipment_type` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EquipmentType-Create" } } } } }, "get": { "summary": "Retrieve EquipmentTypes for a Company", "tags": [ "EquipmentType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "unibfnlrdcbhl" }, "type": "array", "items": { "$ref": "#/components/schemas/EquipmentType-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-id-equipment_types", "x-stoplight": { "id": "24mbrjsdabr1k" }, "description": "Retrieve `EquipmentTypes` for a `Company`." } }, "/v1/companies/{company-id}/equipment_types/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on EquipmentType for a Company", "tags": [ "Typeaheads", "EquipmentType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "1y8kgt70w518v" }, "items": { "$ref": "#/components/schemas/EquipmentType-Read-Typeahead" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-equipment_types-typeahead", "x-stoplight": { "id": "jkeh212xqgfp8" }, "description": "Typeahead search against the `name` property on `EquipmentType` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-internal": true } }, "/v1/companies/{company-id}/foremen": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Foremen for a Company", "tags": [ "Foremen" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "083z4e6jniznk" }, "items": { "$ref": "#/components/schemas/Foreman-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-foremen", "x-stoplight": { "id": "l5hugjao7yz7j" }, "description": "Retrieve `Foremen` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-sender_company_types" } ] } }, "/v1/companies/{company-id}/foremen/faceted_search": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Search Foremen based on the current Dispatch results", "tags": [ "Foremen", "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Foreman-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-foremen-faceted_search", "x-stoplight": { "id": "fhl714kxau0z2" }, "description": "Searches `Foremen` in a typeahead style but instead of all `Foremen` for a `Company` this returns all `Foremen` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs that belong to a `Company`.", "parameters": [ { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" } ] } }, "/v1/companies/{company-id}/foremen/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Foremen", "tags": [ "Foremen", "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "4zf8dir5org9i" }, "items": { "$ref": "#/components/schemas/Foreman-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-foremen-typeahead", "x-stoplight": { "id": "shsf9yvsfoan9" }, "description": "Typeahead search against the `first_name` and `last_name` property on `Foremen` for a `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-sender_company_types" } ] } }, "/v1/companies/{company-id}/foremen/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Foreman ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Foreman by ID for a Company", "tags": [ "Foremen" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Foreman-Read-Show" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-foremen-id", "x-stoplight": { "id": "hmdgtpa0dua5o" }, "description": "Retrieve a `Driver` by ID for a `Company`" } }, "/v1/companies/{company-id}/fuel_price_indices": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FuelPriceIndex for a Company", "tags": [ "FuelSurcharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelPriceIndex-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-fuel_price_indices", "x-stoplight": { "id": "2f64msx26yluy" }, "description": "Create a `FuelPriceIndex` for a `Company`\n\nThis endpoint requires the `create_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelPriceIndex-Create" } } } } }, "get": { "summary": "Retrieve FuelPriceIndices that belong to a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "pcuxfktjombvc" }, "items": { "$ref": "#/components/schemas/FuelPriceIndex-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-fuel_price_indices", "x-stoplight": { "id": "5y263j22npmb8" }, "description": "Retrieve `FuelPriceIndices` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "tags": [ "FuelSurcharges" ] } }, "/v1/companies/{company-id}/fuel_price_indices/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on FuelPriceIndex for a Company", "tags": [ "FuelSurcharges", "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "95bnj47nk3rv3" }, "type": "array", "items": { "$ref": "#/components/schemas/FuelPriceIndex-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-fuel_price_indices-typeahead", "x-stoplight": { "id": "0aigw051bke6i" }, "description": "Typeahead search against the `name` property on `FuelPriceIndex` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/fuel_surcharge_schedules": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Create a FuelSurchargeSchedule for a Company", "tags": [ "FuelSurcharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-fuel_surcharge_schedules", "x-stoplight": { "id": "g53w8gu31ojs0" }, "description": "Create a `FuelSurchargeSchedule` for a `Company`\n\nThis endpoint requires the `create_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Create" } } } } }, "get": { "summary": "Retrieve FuelSurchargeSchedules that belong to a Company", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "70a1g0wo5ktfl" }, "items": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-fuel_surcharge_schedules", "x-stoplight": { "id": "9kdp2r41vtlao" }, "description": "Retrieve `FuelSurchargeSchedules` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/fuel_surcharge_schedules/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Typeahead search on FuelSurchargeSchedule for a Company", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "fcwaom5u01336" }, "items": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-fuel_surcharge_schedules-typeahead", "x-stoplight": { "id": "89v7xhgn3dxtz" }, "description": "Typeahead search against the `name` property on `FuelSurchargeSchedule` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/iam_roles": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve IamRoles that belong to a Company", "tags": [ "IamRoles" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/IamRole-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-iam-roles", "description": "Retrieve `IamRoles` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-internal": false, "x-stoplight": { "id": "6zdyyo7xmdwz3" } } }, "/v1/companies/{company-id}/invoices": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Invoices that belong to a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "a57zqne4bafxo" }, "items": { "$ref": "#/components/schemas/Invoice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-invoices", "x-stoplight": { "id": "om8gtws0w98k5" }, "description": "Retrieve `Invoices` that visible to a `Company`", "parameters": [ { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-invoice_category" }, { "$ref": "#/components/parameters/filter-grouped" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-invoiceable_type" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-company_id" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/{company-id}/invoices/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Invoice ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update an Invoice for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-invoices-id", "x-stoplight": { "id": "2b1dd57r20hz1-company" }, "x-internal": true, "description": "Update an `Invoice` by ID for a `Company`\n\nThis endpoint requires the `edit_invoice` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Invoice-Update" } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/add_on_charges": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOnCharge for an Invoice (company-scoped)", "operationId": "post-v1-companies-company-id-invoices-invoice-id-add-on-charges", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create an `AddOnCharge` for an `Invoice` within a specific company scope.\n\nThis endpoint is used to apply an `AddOnCharge` for an `Invoice`.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Create" } } } }, "tags": [ "AddOnCharges" ] }, "get": { "summary": "Retrieve AddOnCharges for an Invoice (company-scoped)", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-invoices-invoice-id-add-on-charges", "x-internal": true, "description": "Retrieve `AddOnCharges` for an `Invoice` within a specific company context.\n\nThis endpoint returns the applied `AddOnCharges` for an `Invoice` and validates that the company_id is authorized for the current user.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update AddOnCharges for an Invoice for a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "dw39xnqamd8aw-company" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-invoices-invoice-id-add-on-charges", "x-stoplight": { "id": "s2ctvyxv0q08n-company" }, "description": "Batch update `AddOnCharges` for an `Invoice` for a `Company`\n\nThis endpoint allows updating, creating, deleting `AddOnCharges` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\ne.g.\n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf creating new records:\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nadd_on_charges: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5,\n \"add_on_rate_type\": \"RateForEach\"\n },\n {\n \"percentage\": 10,\n \"add_on_rate_type\": \"RatePercentOfTotal\"\n }\n]\n```\n\nIf deleting exisitng records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "add_on_charges": { "type": "array", "x-stoplight": { "id": "z27syd1630c6o-company" }, "items": { "x-stoplight": { "id": "q5zz10ownp1fp-company" }, "anyOf": [ { "$ref": "#/components/schemas/AddOnCharge-Create" }, { "$ref": "#/components/schemas/AddOnCharge-Update-Destroyable" } ] } } } } } } }, "tags": [ "AddOnCharges" ] } }, "/v1/companies/{company-id}/invoices/{invoice-id}/approve": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve an Invoice for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-approve", "x-stoplight": { "id": "f2s2vpepyhb23" }, "description": "Approve an `Invoice` for a `Company` by ID", "tags": [ "Invoices" ], "x-internal": true } }, "/v1/companies/{company-id}/invoices/{invoice-id}/customer_approve": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve the Invoice as the Customer for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-customer_approve", "x-stoplight": { "id": "wr2d9e96wxxhp" }, "x-internal": true, "description": "Approve the `Invoice` as the `Customer` for a `Company` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/customer_pay": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay the Invoice as the Customer for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-customer_pay", "x-internal": true, "description": "Pay the `Invoice` as the `Customer` for a `Company` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/export": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Export an Invoice for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-export", "description": "Export an `Invoice` for a `Company` by ID", "tags": [ "Invoices" ], "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/invoice_line_items": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all InvoiceLineItems that belongs to an Invoice for a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceLineItem-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-invoices-invoice-id-invoice_line_items", "description": "Retrieve all `InvoiceLineItem` for an `Invoice` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-internal": true, "tags": [ "Invoices" ] }, "patch": { "summary": "Batch update InvoiceLineItems for an Invoice for a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "d9v9xort2c4gg-company" }, "items": { "$ref": "#/components/schemas/InvoiceLineItem-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-invoices-invoice-id-invoice_line_items", "x-stoplight": { "id": "0qb21d1yd9jv2-company" }, "description": "Batch update `InvoiceLineItems` for an `Invoice` for a `Company`.\n\nThis endpoint allows updating, creating, deleting `InvoiceLineItems` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\n- no need to provide the `rate_type` field\ne.g.\n```json\ninvoice_line_items: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf deleting existing records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\ninvoice_line_items: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```\n\n
\n\n## This section is deprecated\n#### We are still accepting `rate_type` but it will have no effect. It will be removed in one of the next releases.\n\nIf creating new records (for cases where the `Invoice` `rate_type` grouping changes):\n- must provide the `rate_type`\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nrate_type: \"RatePerTon\",\ninvoice_line_items: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5\n },\n {\n \"quantity\": 22.50,\n \"rate\": 12.5\n }\n]\n```", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "rate_type": { "$ref": "#/components/schemas/RateType" }, "invoice_line_items": { "type": "array", "x-stoplight": { "id": "8binxtypupuut-company" }, "items": { "$ref": "#/components/schemas/InvoiceLineItem-Update" } } } } } } }, "tags": [ "Invoices" ] } }, "/v1/companies/{company-id}/invoices/{invoice-id}/invoice_line_items/generate": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Generate InvoiceLineItems for an Invoice for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "pgnb7ip6q7u9m-company" }, "items": { "$ref": "#/components/schemas/InvoiceLineItem-Read-Generated" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-invoices-invoice-id-invoice_line_items-generate", "x-stoplight": { "id": "ctto8orwcvh2s-company" }, "description": "Generate `InvoiceLineItems` for an `Invoice` for a `Company`\n\nThis endpoint only generates the `InvoiceLineItems` based on the inputs and does not store any data on the backend", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "rate_value", "rate_type" ], "properties": { "rate_value": { "type": "number", "x-stoplight": { "id": "w5z08oggi7syq-company" } }, "rate_type": { "$ref": "#/components/schemas/RateType" } } } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/pay": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay an Invoice for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-pay", "description": "Pay an `Invoice` for a `Company` by ID", "tags": [ "Invoices" ], "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/send_invoice": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send the Invoice for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-send_invoice", "x-internal": true, "description": "Send the `Invoice` for a `Company` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/invoices/{invoice-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove an Invoice as a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-unapprove", "x-stoplight": { "id": "nyslvxh840krh" }, "description": "Unapprove an `Invoice` by ID as a `Company`", "tags": [ "Invoices" ], "x-internal": true } }, "/v1/companies/{company-id}/invoices/{invoice-id}/void": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "invoice-id", "in": "path", "required": true, "description": "Invoice ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Void an Invoice for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-invoices-invoice-id-void", "x-stoplight": { "id": "void-company-scoped-invoice" }, "description": "Void an `Invoice` for a `Company` by ID", "tags": [ "Invoices" ], "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieves Jobs that belong to a Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "99rr8qfza5hg1" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-jobs", "x-stoplight": { "id": "uytvwbcs76g7p" }, "description": "Retrieve `Jobs` for a `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `order_id`\n * `job_id`\n * `company.legal_name`\n * `account.name`\n * `project.name`\n * `order.dispatch_number`\n * user as driver: `driver.first_name` || `driver.last_name`\n * contact as foreman_contact: `foreman_contact.name` || `foreman_contact.email` || `foreman_contact.phone`\n * contact as collaborator_contact: `collaborator_contact.name` || `collaborator_contact.email` || `collaborator_contact.phone`\n * contact as sales_contact: `sales_contact.name` || `sales_contact.email` || `sales_contact.phone`\n * contact as supervisor_contact: `supervisor_contact.name` || `supervisor_contact.email` || `supervisor_contact.phone`\n\nFilter usage:\n* to filter a single state: `filter[states][]=created`\n* to filter multiple states: `filter[states][]=created&filter[states][]=arrived_dropoff`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-order-dispatch_number_ids" }, { "$ref": "#/components/parameters/ids" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" } ] } }, "/v1/companies/{company-id}/jobs/bulk_accept": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "name": "company-id", "in": "path", "required": true, "description": "Company ID", "schema": { "type": "string", "format": "uuid" } } ], "put": { "summary": "Bulk Accept Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_accept", "x-stoplight": { "id": "khpgcfzmdocy1" }, "x-internal": true, "description": "Accept multiple `Jobs` based on the given `job_ids` asynchronously as a Company.\n\nTo accept a `Job` successfully, the principal should either be the `Driver` of the `Job` or has an `edit_job` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "7zhg7oskbkmmu" }, "items": { "x-stoplight": { "id": "ayy934gj43fle" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_assign": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Vendor to Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_assign", "x-stoplight": { "id": "vpmfdbxgqlayh" }, "description": "Assigns multiple `Jobs` to the given `Vendor` asynchronously as a Company.\n\nThis endpoint requires the `edit_job` permission\n\nDeprecated in favor of `PUT /v1/jobs/bulk_assign_vendors`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/BulkAssignVendor-Create" } } } } } }, "/v1/companies/{company-id}/jobs/bulk_assign_drivers": { "parameters": [ { "name": "company-id", "in": "path", "required": true, "description": "Company ID", "schema": { "type": "string", "format": "uuid" } }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Drivers to Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_assign_drivers", "x-stoplight": { "id": "mbc1m2mtbew2a" }, "description": "Assigns a list of multiple `Jobs` to the given `Driver` asynchronously as a Company.\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "driver_assignments" ], "properties": { "driver_assignments": { "type": "array", "x-stoplight": { "id": "utlw8ngfqrlo4" }, "items": { "$ref": "#/components/schemas/DriverAssignment-Create" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_assign_vendors": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Vendors to Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_assign_vendors", "x-stoplight": { "id": "8w6c9bsylf7w9" }, "description": "Assigns a list of multiple `Jobs` to the given `Vendor` asynchronously as a Company.\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "vendor_assignments" ], "properties": { "vendor_assignments": { "type": "array", "x-stoplight": { "id": "sret4eh44421v" }, "items": { "$ref": "#/components/schemas/BulkAssignVendor-Create" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_cancel": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "name": "company-id", "in": "path", "required": true, "description": "Company ID", "schema": { "type": "string", "format": "uuid" } } ], "put": { "summary": "Bulk cancel Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_cancel", "x-stoplight": { "id": "k3j9p2x7m4qw5" }, "description": "Bulk cancel multiple `Jobs` by `id` asynchronously as a Company.\n\nThis endpoint requires the `cancel_job` permission.\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "m5n8q4r9t2vx7" }, "items": { "x-stoplight": { "id": "w6y1z3a8c5d2f" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_copy_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Copy Assignments as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_copy_assignments", "x-stoplight": { "id": "zyd3q79ub4z61" }, "description": "Bulk Copy `JobAssignments` asynchronously as a Company.\n\nThis endpoint requires the `edit_job` permission", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "order_id", "job_ids" ], "properties": { "order_id": { "type": "string", "x-stoplight": { "id": "u9heb7msnojw9" }, "format": "uuid", "description": "The `Order` ID where the `JobAssignments` will be copied to" }, "job_ids": { "type": "array", "x-stoplight": { "id": "fm5o3vou9n9nq" }, "description": "The `Job` IDs of the `JobAssignments` that are going to be copied", "items": { "x-stoplight": { "id": "1boz6e20nc87j" }, "type": "string", "format": "uuid" } }, "deep_copy": { "type": "boolean", "x-stoplight": { "id": "mogdpgsujy6gr" }, "description": "If `true`, it will copy all the `JobAssignment` chain.\nIf `false`, it will copy only the immediate `JobAssignment`" } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_delete": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "name": "company-id", "in": "path", "required": true, "description": "Company ID", "schema": { "type": "string", "format": "uuid" } } ], "put": { "summary": "Bulk delete Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_delete", "x-stoplight": { "id": "31m1khj5akvn4" }, "description": "Bulk delete multiple `Jobs` by `id` asynchronously as a Company.\n\nThis endpoint requires the `delete_job` permission.\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "phd7tua5e5tyn" }, "items": { "x-stoplight": { "id": "cvqr0w0jdaud4" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_send": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Send Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "3k60j8ijyqde1" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_send", "x-stoplight": { "id": "ynzrs4lzx7iex" }, "description": "Send multiple `Driver`-assigned or `Vendor`-assigned `Jobs` based on the given `job_ids` and `order_ids` asynchronously as a Company.\n\nThis endpoint requires the `edit_job` permission", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "o8ct2voykrtf8" }, "items": { "x-stoplight": { "id": "2tzsrlx3d7hky" }, "type": "string", "format": "uuid" } } } } } }, "description": "This allows either `job_ids` or `order_ids` or both" } } }, "/v1/companies/{company-id}/jobs/bulk_send_day": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Send Jobs for a Day", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "x-stoplight": { "id": "3k60j8ijyqde1" }, "required": [ "count" ], "properties": { "count": { "type": "integer", "x-stoplight": { "id": "1g4pe7kpyeysk" }, "description": "Number of Jobs that will be enqeueud to send. This is _not_ guaranteed to be the number of Jobs that will be actually sent." } } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_send_day", "x-stoplight": { "id": "ynzss4mzx8iex" }, "description": "Send multiple `Driver`-assigned or `Vendor`-assigned `Jobs` for the given `date` asynchronously as a Company.\n\nThis endpoint requires the `edit_job` permission.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "date": { "type": "string", "format": "date", "x-stoplight": { "id": "o8cu2uozkruf8" }, "description": "Date to send Jobs for." } }, "required": [ "date" ] } } } } } }, "/v1/companies/{company-id}/jobs/bulk_unassign": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "name": "company-id", "in": "path", "required": true, "description": "Company ID", "schema": { "type": "string", "format": "uuid" } } ], "put": { "summary": "Bulk unassign Jobs as a Company", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-jobs-bulk_unassign", "x-stoplight": { "id": "n7p4r2t9v5x8z" }, "description": "Bulk unassign multiple `Jobs` by `id` asynchronously as a Company.\n\nThis endpoint requires the `assign_job` permission.\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "b3d6f8h1j4k7m" }, "items": { "x-stoplight": { "id": "q2s5u8w1y4a7c" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/companies/{company-id}/jobs/bulk_update": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Bulk Update Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "patch-v1-companies-company-id-jobs-bulk_update", "x-stoplight": { "id": "fluexocqc75s7" }, "description": "Bulk update multiple `Jobs` with attributes defined in `data` asynchronously.\n\nThis endpoint requires the `edit_job` permission.\n\nBulk Updatable attributes: `notes`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Job-Bulk-Update" } } } } } }, "/v1/companies/{company-id}/jobs/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Jobs by Company", "tags": [ "Jobs", "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Job-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-typeahead", "x-stoplight": { "id": "jobbypahead01" }, "description": "Typeahead search against the `job_id` property for `Jobs` visible to the currently authenticated `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/jobs/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Retrieve a single Job for a Company", "operationId": "get-v1-companies-company-id-jobs-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Retrieve `Job` by ID for a Company", "tags": [ "Jobs" ] }, "patch": { "summary": "Update a Job for a Company", "operationId": "patch-v1-companies-company-id-jobs-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update a `Job` by ID for a Compan\n\nThis endpoint requires the `edit_job` permission.\n\nIf setting the `driver_id`, the `assign_job` permission is also required.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job-Update" } } }, "description": "" }, "tags": [ "Jobs" ], "x-stoplight": { "id": "zn52e3d2od1wp" } } }, "/v1/companies/{company-id}/jobs/{job-id}/accept": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Accept a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-accept", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Accept a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "mfeitwl64v85c" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/approval_status": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job Id" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalStatus for a Job for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Approval-Status" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-driver_status", "description": "Retrieve `ApprovalStatus` for a visible `Job` for a specific `Company`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "amdv2nn5zoknz" } } }, "/v1/companies/{company-id}/jobs/{job-id}/approvals": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a Job for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-job_approvals", "description": "Retrieve all `ApprovalAssignments` visible to the specified `Company` for a `Job`", "x-stoplight": { "id": "wpvi2o1l6w7d8" }, "tags": [ "ApprovalAssignments" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Job as a Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-jobs-job-id-approve", "description": "Approve a `Job` by ID as a Company.\n\nThis endpoint requires the `approve_job` permission.\n\nPrincipals with the `Company Admin` role can specify a specific `approval_type`.", "x-stoplight": { "id": "juv9a8b6fllaw" }, "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "approved_work_time_minutes": { "type": "integer", "x-stoplight": { "id": "pveh7hxuwirvd" }, "minimum": 0 } } }, { "$ref": "#/components/schemas/Approval-Approve" } ] } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/arrive": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Arrive to site for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-arrive", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Arrive to `site` for a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "ao46svdo58upt" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/assign_vendor": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Assign a vendor to a Job for a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-assign_vendor", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "tags": [ "Jobs" ], "description": "Assign a `driver` to an `Account`, with `vendor` type for a company\n\nThis endpoint requires the `assign_job` `IAmPermission`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "vendor_id": { "type": "string", "format": "uuid" }, "compliance_override": { "type": "boolean", "x-stoplight": { "id": "d7n3q5wk8tj2b" }, "description": "When true, logs a compliance override for the vendor assignment" } }, "required": [ "vendor_id" ] } } } }, "x-stoplight": { "id": "b7zdhocomy1ck" } } }, "/v1/companies/{company-id}/jobs/{job-id}/cancel": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Cancel a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-cancel", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Cancel a `Job` by ID as a Company\n\nThis endpoint requires the `cancel_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "dapoCcy2vse81" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/complete": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-complete", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Complete a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "7a6belxm7yk83" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/complete_load": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete Load for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-complete-load", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Load `material` for a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "13dctfcwgxtkj" }, "tags": [ "Jobs" ], "x-internal": true } }, "/v1/companies/{company-id}/jobs/{job-id}/device_status": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Get Device Status for Job", "operationId": "get-v1-companies-company-id-jobs-job-id-device_status", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/DeviceStatus" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Get GPS data and other data like device permissions for a Job. Requires job authorization.", "x-stoplight": { "id": "driver-device-perms" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/enroute": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Move to Site for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-enroute", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Move to `site` for a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "65aitfc006hmp" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/flag": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Flag a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-flag", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "y5wczygi39v3n" }, "tags": [ "Jobs" ], "description": "Flag a `Job` by ID as a Company.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/geofence_triggers": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Calculate GeofenceTriggers for a Job", "tags": [ "GeofenceTriggers" ], "operationId": "post-v1-companies-company-id-jobs-job-id-geofence_triggers", "x-stoplight": { "id": "h9i0j1k2l3m4n5" }, "x-internal": true, "description": "Calculate `GeofenceTriggers` for a `Job` based on the strategy.\n\n- `historical`: Returns existing non-skipped geofence triggers for the job\n- `naive`: Calculates geofence triggers using naive strategy (requires `delay_seconds`)\n- `accuracy_strict`: Calculates geofence triggers using accuracy strict strategy (requires `delay_seconds`)", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeofenceTrigger-CalculateForJob" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "o6p7q8r9s0t1u" }, "items": { "$ref": "#/components/schemas/GeofenceTrigger-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } } } }, "/v1/companies/{company-id}/jobs/{job-id}/invoicing": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Job with Invoices for a Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-invoicing", "x-stoplight": { "id": "hb32c2xwseb8n" }, "description": "Retrieve a `Job` with `Receivable` and `Payable` `Invoices` for a `Company`", "x-internal": true } }, "/v1/companies/{company-id}/jobs/{job-id}/job_events": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all JobEvents that belong to a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "b6c0fcj0ne1j4" }, "items": { "$ref": "#/components/schemas/JobEvent-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-job_events", "x-stoplight": { "id": "gvexsmvb3vkhu" }, "description": "Retrieve `Job` `Job-Events` by `ID` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ] } }, "/v1/companies/{company-id}/jobs/{job-id}/load_material": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Load Material for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-load-material", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Load `material` for a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "lp4ljgjpqgksn" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/loads": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Loads of a Job for a Company", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ia1jmmi76vai2" }, "items": { "$ref": "#/components/schemas/Load-LoadSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-loads", "x-stoplight": { "id": "wz2pidf0emdrv" }, "description": "Retrieve `Loads` of a `Job` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-ticket-flagged" }, { "$ref": "#/components/parameters/filter-states-" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-material_ids" } ] } }, "/v1/companies/{company-id}/jobs/{job-id}/location_histories": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Location Histories for a Job", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "6z2ak1r6ainf5" }, "items": { "$ref": "#/components/schemas/Job-LocationHistory-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-location_histories", "x-stoplight": { "id": "osd3on975q53r" }, "description": "Retrieve `LocationHistories` for a `Job`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ], "tags": [ "LocationHistories" ], "x-internal": true } }, "/v1/companies/{company-id}/jobs/{job-id}/moving_sites/{moving-site-id}/location_histories": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "moving-site-id", "in": "path", "required": true, "description": "MovingSite ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Location Histories for a Moving Site on a Job", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "occr6x8ux462k" }, "type": "array", "items": { "$ref": "#/components/schemas/Job-LocationHistory-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-moving_sites-moving-site-id-location_histories", "x-stoplight": { "id": "syn0wfx5soe1u" }, "description": "Retrieve `LocationHistories` for a `MovingSite` on a `Job`.\n\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "tags": [ "LocationHistories" ], "x-internal": true } }, "/v1/companies/{company-id}/jobs/{job-id}/pay": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-pay", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "9c40bwhcymbjc" }, "tags": [ "Jobs" ], "description": "Pay a `Job` by ID as a Company.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/payable": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Payable Invoice for a given Job", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-payable", "x-stoplight": { "id": "xax41h77exb35" }, "x-internal": true, "description": "Retrieve a `Payable Invoice` for a given `Job` for a `Company`. \n\nThis can be a `Payable` for a `Vendor` or a `Driver`. ", "parameters": [] } }, "/v1/companies/{company-id}/jobs/{job-id}/receivable": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Receivable for a given Job", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-receivable", "x-stoplight": { "id": "8y58pkoplhp7h" }, "x-internal": true, "description": "Retrieve a `Receivable Invoice` for a given `Job` for a `Company`", "parameters": [] } }, "/v1/companies/{company-id}/jobs/{job-id}/reject": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Reject a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-reject", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Reject a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_reason": { "type": "string", "x-stoplight": { "id": "g816b0ep1dql5" }, "description": "A user-provided reason for rejecting the Job", "nullable": true } } } } } }, "x-stoplight": { "id": "1k5bcns8bbpb8" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/remove_flag": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Remove flag for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-remove_flag", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "u1bdmbb94g133" }, "tags": [ "Jobs" ], "description": "Remove flag for a `Job` by ID as a Company.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/remove_signoff": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Remove signoff for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-remove_signoff", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "i54dj1ce3f3xl" }, "description": "Remove signoff for a `Job` by ID as a Company.\n\nThis endpoint requires the `edit_job` permission", "tags": [ "Jobs" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/request": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Request a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-request", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Request a `Job` by ID to assigned `driver_id` on the job.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "jtv8a7b5ellbw" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/resume": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Resume a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-resume", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Resume a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/jobs/{job-id}/review": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Review a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-review", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Sets the `Job` by ID to `in_review` state as a Company.\n\nThis endpoint requires the `edit_job` permission", "tags": [ "Jobs" ], "x-stoplight": { "id": "7irtnw9twg13s" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/sign_off": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Sign off a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-sign_off", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "y5wcyzgi39v3n" }, "tags": [ "Jobs" ], "description": "Sign off a `Job` by ID as a Company.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/jobs/{job-id}/signatures": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Signatures for a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/DriverSignature-Read" }, { "$ref": "#/components/schemas/DropoffSignature-Read" } ] } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-signatures", "x-stoplight": { "id": "jobsig1ndex001" }, "description": "Retrieve all `Signatures` for a `Job`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/jobs/{job-id}/signatures/driver": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DriverSignature on a Job", "tags": [ "Jobs" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-jobs-job-id-signatures-driver", "x-stoplight": { "id": "jobsigdrv0001" }, "description": "Create or update the `DriverSignature` on a `Job`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DriverSignature-Create" } } } } }, "delete": { "summary": "Delete the DriverSignature from a Job", "tags": [ "Jobs" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-jobs-job-id-signatures-driver", "x-stoplight": { "id": "jobsigdrvdel01" }, "description": "Delete the `DriverSignature` from a `Job`." } }, "/v1/companies/{company-id}/jobs/{job-id}/signatures/dropoff": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DropoffSignature on a Job", "tags": [ "Jobs" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DropoffSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-jobs-job-id-signatures-dropoff", "x-stoplight": { "id": "jobsigdrop001" }, "description": "Create or update the `DropoffSignature` on a `Job`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DropoffSignature-Create" } } } } }, "delete": { "summary": "Delete the DropoffSignature from a Job", "tags": [ "Jobs" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-jobs-job-id-signatures-dropoff", "x-stoplight": { "id": "jobsigdropdel1" }, "description": "Delete the `DropoffSignature` from a `Job`." } }, "/v1/companies/{company-id}/jobs/{job-id}/summary": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the JobSummary for a Job", "tags": [ "JobSummaries" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobSummary-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-summary", "x-stoplight": { "id": "hej86n31jj0ia" }, "description": "Retrieve the `JobSummary` for a `Job` for a `Company`.\n\nA `JobSummary` will only exist for a `Job` in the `completed` state." }, "patch": { "summary": "Update the JobSummary for a Job", "tags": [ "JobSummaries" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobSummary-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-jobs-job-id-summary", "x-stoplight": { "id": "gvked1f44zfnw" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobSummary-Update" } } } }, "description": "Update the `JobSummary` for a `Job`.\n\nThis endpoint requires the `edit_job_summary` `IamPermission`." } }, "/v1/companies/{company-id}/jobs/{job-id}/travelled_distances": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve TravelledDistances that belong to a Job", "tags": [ "TravelledDistances" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TravelledDistance-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-jobs-job-id-travelled_distances", "x-stoplight": { "id": "tdj1job7x9k2" }, "description": "Retrieve `TravelledDistances` that belong to a `Job`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/jobs/{job-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Job as a Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-jobs-job-id-unapprove", "description": "Unapprove a `Job` by ID as a Company.\n\nThis endpoint requires the `approve_job` permission.\n\nPrincipals with the `Company Admin` role can specify a specific `approval_type`.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } }, "x-stoplight": { "id": "yi84vcdcn8oja" } } }, "/v1/companies/{company-id}/jobs/{job-id}/unassign": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unassign the Driver or Vendor from a Job for a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-unassign", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Unassign a `vendor` for a `Job` by ID for a Company\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Jobs" ], "x-stoplight": { "id": "1e0tkl3tnbqua" } } }, "/v1/companies/{company-id}/jobs/{job-id}/unload_material": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unload the Material for a Job as a Company", "operationId": "put-v1-companies-company-id-jobs-job-id-unload-material", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Unload `material` for a `Job` by ID as a Company\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "v29h8lkr7guj6" }, "tags": [ "Jobs" ] } }, "/v1/companies/{company-id}/kml_files": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a KML/KMZ file for a Company", "tags": [ "KMLFiles" ], "responses": { "201": { "description": "Created", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/KMLFile-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-kml_files", "x-stoplight": { "id": "7dtbmoghmnqn2" }, "description": "Create a `KML`/`KMZ` file that belongs to a `Company`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/KMLFile-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/KMLFile-Create" } } } }, "x-internal": true }, "get": { "summary": "Retrieve KML/KMZ files that belong to a Company", "tags": [ "KMLFiles" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "dud9i1djq4fmf" }, "type": "array", "items": { "$ref": "#/components/schemas/KMLFile-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-kml_files", "x-stoplight": { "id": "0btc242xc62zx" }, "x-internal": true, "description": "Retrieve `KML`/`KMZ` files for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/labels": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" } ], "post": { "summary": "Create a new Label", "tags": [ "Labels" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Label-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-labels", "x-stoplight": { "id": "lbl1pathpost01" }, "description": "Create a new `Label`\n\nThis endpoint requires the `manage_labels` permission", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Label-Create" } } } } }, "get": { "summary": "Retrieve Labels for the Company", "tags": [ "Labels" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "lbl1pathidxarr" }, "items": { "$ref": "#/components/schemas/Label-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-labels", "x-stoplight": { "id": "lbl1pathget001" }, "description": "Retrieve `Label`s for the specified `Company`.\n\nThis endpoint requires the `manage_labels` permission", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "search[query]", "description": "Search labels by name" } ] } }, "/v1/companies/{company-id}/labels/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Label ID" } ], "get": { "summary": "Retrieve a single Label", "tags": [ "Labels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Label-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-labels-id", "x-stoplight": { "id": "lbl1pathgetid1" }, "description": "Retrieve a single `Label` by ID\n\nThis endpoint requires the `manage_labels` permission", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ] }, "patch": { "summary": "Update a Label", "tags": [ "Labels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Label-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-labels-id", "x-stoplight": { "id": "lbl1pathpatch1" }, "description": "Update a `Label` by ID\n\nThis endpoint requires the `manage_labels` permission", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Label-Update" } } } } }, "delete": { "summary": "Delete a Label", "tags": [ "Labels" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-labels-id", "x-stoplight": { "id": "lbl1pathdel001" }, "description": "Delete a `Label` by ID (soft delete)\n\nThis endpoint requires the `manage_labels` permission", "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ] } }, "/v1/companies/{company-id}/loads/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Loads by Company", "tags": [ "Loads", "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Load-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-loads-typeahead", "x-stoplight": { "id": "loadtypahead01" }, "description": "Typeahead search against the `load_id` property for `Loads` visible to the currently authenticated `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/loads/{load-id}/approvals": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a Load for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-loads-load-id-load_approvals", "description": "Retrieve all `ApprovalAssignments` visible to the specified `Company` for a `Load`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "uazfhzq623xqz" } } }, "/v1/companies/{company-id}/loads/{load-id}/approve": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Load as a Company", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-loads-load-id-approve", "x-stoplight": { "id": "zmbfw03qqydlf" }, "description": "Approve a `Load` by ID as a `Company`\n\nThis endpoint requires the `approve_load` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } } } }, "/v1/companies/{company-id}/loads/{load-id}/complete": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete a Load as a Company", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-loads-load-id-complete", "x-stoplight": { "id": "6nbzko679905s" }, "description": "Complete a `Load` by ID as a `Company`\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "x-internal": true } }, "/v1/companies/{company-id}/loads/{load-id}/travelled_distances": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve TravelledDistances that belong to a Load", "tags": [ "TravelledDistances" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TravelledDistance-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-loads-load-id-travelled_distances", "x-stoplight": { "id": "tdl1load7x9k2" }, "description": "Retrieve `TravelledDistances` that belong to a `Load`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/loads/{load-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Load as a Company", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-loads-load-id-unapprove", "description": "Unapprove a `Load` by ID as a `Company`\n\nThis endpoint requires the `approve_load` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "cl6r45gvy3xbm" } } }, "/v1/companies/{company-id}/location_histories/latest": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve latest Location Histories for a Company", "tags": [ "LocationHistories" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "lg1vq81dstm0v" }, "items": { "$ref": "#/components/schemas/NextBillionAssetLocations-LatestLocation-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-location_histories-latest", "x-stoplight": { "id": "ywr89pd9skn5r" }, "description": "Retrieve latest `LocationHistories` for a `Company`.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "filter[order_id]", "description": "Filters location histories to include only those associated with the specified order's jobs " }, { "schema": { "type": "string" }, "in": "query", "name": "filter[job_id]", "description": "Filters location histories to include only those associated with the specific job " } ] } }, "/v1/companies/{company-id}/logo": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Update the logo for a Company", "operationId": "post-v1-companies-:company_id-logo", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Company-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "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`, `gif`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Company-Logo-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Company-Logo-Create" } } }, "description": "" }, "tags": [ "Companies" ], "x-internal": true }, "get": { "summary": "Retrieve the logo for a Company", "operationId": "get-v1-companies-company_id-logo", "x-stoplight": { "id": "0btd243xc72zx" }, "x-internal": true, "description": "Retrieve the logo for a `Company`.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Company-Logo-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "tags": [ "Companies" ] } }, "/v1/companies/{company-id}/managed_companies": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve managed Companies for a Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "cha06aro11s33" }, "items": { "$ref": "#/components/schemas/Company-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company_id-managed_companies", "x-stoplight": { "id": "k4p7tg98a8tsp" }, "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ], "description": "Retrieve managed `Companies` for another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`." } }, "/v1/companies/{company-id}/managed_companies/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single managed Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Company-Read", "x-stoplight": { "id": "mc5n3d10ntvthm" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-id", "x-stoplight": { "id": "mc6yvgca2h7jk" }, "x-internal": true, "description": "Retrieve a managed `Company` by ID." }, "put": { "summary": "Create a managed Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Company-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company_id-managed_companies-id", "x-stoplight": { "id": "uk5tyvgca2h7j" }, "x-internal": true, "description": "Create a managed `Company` for another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`.", "requestBody": { "content": { "application/json": {} } } }, "delete": { "summary": "Delete a managed Company", "tags": [ "Companies" ], "responses": { "204": { "description": "No Content", "content": {} }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-managed_companies-id", "x-stoplight": { "id": "w30g0xogp0ptg" }, "description": "Delete a managed `Company` from another `Company`.\n\nThis endpoint requires the `platform_admin` `IamRole`.", "x-internal": true } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/accounts/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Account ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update Account for a Managed Company", "tags": [ "Accounts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Account-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-managed_companies-managed-company-id-accounts-id", "x-stoplight": { "id": "75rfxjepk4523" }, "description": "Update `Account` by ID for a Managed Company\n\nThis endpoint requires the `edit_account` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account-Update" } } } } } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/company_shares": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create CompanyShare for a Managed Company", "tags": [ "CompanyShares" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-managed_companies-managed-company-id-company_shares", "x-stoplight": { "id": "cs1am6pq7v3td" }, "description": "Create a `CompanyShare` for a Managed Company\n\nThis endpoint requires the `create_company_share` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyShare-Create" } } } } }, "get": { "summary": "Retrieve CompanyShares for a Managed Company", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "cs7xk2mn3r9pz" }, "type": "array", "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-company_shares", "x-stoplight": { "id": "mg3ht5cs8w2nr" }, "description": "Retrieve `CompanyShares` for a managed company. This includes both shares sent by the managed company and shares received by the managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[sender_company_id]", "description": "Sender Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[receiver_company_id]", "description": "Receiver Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[between_company_id]", "description": "Between Company ID" }, { "schema": { "$ref": "#/components/schemas/CompanyShareableType" }, "in": "query", "name": "filter[company_shareable_type]", "description": "Company Shareable Type" }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "filter[company_shareable_id]", "description": "Company Shareable ID" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/company_shares/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "CompanyShare ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyShare by ID for a Managed Company", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-company_shares-id", "x-stoplight": { "id": "cs8xk3mn4s0qa" }, "description": "Retrieve `CompanyShare` by ID for a Managed Company" }, "patch": { "summary": "Update CompanyShare for a Managed Company", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-managed_companies-managed-company-id-company_shares-id", "x-stoplight": { "id": "cs9yl4no5t1rb" }, "description": "Update `CompanyShare` by ID for a Managed Company\n\nThis endpoint requires the `edit_company_share` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyShare-Update" } } } } }, "delete": { "summary": "Delete CompanyShare for a Managed Company", "tags": [ "CompanyShares" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-managed_companies-managed-company-id-company_shares-id", "x-stoplight": { "id": "cs0zm5op6u2sc" }, "description": "Delete `CompanyShare` by ID for a Managed Company\n\nThis endpoint requires the `delete_company_share` permission" } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/connected_companies": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve connected Companies for a Managed Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mc1ja95bu9woa" }, "items": { "$ref": "#/components/schemas/Company-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-connected_companies", "x-stoplight": { "id": "mc2yll9l637399" }, "description": "Retrieve connected `Companies` for a Managed `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/connected_companies/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search connected Companies for a Managed Company", "tags": [ "Companies" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mc3wtmifrbwjm" }, "items": { "$ref": "#/components/schemas/Company-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-connected_companies-typeahead", "x-stoplight": { "id": "mc4dv3e80844da" }, "description": "Typeahead search against the `legal_name` property on connected `Companies` for a Managed `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/drivers": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Drivers for a Managed Company", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "dr7yk3mn4s1pq" }, "type": "array", "items": { "$ref": "#/components/schemas/Driver-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-drivers", "x-stoplight": { "id": "dr8zl4op6t2sc" }, "description": "Retrieve `Drivers` for a managed company. This includes both drivers owned by the managed company and drivers shared with the managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-availability" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-show_all" }, { "$ref": "#/components/parameters/filter-date" }, { "$ref": "#/components/parameters/filter-auto_add_ons" }, { "$ref": "#/components/parameters/filter-sender_company_types" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/drivers/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Drivers for a Managed Company", "tags": [ "Typeaheads", "Drivers" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "dr8qn8ow5s2uy" }, "items": { "$ref": "#/components/schemas/Driver-Read-Typeahead" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-drivers-typeahead", "x-stoplight": { "id": "dr9pi7ul3n5xa" }, "description": "Typeahead search against the `first_name` and `last_name` properties on `Drivers` for a managed company. This includes both drivers owned by the managed company and drivers shared with the managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-date" }, { "$ref": "#/components/parameters/filter-availability" }, { "$ref": "#/components/parameters/filter-expiring" }, { "$ref": "#/components/parameters/filter-show_all" }, { "$ref": "#/components/parameters/filter-sender_company_types" }, { "$ref": "#/components/parameters/filter-label_ids" } ], "x-internal": true } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/drivers/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Driver by ID for a Managed Company", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Driver-Read-Show" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-drivers-id", "x-stoplight": { "id": "dr9am5pq7u3td" }, "description": "Retrieve a `Driver` by ID for a Managed Company" } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/equipment": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create Equipment for a Managed Company", "operationId": "post-v1-companies-company-id-managed_companies-managed-company-id-equipment", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "eq8mc9rq2w5xz" }, "description": "Create an `Equipment` for a Managed `Company`\n\nThis endpoint requires the `create_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Equipment-Create" } } } } }, "get": { "summary": "Retrieve Equipment for a Managed Company", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "eq7xk2mn3r9pz" }, "type": "array", "items": { "$ref": "#/components/schemas/Equipment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-equipment", "x-stoplight": { "id": "mg3ht5kp8w2nr" }, "description": "Retrieve `Equipment` for a managed company. This includes both equipment owned by the managed company and equipment shared with the managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-sender_company_ids" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/equipment/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Equipment for a Managed Company", "tags": [ "Typeaheads", "Equipment" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "eq8pm7nw4s1tx" }, "items": { "$ref": "#/components/schemas/Equipment-Read-Typeahead" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-equipment-typeahead", "x-stoplight": { "id": "eq9nh6tk2m4wz" }, "description": "Typeahead search against the `name` and `external_id` properties on `Equipment` for a managed company. This includes both equipment owned by the managed company and equipment shared with the managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-internal": true } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/equipment/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Equipment by ID for a Managed Company", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-equipment-id", "x-stoplight": { "id": "eq8xk3mn4s0qa" }, "description": "Retrieve `Equipment` by ID for a Managed Company" }, "patch": { "summary": "Update Equipment for a Managed Company", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-managed_companies-managed-company-id-equipment-id", "x-stoplight": { "id": "eq9yl4no5t1rb" }, "description": "Update `Equipment` by ID for a Managed Company\n\nThis endpoint requires the `edit_equipment` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Equipment-Update" } } } } }, "delete": { "summary": "Delete Equipment for a Managed Company", "tags": [ "Equipment" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-managed_companies-managed-company-id-equipment-id", "x-stoplight": { "id": "eq0zm5op6u2sc" }, "description": "Delete `Equipment` by ID for a Managed Company\n\nThis endpoint requires the `delete_equipment` permission" } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/equipment_types": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve EquipmentTypes for a Managed Company", "tags": [ "EquipmentType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "mng8eq7tp2xz1" }, "type": "array", "items": { "$ref": "#/components/schemas/EquipmentType-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-equipment_types", "x-stoplight": { "id": "vk9j2mp5nq8r7" }, "description": "Retrieve `EquipmentTypes` for a managed company." } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/equipment_types/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on EquipmentType for a Managed Company", "tags": [ "Typeaheads", "EquipmentType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "mngdtp8qr3xw9" }, "items": { "$ref": "#/components/schemas/EquipmentType-Read-Typeahead" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-equipment_types-typeahead", "x-stoplight": { "id": "75rfxjepk4523" }, "description": "Typeahead search against the `name` property on `EquipmentType` for a managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-internal": true } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/resource_scopes/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "ResourceScope ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete a ResourceScope for a Managed Company", "tags": [ "ResourceScopes" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-managed_companies-managed-company-id-resource_scopes-id", "x-stoplight": { "id": "rs9yl4no5t1rb" }, "description": "Delete a `ResourceScope` for a user in a managed company.\n\nThis endpoint requires the `delete_resource_scope` permission." } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create User for a Managed Company", "operationId": "post-v1-companies-company-id-managed_companies-managed-company-id-users", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "usr3bn8rq9w5uf" }, "description": "Create a `User` for a Managed Company\n\nThis endpoint requires the `create_user` permission", "tags": [ "Users" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User-Create" } } } } }, "get": { "summary": "Retrieve Users for a Managed Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "usr7xk2mn3r9pz" }, "type": "array", "items": { "$ref": "#/components/schemas/User-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-users", "x-stoplight": { "id": "usrht5kp8w2nr" }, "description": "Retrieve `Users` for a managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "schema": { "type": "string", "enum": [ "execute_jobs", "manage_sites", "manage_materials", "manage_equipment", "manage_accounts", "manage_users" ] }, "in": "query", "name": "filter[access]", "description": "User access filter", "allowEmptyValue": true }, { "$ref": "#/components/parameters/filter-iam_roles" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search Users for a Managed Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "usr9yk4no5t1rb" }, "type": "array", "items": { "$ref": "#/components/schemas/User-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-users-typeahead", "x-stoplight": { "id": "usr0zm5op6u2sc" }, "description": "Typeahead search for `Users` in a managed company", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-iam_roles" } ] } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve User by ID for a Managed Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-users-id", "x-stoplight": { "id": "usr8xk3mn4s0qa" }, "description": "Retrieve `User` by ID for a Managed Company" }, "patch": { "summary": "Update User for a Managed Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-managed_companies-managed-company-id-users-id", "x-stoplight": { "id": "usr9yl4no5t1rb" }, "description": "Update `User` by ID for a Managed Company\n\nA `User` can always update their own `Equipment` via the `equipment_id` /`additional_equipment_ids` properties.\n\nAny other updates require the `edit_user` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User-Update" } } } } }, "delete": { "summary": "Delete User for a Managed Company", "tags": [ "Users" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-companies-company-id-managed_companies-managed-company-id-users-id", "x-stoplight": { "id": "usr0zm5op6u2sc" }, "description": "Delete `User` by ID for a Managed Company\n\nThis endpoint requires the `delete_user` permission" } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users/{user-id}/invite/email": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send an Email Invite to a User in a Managed Company", "tags": [ "Users" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "usr1adspcrg3pq" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-managed_companies-managed-company-id-users-user-id-invite-email", "x-stoplight": { "id": "usrhlezr70c8g6" }, "description": "This endpoint sends an Email invite to a `User` in a Managed Company asynchronously.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users/{user-id}/invite/sms": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send an SMS Invite to a User in a Managed Company", "tags": [ "Users" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "usr1sx8dj8kbpae" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-managed_companies-managed-company-id-users-user-id-invite-sms", "x-stoplight": { "id": "usr186ihbacn7w" }, "description": "This endpoint sends an SMS invite to a `User` in a Managed Company asynchronously.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/managed_companies/{managed-company-id}/users/{user-id}/resource_scopes": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Managing Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "managed-company-id", "in": "path", "required": true, "description": "Managed Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a ResourceScope for a User in a Managed Company", "tags": [ "ResourceScopes" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ResourceScope-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-managed_companies-managed-company-id-users-user-id-resource_scopes", "x-stoplight": { "id": "rs8xk3mn4s0qa" }, "description": "Create a `ResourceScope` for a `User` in a managed company.\n\nThis endpoint requires the `create_resource_scope` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResourceScope-Create" } } } } }, "get": { "summary": "Retrieve ResourceScopes for a User in a Managed Company", "tags": [ "ResourceScopes" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "rs7xk2mn3r9pz" }, "items": { "$ref": "#/components/schemas/ResourceScope-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-managed_companies-managed-company-id-users-user-id-resource_scopes", "x-stoplight": { "id": "rsght5kp8w2nr" }, "description": "Retrieve `ResourceScopes` for a `User` in a managed company.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-resource_type" } ] } }, "/v1/companies/{company-id}/material_rates": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a MaterialRate within a Company context", "tags": [ "MaterialRates" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-material_rates", "description": "Create a `MaterialRate` within a specific `Company` context.\n\nThis endpoint requires the `create_material_rate` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialRate-Create" } } } } }, "get": { "summary": "Retrieve MaterialRates that belong to a Company", "tags": [ "MaterialRates" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "n3g0iyrcw3cxs" }, "items": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-material_rates", "x-stoplight": { "id": "km4orqg4khs32" }, "description": "Retrieve `MaterialRates` for a `Company`.\n\n- When retrieving `Company`-default `MaterialRates`, use `filter[default_only]=true`.\n- When retrieving `Customer Account`-specific `MaterialRates`, use `filter[customer_account_id]=customer_account_uuid`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-customer_account_id" }, { "$ref": "#/components/parameters/filter-default_only" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-site_ids" } ] } }, "/v1/companies/{company-id}/material_rates/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on MaterialRates for a Company", "tags": [ "Typeaheads", "MaterialRates" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "5abtl41lpwhjr" }, "items": { "$ref": "#/components/schemas/MaterialRate-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-material_rates-typeahead", "x-stoplight": { "id": "fbdn0euda5mbc" }, "x-internal": true, "description": "`search[site][query]` is a typeahead against the `MaterialRate`'s `Site`'s `name`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-site-query" }, { "$ref": "#/components/parameters/filter-customer_account_id" }, { "$ref": "#/components/parameters/filter-project_id" }, { "$ref": "#/components/parameters/filter-material_id" }, { "$ref": "#/components/parameters/filter-site_id" } ] } }, "/v1/companies/{company-id}/material_types": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve MaterialTypes for a Company", "tags": [ "MaterialType" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "2zt5hjbtzfj22" }, "items": { "$ref": "#/components/schemas/MaterialType-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-material_types", "x-stoplight": { "id": "o8hj5wqbwb6rn" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve `MaterialTypes` for a `Company`" } }, "/v1/companies/{company-id}/materials": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Material for a Company", "tags": [ "Materials" ], "operationId": "post-v1-companies-company-id-materials", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "omi29o8m9tdc4" }, "description": "Create `Materials` for a `Company`\n\nThis endpoint requires the `create_materials` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Material-Create" } } } } }, "get": { "summary": "Retrieve Materials that belong to a Company", "tags": [ "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "7611vnq3mszru" }, "items": { "$ref": "#/components/schemas/Material-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-materials", "x-stoplight": { "id": "a7zdk9y0109my" }, "description": "Retrieve `Materials` for a `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `name`\n * `external_id`\n * `material_type.name`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/{company-id}/materials/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Material for a Company", "tags": [ "Typeaheads", "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Material-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-material-typeahead", "description": "Typeahead search against the `name` property on `Material` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "k2n1ug9xevn42" }, "x-internal": true } }, "/v1/companies/{company-id}/omni_reports": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create Omni Report for a Company", "tags": [ "OmniReports" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-omni_reports", "x-stoplight": { "id": "wz52ohp300noh" }, "x-internal": true, "description": "Create `Omni Report` for a `Company`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OmniReport-Create" } } } } }, "get": { "summary": "Retrieve all Omni Reports that belong to a Company", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ppjtv6kxfiv9d" }, "items": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-omni_reports", "x-stoplight": { "id": "03401h79tzpda" }, "description": "Retrieve `Omni Reports` that belong to `Company` by `ID`.\n\nThis endpoint requires the `view_report` permission.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ] } }, "/v1/companies/{company-id}/omni_reports/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Omni Report ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve embedded link for Omni Report that belongs to a Company", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/OmniReportLink-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-omni_reports-id", "x-stoplight": { "id": "lv9hch2e4ribh" }, "description": "Retrieve embedded link for Omni Report by `ID` that is scoped to a `Company` and their child `Companies`.\n\nThis endpoint requires the `view_report` permission." } }, "/v1/companies/{company-id}/orders": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an Order for a Company", "operationId": "post-v1-companies-company-id-orders", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "jysplq1m6rd9f" }, "description": "Create a new `Order`\n\nThis endpoint requires the `create_order` permission", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Create" } } } } }, "get": { "summary": "Retrieve Orders that belong to a Company", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "8yf3sh1kx0p9d" }, "items": { "$ref": "#/components/schemas/Order-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders", "x-stoplight": { "id": "wyc94gcrgdvqo" }, "description": "Retrieve `Orders` for a `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `company_name`\n * `account_name`\n * `project_name`\n * `order_id`\n * `project_external_id`\n * `dispatch_number`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-department_ids" } ] } }, "/v1/companies/{company-id}/orders/dispatch": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Orders based on Jobs that belong to a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "bcs7kxutifk8q" }, "items": { "$ref": "#/components/schemas/Order-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-dispatch", "x-stoplight": { "id": "gvvtg8qn1vi61" }, "description": "Retrieve `Orders` based on `Jobs` grouped by `Orders` that belong to `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `company_name`\n * `account_name`\n * `project_name`\n * `order_id`\n * `project_external_id`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-foreman_ids" }, { "$ref": "#/components/parameters/filter-job-collaborator_ids" }, { "$ref": "#/components/parameters/filter-job-salesperson_ids" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/sort-created_at" }, { "$ref": "#/components/parameters/sort-load_at" }, { "$ref": "#/components/parameters/sort-friendly_order_id" }, { "$ref": "#/components/parameters/sort-dispatch_number-name" }, { "$ref": "#/components/parameters/sort-account-name" }, { "$ref": "#/components/parameters/sort-company-legal_name" }, { "$ref": "#/components/parameters/filter-job-receivable_invoice-states" }, { "$ref": "#/components/parameters/filter-job-payable_invoice-states" } ], "x-internal": true, "tags": [ "Orders" ] } }, "/v1/companies/{company-id}/orders/dispatch_numbers/faceted_search": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "description": "Company ID", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Search Dispatch Numbers based on the current Dispatch results", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DispatchNumber-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-dispatch_numbers-faceted_search", "description": "Searches `DispatchNumbers` in a typeahead style but instead of all `DispatchNumbers` for a `Company` this returns all `DispatchNumbers` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs that belong to a `Company`.", "parameters": [ { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" } ], "tags": [ "Orders", "Typeaheads" ], "x-internal": false, "x-stoplight": { "id": "fkv07xsabff5n" } } }, "/v1/companies/{company-id}/orders/dispatch_numbers/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "description": "Company ID", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Orders' Dispatch Number by Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "myglff7zr8e8u" }, "items": { "$ref": "#/components/schemas/DispatchNumber-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-dispatch_numbers-typeahead", "x-stoplight": { "id": "2pdlcom6zn9kk" }, "description": "Typeahead search against the `dispatch_number` property on `Orders` by current `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "tags": [ "Orders", "Typeaheads" ], "x-internal": false } }, "/v1/companies/{company-id}/orders/estimate": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Generate estimated Order values", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Order-Estimate-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-orders-estimate", "x-stoplight": { "id": "wzev5ik9bzg0b" }, "x-internal": true, "description": "Generates estimated `Order` values.\n\nOne of `total_loads`, `total_units`, or `truck_quantity` must be set in the request.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Order-Estimate-Create" } } } } } }, "/v1/companies/{company-id}/orders/invoicing": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Retrieve Orders based on Invoices that belong to a Company", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Order-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-invoicing", "x-stoplight": { "id": "4bpcs42vgctto" }, "description": "Retrieve `Orders` based on `Invoices` grouped by `Orders` that belong to `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `company_name`\n * `account_name`\n * `project_name`\n * `order_id`\n * `project_external_id`\n\nInvoice datagrid search (`search[invoice][datagrid]`) queries against the following properties:\n * `job_id`\n * `customer_account_name`\n * `vendor_account_name`\n * `driver_name`\n * `order_id`\n * `order_external_id`\n * `order_name`\n * `project_name`\n * `project_external_id`\n * `dispatch_number_name`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/search-invoice-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/sort-created_at" }, { "$ref": "#/components/parameters/sort-friendly_order_id" }, { "$ref": "#/components/parameters/sort-account-name" }, { "$ref": "#/components/parameters/sort-company-legal_name" }, { "$ref": "#/components/parameters/filter-invoice-start_date" }, { "$ref": "#/components/parameters/filter-invoice-end_date" }, { "$ref": "#/components/parameters/filter-invoice-invoice_category" }, { "$ref": "#/components/parameters/filter-invoice-grouped" }, { "$ref": "#/components/parameters/filter-invoice-invoiceable_type" }, { "$ref": "#/components/parameters/filter-invoice-states" }, { "$ref": "#/components/parameters/filter-invoice-rate_types" }, { "$ref": "#/components/parameters/filter-invoice-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-invoice-customer_account_ids" }, { "$ref": "#/components/parameters/filter-invoice-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-invoice-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-invoice-driver_ids" }, { "$ref": "#/components/parameters/filter-invoice-company_id" }, { "$ref": "#/components/parameters/filter-project_ids" } ], "x-internal": true } }, "/v1/companies/{company-id}/orders/simulate_order": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Simulate an Order", "tags": [ "Orders" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-orders-simulate_order", "x-stoplight": { "id": "4mg6ghr2wll4g" }, "description": "Simulate an `Order` being dispatched and completed", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulateOrder-Create" } } } } } }, "/v1/companies/{company-id}/orders/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Orders by Company", "tags": [ "Orders", "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Order-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-typeahead", "x-stoplight": { "id": "ordtypahead01" }, "description": "Typeahead search against the `order_id` property for `Orders` visible to the currently authenticated `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/orders/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Order for a Company", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-id", "x-stoplight": { "id": "ewtldxjec63ur" }, "description": "Retrieve `Order` by ID", "parameters": [] }, "patch": { "summary": "Update an Order for a Company", "operationId": "patch-v1-companies-company-id-orders-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "mwmh81jx8vehs" }, "description": "Update `Order` by ID\n\nThis endpoint requires the `edit_order` permission _or_ the `edit_order_pre_accept` permission, which only allows editing if the Order is in `created`, `pending_request` or `rejected` state", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Update" } } } }, "tags": [ "Orders" ] } }, "/v1/companies/{company-id}/orders/{order-id}/accept": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Accept an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-accept", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "zrwyocm1ftz2d" }, "tags": [ "Orders" ], "description": "Accept an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for an Order for a Company", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-orders-order-id-auto_add_on_assignments", "x-stoplight": { "id": "5h33djbg21gmm" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for an `Order`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for an Order for a Company", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mb1vbj8e4ha9n" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-auto_add_on_assignments", "x-stoplight": { "id": "rdj0rl8ypn9am" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for an `Order`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/cancel": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Cancel an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-cancel", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "z5lfi0ikmrbq4" }, "description": "Cancel an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/complete": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-complete", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "eba55f66t45l7" }, "description": "Complete an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/copy": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Copy an Order", "tags": [ "Orders" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-orders-order-id-copy", "x-stoplight": { "id": "9u270vs5ed4d7" }, "description": "Copy an existing `Order`.\n\nThis endpoint required the `create_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Copy" } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/default_sites/{waypoint-type}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve default sites for an order, given a waypoint type.", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-default-sites", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve the `Sites` that belong to the default list of an `Order`, given a particular 'WaypointType'.\n", "x-internal": true, "x-stoplight": { "id": "ol22e12bbdlir" } } }, "/v1/companies/{company-id}/orders/{order-id}/default_sites/{waypoint-type}/{site-id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "schema": { "type": "string", "format": "uuid" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Add a site to default site list on order", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-orders-order-id-default_sites-waypoint-type-site-id", "x-stoplight": { "id": "3dklcp6i2iauu" }, "description": "Add a `Site` to the default_site list for an `Order`, given a particular 'WaypointType'.\n\nNote: The underlying site grouping will be created automatically when the first \nsite is added for a given order. ", "x-internal": true }, "delete": { "summary": "Delete a single site from a default list of an order.", "tags": [ "Sites", "Orders" ], "responses": { "204": { "description": "Shared Response" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-companies-company-id-orders-order-id-default_sites-waypoint-type-site-id", "x-stoplight": { "id": "4ge4go0471034" }, "description": "Delete a `Site` to the default_site list for an `Order`, given a particular 'WaypointType'.", "x-internal": true } }, "/v1/companies/{company-id}/orders/{order-id}/driver_sms": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send SMS to a driver of all the Jobs of an Order for a Company", "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-orders-order-id-driver_sms", "description": "Send sms text to `driver` of all `Job`s of an `Order`.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sms-Create" } } } }, "x-stoplight": { "id": "e8gvvvd523kyr" }, "tags": [ "Orders" ] } }, "/v1/companies/{company-id}/orders/{order-id}/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on an Order for a Company", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-orders-order_id-file_attachments", "x-stoplight": { "id": "wio0e2z2gq5wo" }, "description": "Create a `FileAttachment` related to an `Order`. Requires permission to create attachment on `Order`—`create_order_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } }, "tags": [ "FileAttachments" ] }, "get": { "summary": "Retrieve all FileAttachments for a given Order", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "tj07k22i6yxkl" }, "type": "array", "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order_id-file_attachments", "x-stoplight": { "id": "nmvovd2feee9c" }, "description": "Retrieve all `FileAttachments` for a given `Order`", "tags": [ "FileAttachments" ], "parameters": [ { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/hold": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Hold an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-hold", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "tags": [ "Orders" ], "description": "Hold an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "rbrgqqy620o9v" } } }, "/v1/companies/{company-id}/orders/{order-id}/invoices": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Invoices that belong to Jobs on an Order for a Company", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "zcxlexqrcyizh" }, "items": { "$ref": "#/components/schemas/Invoice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "parameters": [ { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-invoice_category" }, { "$ref": "#/components/parameters/filter-grouped" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-invoiceable_type" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/search-datagrid" } ], "operationId": "get-v1-companies-company-id-orders-order-id-invoices", "x-stoplight": { "id": "qw32rcod0crun" }, "description": "Retrieve `Invoices` that are on `Jobs` tied to an `Order` for a specific `Company`. " } }, "/v1/companies/{company-id}/orders/{order-id}/jobs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new Job for an Order for a Company", "operationId": "post-v1-companies-company-id-orders-order-id-jobs", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "9400o3wcii9wm" }, "description": "Create a new `Job` for an `Order`.\n\nThis endpoint requires the `create_job` `IamPermission`.", "tags": [ "Jobs" ] }, "get": { "summary": "Retrieve Jobs that belong to an Order as a specific Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "kkavdgrh212xp" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-jobs", "x-stoplight": { "id": "snoku5s4mh1sp" }, "description": "Retrieve `Jobs` that belong to an `Order` and is visible to the currently authenticated Company.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `order_id`\n * `job_id`\n * `company.legal_name`\n * `account.name`\n * `project.name`\n * `order.dispatch_number`\n * user as driver: `driver.first_name` || `driver.last_name`\n * contact as foreman_contact: `foreman_contact.name` || `foreman_contact.email` || `foreman_contact.phone`\n * contact as collaborator_contact: `collaborator_contact.name` || `collaborator_contact.email` || `collaborator_contact.phone`\n * contact as sales_contact: `sales_contact.name` || `sales_contact.email` || `sales_contact.phone`\n * contact as supervisor_contact: `supervisor_contact.name` || `supervisor_contact.email` || `supervisor_contact.phone`\n\nFilter usage:\n* to filter a single state: `filter[states][]=created`\n* to filter multiple states: `filter[states][]=created&filter[states][]=arrived_dropoff`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-company_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-site_types" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/jobs/invoicing": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs with Invoices that belong to an Order as a specific Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "hl7msyd6powsb" }, "items": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-jobs-invoicing", "x-stoplight": { "id": "6edoizdrhre4k" }, "description": "Retrieve `Jobs` with `Receivable` and `Payable` `Invoices` that belong to an `Order` as a specific `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-company_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-site_types" }, { "$ref": "#/components/parameters/filter-receivable_invoice-states" }, { "$ref": "#/components/parameters/filter-payable_invoice-states" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/loads": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Loads of an Order for a Company", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "k8m2nqp4r5s6t" }, "items": { "$ref": "#/components/schemas/Load-LoadSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-loads", "x-stoplight": { "id": "h7j3k9l2m4n6p" }, "description": "Retrieve `Loads` of an `Order` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-ticket-flagged" }, { "$ref": "#/components/parameters/filter-states-" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-material_ids" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/materials/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Materials that belong to Order's Company", "tags": [ "Orders", "Materials" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "xr3m6ssu8y6ed" }, "items": { "$ref": "#/components/schemas/Material-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-materials-typeahead", "x-stoplight": { "id": "bmjq2ylkh3y25" }, "description": "Typeahead search against the `name` property for `Materials` that belong to the `Order`'s `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/phases": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Order Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Phase-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-phases-index", "x-internal": true, "description": "This returns all the `Phases` for an `Order`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-stoplight": { "id": "mx2hbj8xil8e4" } } }, "/v1/companies/{company-id}/orders/{order-id}/phases/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Order Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mbiku8988m3gn" }, "items": { "$ref": "#/components/schemas/Phase-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-phases-typeahead", "x-stoplight": { "id": "9yvm0chgebcax" }, "description": "Typeahead search against the `name` property for `Phases` for an `Order` visible to a `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/reject": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Reject an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-reject", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "t0ido63x1j73d" }, "description": "Reject an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_reason": { "type": "string", "x-stoplight": { "id": "tn076pj84m0j1" }, "description": "A user-provided reason for rejecting the Order", "maxLength": 100, "minLength": 1, "nullable": true } } } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/request": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Request an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-request", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "pm6auw92yzkyk" }, "tags": [ "Orders" ], "description": "Request an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/sites/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Sites that belong to Order's Company", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "kiktkjftpqqlc" }, "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-sites-typeahead", "x-stoplight": { "id": "mi17lfpvzrzfk" }, "description": "Typeahead search against the `name`, or `external_id` property for `Sites` that belong to the `Order`'s `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-states" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/start": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Start an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-start", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "c03zmt3vtny1i" }, "tags": [ "Orders" ], "description": "Start an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/orders/{order-id}/tickets": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Tickets for an Order for a Company", "tags": [ "Tickets", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-id-tickets", "description": "Retrive `Tickets` for an `Order`.\nFilter usage:\n* to filter a from date: `filter[from_date]`\n* to filter a to date: `filter[to_date]`\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[from_date]", "description": "Start range of ticket.created_at" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[to_date]", "description": "End range of ticket.created_at" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[flagged]", "description": "Filter to only flagged or un-flagged Tickets" }, { "$ref": "#/components/parameters/filter-sources" } ], "x-stoplight": { "id": "sxk44khjpj9h8" } } }, "/v1/companies/{company-id}/orders/{order-id}/tickets/rollup_summary": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Ticket Rollup Summary for an Order for a Company", "tags": [ "Tickets", "Orders" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TicketRollupSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-orders-order-id-id-tickets-rollup-summary", "description": "Retrive `TicketRollupSummary` for an `Order`.\nFilter usage:\n* filter on ticket source: `filter[sources]`\n", "parameters": [ { "$ref": "#/components/parameters/filter-sources" } ], "x-stoplight": { "id": "lrtsaqw83ugg6" } } }, "/v1/companies/{company-id}/orders/{order-id}/timeline": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the Timeline of an Order for a Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OrderTimeline-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-timeline", "description": "Retrieve `Orders`'s Timeline by ID", "parameters": [ { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-limit" } ], "x-stoplight": { "id": "h3e25bbduo3un" } } }, "/v1/companies/{company-id}/orders/{order-id}/travelled_distances": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve TravelledDistances that belong to an Order", "tags": [ "TravelledDistances" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TravelledDistance-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-orders-order-id-travelled_distances", "x-stoplight": { "id": "tdo1order7x9k2" }, "description": "Retrieve `TravelledDistances` that belong to an `Order`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/orders/{order-id}/weather_hold": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Weather Hold an Order for a Company", "operationId": "put-v1-companies-company-id-orders-order-id-weather-hold", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "tags": [ "Orders" ], "description": "Weather Hold an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "gievwgjd2w8eh" } } }, "/v1/companies/{company-id}/projects": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Projects that belong to a Company", "tags": [ "Projects" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Project-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-projects", "x-stoplight": { "id": "jpaq6qohyjyjo" }, "description": "Retrieve `Projects` for a `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `name`\n * `po_job_number`\n * `project_id`\n * `company.legal_name`\n * `account.name`\n * `external_id`\n\n Filter usage:\n* to filter a single state: `filter[states][]=active`\n* to filter multiple states: `filter[states][]=inactive&filter[states][]=active`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "schema": { "type": "array" }, "in": "query", "name": "filter[states]", "description": "Project state filters." }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-account_ids" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-po_job_numbers" }, { "$ref": "#/components/parameters/filter-service_class_ids" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" } ] } }, "/v1/companies/{company-id}/projects/salesperson": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Projects where the current User is a Salesperson", "tags": [ "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ascxooavwuuwg" }, "items": { "$ref": "#/components/schemas/Project-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-projects-salesperson", "x-stoplight": { "id": "xzzypg34v7p8k" }, "description": "Retrieve `Projects` where the current `User` is a `Salesperson`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/projects/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Projects for a Company", "tags": [ "Typeaheads", "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Project-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-projects-typeahead", "description": "Typeahead search against the `name` or `external_id` property on `Projects` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-department_ids" } ], "x-stoplight": { "id": "ovi6a7ram6mq5" }, "x-internal": true } }, "/v1/companies/{company-id}/rates": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Rates that belong to a Company", "tags": [ "Rates" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "oyn7gw9dm9f4c" }, "type": "array", "items": { "x-stoplight": { "id": "4e5upzw9tdyu6" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-rates", "x-stoplight": { "id": "ggaymn5bemkfh" }, "description": "Retrieve `Rates` that belong to a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-account_type" }, { "$ref": "#/components/parameters/filter-driver_id" }, { "$ref": "#/components/parameters/filter-equipment_id" }, { "$ref": "#/components/parameters/filter-include_default" }, { "$ref": "#/components/parameters/filter-owner_type" }, { "$ref": "#/components/parameters/filter-project_id" }, { "$ref": "#/components/parameters/filter-service_id" }, { "$ref": "#/components/parameters/filter-service_class_id" }, { "$ref": "#/components/parameters/filter-equipment_type_id" } ] } }, "/v1/companies/{company-id}/rates/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Rates for a Company", "tags": [ "Typeaheads", "Rates" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "onhkwzg06mag3" }, "items": { "x-stoplight": { "id": "rquoa7vw94df3" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-rates-typeahead", "x-stoplight": { "id": "tw8oczepyv61y" }, "x-internal": true, "description": "Typeahead search on `Rates` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-driver_id" }, { "$ref": "#/components/parameters/filter-equipment_id" }, { "$ref": "#/components/parameters/filter-include_default" }, { "$ref": "#/components/parameters/filter-owner_type" }, { "$ref": "#/components/parameters/filter-project_id" }, { "$ref": "#/components/parameters/filter-service_id" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-service_class_id" }, { "$ref": "#/components/parameters/filter-equipment_type_id" } ] } }, "/v1/companies/{company-id}/report_categories": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Report Category", "tags": [ "OmniReports" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ReportCategory-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-report_categories", "x-stoplight": { "id": "bv9l1v1270tja" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportCategory-Create" } } } }, "description": "Create a `Report Category`", "x-internal": true }, "get": { "summary": "Retrieve ReportCategories for a Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "so1k96amby5td" }, "type": "array", "items": { "$ref": "#/components/schemas/ReportCategory-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-report_categories", "x-stoplight": { "id": "weuz29f764l26" }, "x-internal": true, "description": "Retrieve `ReportCategories` for a `Company`", "tags": [ "OmniReports" ], "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/report_categories/{report-category-id}/omni_reports": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "report-category-id", "in": "path", "required": true, "description": "Report Category ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all OmniReports under a ReportCategory that belong to a Company", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "778lanpype7zi" }, "items": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-report_categories-report-category-id-omni_reports", "x-stoplight": { "id": "9gdf860uxh1k2" }, "description": "Retrieve all `OmniReports` under a `ReportCategory` that belong to a `Company`\n\nThis endpoint requires the `view_report` permission", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/service_classes": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a ServiceClass for a Company.", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-service_class", "description": "Create a `ServiceClass` for a `Company`\n\nThis endpoint requires the `create_service_class` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceClass-Create" } } } }, "x-stoplight": { "id": "yu1piig87i7s9" }, "tags": [ "ServiceClass" ] }, "get": { "summary": "Retrieve Service Classes that belong to a Company", "tags": [ "ServiceClass" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "oig2x0vikd84j" }, "items": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-service_classes", "x-stoplight": { "id": "5ykkjskbilgw9" }, "description": "Retrieve `ServiceClass` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/service_classes/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on ServiceClasses for a Company", "tags": [ "Typeaheads", "ServiceClass" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "vuzb52mhx13uh" }, "items": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company_id-service_classes-typeahead", "x-stoplight": { "id": "xwei45sjrxsa2" }, "description": "Typeahead search against the `name` property on `ServiceClass` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/companies/{company-id}/services": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Services that belong to a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Service-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-services", "x-stoplight": { "id": "l195h5cz2lkf2" }, "description": "Retrieve `Services` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "tags": [ "Services" ] } }, "/v1/companies/{company-id}/services/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Services for a Company", "tags": [ "Typeaheads", "Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Service-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-services-typeahead", "description": "Typeahead search against the `name` property on `Services` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "r0tj9b7du7t90" }, "x-internal": true } }, "/v1/companies/{company-id}/settlements": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Settlement for a Company", "tags": [ "Settlements" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-settlements", "description": "Create a `Settlement` from approved `Invoices` for the specified company", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement-Create" } } } } } }, "/v1/companies/{company-id}/settlements/bulk_create": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Bulk Create Settlements", "tags": [ "Settlements" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-settlements-bulk_create", "x-stoplight": { "id": "ifkdc9k6820h4" }, "description": "Bulk Create `Settlements` for `Customers`, `Vendors` and `Drivers`.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkSettlement-Create" } } } } } }, "/v1/companies/{company-id}/settlements/payables": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve payable Settlements visible to a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "i6vzymuu302mc" }, "items": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-settlements-payables", "x-stoplight": { "id": "pkvgp8wknoiqs" }, "description": "Retrieve payable `Settlements` visible to a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/sort-created_at" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/{company-id}/settlements/receivables": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve receivable Settlements visible to a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "3wjskwjrh0nc4" }, "items": { "$ref": "#/components/schemas/Settlement-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-settlements-receivables", "x-stoplight": { "id": "ls3p88yevhoia" }, "description": "Retrieve receivable `Settlements` visible to a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/sort-created_at" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/companies/{company-id}/settlements/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Settlement for a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-id", "description": "Retrieve a `Settlement` by ID for the specified company" } }, "/v1/companies/{company-id}/settlements/{settlement-id}/add_on_charges": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOnCharge for a Settlement (company-scoped)", "tags": [ "AddOnCharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-settlements-settlement-id-add-on-charges", "description": "Create an `AddOnCharge` for a `Settlement` within a specific company scope.\n\nThis endpoint is used to apply an `AddOnCharge` for a `Settlement`.", "x-internal": true, "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Create" } } } } }, "get": { "summary": "Retrieve AddOnCharges for a Settlement (company-scoped)", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-add-on-charges", "x-internal": true, "description": "Retrieve `AddOnCharges` for a `Settlement` within a specific company context.\n\nThis endpoint returns the applied `AddOnCharges` for a `Settlement` and validates that the company_id is authorized for the current user.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update AddOnCharges for a Settlement (Company-scoped)", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-companies-company-id-settlements-settlement-id-add-on-charges", "x-internal": true, "description": "Batch update `AddOnCharges` for a `Settlement` using company-scoped endpoint.\n\nThis endpoint allows parent companies to manage add-on charges for settlements belonging to their child companies.\n\nThis endpoint allows updating, creating, deleting `AddOnCharges` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\ne.g.\n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf creating new records:\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nadd_on_charges: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5,\n \"add_on_rate_type\": \"RateForEach\"\n },\n {\n \"percentage\": 10,\n \"add_on_rate_type\": \"RatePercentOfTotal\"\n }\n]\n```\n\nIf deleting exisitng records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "add_on_charges": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/AddOnCharge-Create" }, { "$ref": "#/components/schemas/AddOnCharge-Update-Destroyable" } ] } } } } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-approve", "x-stoplight": { "id": "wl5hgxeou1fug" }, "x-internal": true, "description": "Approve a `Settlement` by ID as a `Company`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/customer_pay": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Settlement as the Customer for a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-customer_pay", "description": "Pay a `Settlement` as the `Customer` by ID for a `Company`", "tags": [ "Settlements" ], "x-internal": true } }, "/v1/companies/{company-id}/settlements/{settlement-id}/email_settlement": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Email a Settlement (Company-scoped)", "tags": [ "Settlements" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-email_settlement", "x-internal": true, "description": "Email a `Settlement` using company-scoped endpoint\n\nThis requires `edit_settlement` permission.\n\nThis endpoint allows parent companies to email settlements for their child companies.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/EmailSettlement-Create" } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/export": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Export Settlement to Agave", "tags": [ "Settlements" ], "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-settlements-settlement-id-export", "x-stoplight": { "id": "k8m2v5rqx9p1a" }, "description": "Export a Settlement to Agave. The export is performed asynchronously.", "x-internal": true } }, "/v1/companies/{company-id}/settlements/{settlement-id}/invoices": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Get Invoices for a Settlement for a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-invoices", "description": "Get `Invoices` for a `Settlement` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/settlements/{settlement-id}/loads": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Loads of a Settlement", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Load-LoadSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-loads", "description": "Retrieve `Loads` of all `Orders` belonging to a `Settlement`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-ticket-flagged" }, { "$ref": "#/components/parameters/filter-states-" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-material_ids" } ] } }, "/v1/companies/{company-id}/settlements/{settlement-id}/pay": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-pay", "x-internal": true, "description": "Pay a `Settlement` by ID as a `Company`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/rebill": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Rebill a Settlement for a Company", "tags": [ "Settlements" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-companies-company-id-settlements-settlement-id-rebill", "description": "Create a new `Settlement` from a voided `Settlement` for a `Company`", "x-internal": true } }, "/v1/companies/{company-id}/settlements/{settlement-id}/send_settlement": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-send_settlement", "x-internal": true, "description": "Send a `Settlement` by ID as a `Company`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/settlement_email_deliveries": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Get SettlementEmailDeliveries for a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SettlementEmailDelivery-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-settlement_email_deliveries", "x-internal": true, "description": "Get `SettlementEmailDeliveries` for a `Settlement` as a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/settlements/{settlement-id}/settlement_line_items": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all SettlementLineItems that belongs to a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SettlementLineItem-Group-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-settlement_line_items", "x-internal": true, "description": "Retrieve all `SettlementLineItems` that belongs to a `Settlement` as a `Company`.\n\nNotes:\n- if the `Settlement`'s configuration has no grouping, then the array response would just contain a single grouped result without the `group` field and the `line_items` would be all the line items.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "settlement_line_item_type", "description": "Override `Settlement`'s `settlement_line_item_type` for rendering `SettlementLineItems`. See `SettlementLineItemType` enum for values." } ], "requestBody": { "content": {} } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/tickets": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Tickets for a Settlement for a Company", "tags": [ "Tickets" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-settlements-settlement-id-tickets", "x-stoplight": { "id": "m7n8o9p0q1r2s" }, "x-internal": true, "description": "Retrieve `Tickets` for a `Settlement`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/settlements/{settlement-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Settlement as a Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-unapprove", "x-stoplight": { "id": "e2rjh9sk7jp2n" }, "description": "Unapprove a `Settlement` by ID as a `Company`", "tags": [ "Settlements" ], "x-internal": true } }, "/v1/companies/{company-id}/settlements/{settlement-id}/undo_pay": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Undo pay on a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-undo-pay", "x-stoplight": { "id": "k8m2nv4xr7p1q" }, "x-internal": true, "description": "Undo pay on a `Settlement` by ID as a `Company`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/companies/{company-id}/settlements/{settlement-id}/void": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Void a Settlement as a Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-companies-company-id-settlements-settlement-id-void", "x-internal": true, "description": "Void a `Settlement` by ID as a `Company`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "void_reason": { "type": "string", "nullable": true } } } } } } } }, "/v1/companies/{company-id}/sites": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Sites that belong to a Company", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-sites", "x-stoplight": { "id": "9awynfd74xo81" }, "description": "Retrieve `Sites` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-site_types" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-sender_company_ids" } ] } }, "/v1/companies/{company-id}/sites/dispatch": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Retrieve Sites based on the current Dispatch results for a Company", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-sites-dispatch-index", "description": "Returns `Sites`, but instead of all `Sites` for a `Company` this returns all `Sites` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs that belong to a `Company`.", "parameters": [ { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" }, { "$ref": "#/components/parameters/facet-filter-waypoint-type" } ], "x-stoplight": { "id": "4sw2sqdp0ofig" } } }, "/v1/companies/{company-id}/sites/dispatch/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Sites based on the current Dispatch results for a Company", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "8y3ie0nhvchzr" }, "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-sites-dispatch-typeahead", "x-stoplight": { "id": "ln1vlnl01hf87" }, "description": "Returns `Sites` in a typeahead style but instead of all `Sites` for a `Company` this returns all `Sites` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs that belong to a `Company`.", "parameters": [ { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" }, { "$ref": "#/components/parameters/facet-filter-waypoint-type" } ] } }, "/v1/companies/{company-id}/sites/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Sites for a Company", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-site-typeahead", "description": "Typeahead search against the `name`, or `external_id` property on `Sites` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-site_types" } ], "x-stoplight": { "id": "xbth42mtawc3k" }, "x-internal": true } }, "/v1/companies/{company-id}/sites/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Site for a Company", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-sites-id", "description": "Retrieve a `Site` by ID for a `Company`" } }, "/v1/companies/{company-id}/sites/{site-id}/additional_geofences": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve additional geofences for a Site", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-sites-site_id-additional_geofences", "description": "Retrieve additional `geofences` for a `Site` by `site_id`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/sites/{site-id}/contacts": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Contacts for a Site within a Company", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Contact-Read-Nested" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-sites-site-id-contacts", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve all `Contacts` for a `Site` within a specific `Company`. This endpoint includes explicit company-level authorization to ensure the site belongs to the specified company." } }, "/v1/companies/{company-id}/sites/{site-id}/stats": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve SiteEquipmentStats for given Site", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/SiteEquipmentStats-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-site-id-stats", "x-stoplight": { "id": "qh30wcbj1agpo" }, "description": "Retrieve `SiteEquipmentStats` for given `Site` by `ID`." } }, "/v1/companies/{company-id}/tickets": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Tickets that belong to a Company", "tags": [ "Tickets" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "pyvvst6d54d5t" }, "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-companies-company-id-tickets", "x-stoplight": { "id": "zdk5o9cvbnl7t" }, "description": "Retrieve `Tickets` that belong to a `Company` by `ID`\n\nFilter usage:\n* to filter a from date: `filter[from_date]`\n* to filter a to date: `filter[to_date]`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string", "format": "date-time" }, "in": "query", "name": "filter[from_date]", "description": "Start range of ticket.created_at" }, { "schema": { "type": "string", "format": "date-time" }, "in": "query", "name": "filter[to_date]", "description": "End range of ticket.created_at" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[flagged]", "description": "Filter to only flagged or un-flagged Tickets" }, { "$ref": "#/components/parameters/filter-sources" } ] } }, "/v1/companies/{company-id}/twilio_integrations": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve TwilioIntegrations that belong to a Company", "tags": [ "TwilioIntegrations" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "t4j8k2m6n9p1q" }, "items": { "$ref": "#/components/schemas/TwilioIntegration-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-twilio-integrations", "x-stoplight": { "id": "v2x5y8z1a3b4c" }, "description": "Retrieve `TwilioIntegration`s for a `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/companies/{company-id}/twilio_integrations/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "TwilioIntegration ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single TwilioIntegration", "tags": [ "TwilioIntegrations" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/TwilioIntegration-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-twilio-integrations-id", "x-stoplight": { "id": "d5e7f9g1h3i4j" }, "description": "Retrieve a single `TwilioIntegration` by ID", "x-internal": true } }, "/v1/companies/{company-id}/users": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Users that belong to a Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "609yciwdv8wfy" }, "items": { "$ref": "#/components/schemas/User-Read", "x-stoplight": { "id": "0cb21ff0w1taw" } } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-users", "description": "Retrieve `Users` for a `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `first_name`\n * `last_name`\n * `email`\n * `phone`\n * `company.legal_name`\n * `iam_roles.name`\n\nNote:\n- `filter[iam_roles]` array are applied as `OR` in the query", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "schema": { "type": "string", "enum": [ "execute_jobs", "manage_sites", "manage_materials", "manage_equipment", "manage_accounts", "manage_users" ] }, "in": "query", "name": "filter[access]", "description": "User access filter", "allowEmptyValue": true }, { "$ref": "#/components/parameters/filter-iam_roles" } ], "x-internal": false } }, "/v1/companies/{company-id}/users/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Users for a Company", "tags": [ "Typeaheads", "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/User-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-company-id-users-typeahead", "description": "Typeahead search against the `first_name` and `last_name` property on `Users` for a `Company`.\n\nNote:\n- `filter[iam_roles]` array are applied as `OR` in the query", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-iam_roles" } ], "x-stoplight": { "id": "1m1zvo5unnm6v" }, "x-internal": true } }, "/v1/companies/{company-id}/users/{user-id}/compliance_documents": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" } ], "post": { "summary": "Create Compliance Document for User", "operationId": "post-user-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Create" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create Compliance Document for User" }, "get": { "summary": "List Compliance Documents for User", "operationId": "get-user-compliance-documents", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ComplianceDocument-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "List Compliance Documents for User" } }, "/v1/companies/{company-id}/users/{user-id}/compliance_documents/checklist": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" } ], "get": { "summary": "Get Compliance Checklist for User", "operationId": "get-user-compliance-checklist", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "compliance_document_type": { "$ref": "#/components/schemas/ComplianceDocumentType-Read-Nested" }, "compliance_document": { "nullable": true, "allOf": [ { "$ref": "#/components/schemas/ComplianceDocument-Read-Nested" } ] } } } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Get Compliance Checklist for User" } }, "/v1/companies/{company-id}/users/{user-id}/compliance_documents/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "company-id", "in": "path", "required": true, "description": "Company ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "ID" } ], "get": { "summary": "Show Compliance Document for User", "operationId": "get-user-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Show Compliance Document for User" }, "patch": { "summary": "Update Compliance Document for User", "operationId": "patch-user-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceDocument-Update" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ComplianceDocument-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update Compliance Document for User" }, "delete": { "summary": "Delete Compliance Document for User", "operationId": "delete-user-compliance-document", "tags": [ "ComplianceDocuments" ], "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "description": "Delete Compliance Document for User" } }, "/v1/companies/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Company ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Company-Read", "x-stoplight": { "id": "ojn3d10ntvthm" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-companies-id", "description": "Retrieve a `Company` by ID", "tags": [ "Companies" ], "x-internal": true }, "patch": { "summary": "Update a Company", "operationId": "patch-v1-companies-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Company-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update a `Company` by ID\n\nThis endpoint requires the `edit_company` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Company-Update" } } }, "description": "Note that all parameters are optional - a caller need only provide the `Company` fields that they wish to change." }, "tags": [ "Companies" ] }, "delete": { "summary": "Delete a Company", "operationId": "delete-v1-companies-id", "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-internal": true, "description": "Delete a `Company` by ID\n\nThis endpoint requires the `delete_company` permission", "tags": [ "Companies" ] } }, "/v1/company_shares/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "CompanyShare ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single CompanyShare", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-company_shares-id", "x-stoplight": { "id": "bnhvalwgp0rh8" }, "description": "Retrieve a single `CompanyShare` by ID." }, "patch": { "summary": "Update a CompanyShare", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-company_shares-id", "x-stoplight": { "id": "ld064lptzqxqb" }, "description": "Deprecated in favor of \"Update a `CompanyShare` as a `Company`\"\n\nUpdate a `CompanyShare`.\n\nThis endpoint requires the `edit_company_share` permission.\n\nNote that `external_id` can only be updated by the receiver `Company`.", "deprecated": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyShare-Update" } } } } }, "delete": { "summary": "Delete a CompanyShare", "tags": [ "CompanyShares" ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-company_shares-id", "x-stoplight": { "id": "mo3eszophj6ef" }, "description": "Deprecated in favor of \"Delete a `CompanyShare` as a `Company`\"\n\nDelete a `CompanyShare`.\n\nThis endpoint requires the `delete_companyshare` permission.", "deprecated": true } }, "/v1/departments": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new Department", "tags": [ "Departments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Department-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-departments", "x-stoplight": { "id": "pwhfw67oggcdb" }, "description": "Create a new `Department`\n\nThis endpoint requires the `create_department` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Department-Create" } } } } }, "get": { "summary": "Retrieve Departments that belong to the current Company", "tags": [ "Departments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "tck50h4pd5bb9" }, "items": { "$ref": "#/components/schemas/Department-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-departments", "x-stoplight": { "id": "96sxgxn4l0tnu" }, "description": "Retrieve `Department`s that belong to the current `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/departments/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Department ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Department", "tags": [ "Departments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Department-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-departments-id", "x-stoplight": { "id": "kkmsbvpbg2zqx" }, "description": "Retrieve a single `Department` by ID" }, "patch": { "summary": "Update a Department", "tags": [ "Departments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Department-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-departments-id", "x-stoplight": { "id": "iarm3eocex2yj" }, "description": "Update `Department` by ID\n\nThis endpoint requires the `edit_department` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Department-Update" } } } } }, "delete": { "summary": "Delete a Department", "tags": [ "Departments" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-departments-id", "x-stoplight": { "id": "tdpc9bo2kznwq" }, "description": "Delete a `Department` by ID\n\nThis endpoint requires the `delete_department` permission" } }, "/v1/direct_uploads": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a DirectUpload", "tags": [ "FileAttachments", "Tickets", "Companies" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DirectUpload-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-direct_uploads", "x-stoplight": { "id": "tgme583womicv" }, "description": "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.", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectUpload-Create" } } } } } }, "/v1/driver_days": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve DriverDays visible to the current Company", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "gvub16iv90oha" }, "type": "array", "items": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-driver_days", "x-stoplight": { "id": "wasghj2ffk5wh" }, "x-internal": true, "description": "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`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/sort-driver_day_date" }, { "$ref": "#/components/parameters/sort-driver-first_name" }, { "$ref": "#/components/parameters/sort-driver-last_name" }, { "$ref": "#/components/parameters/sort-vendor_account-name" } ] } }, "/v1/driver_days/{driver-day-id}/add_on_charges": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOnCharge for a DriverDay", "tags": [ "AddOnCharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-driver_days-driver-day-id-add-on-charges", "x-stoplight": { "id": "wm44acbempsgf" }, "x-internal": true, "description": "Create an `AddOnCharge` for a `DriverDay`.\n\nThis endpoint is used to apply an `AddOnCharge` for a `DriverDay`.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Create" } } } } }, "get": { "summary": "Retrieve AddOnCharges for a DriverDay", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "62s6gniyoshoe" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-add-on-charges", "x-stoplight": { "id": "6avwghey9t7mc" }, "x-internal": true, "description": "Retrieve `AddOnCharges` for a `DriverDay`.\n\nThis endpoint returns the applied `AddOnCharges` for a `DriverDay`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update AddOnCharges for a DriverDay", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "exyacbi5mph15" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-driver_days-driver-day-id-add-on-charges", "x-stoplight": { "id": "xuuovaurs6pkh" }, "x-internal": true, "description": "Batch update `AddOnCharges` for a `DriverDay`\n\nThis endpoint allows updating, creating, deleting `AddOnCharges` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\ne.g.\n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf creating new records:\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nadd_on_charges: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5,\n \"add_on_rate_type\": \"RateForEach\"\n },\n {\n \"percentage\": 10,\n \"add_on_rate_type\": \"RatePercentOfTotal\"\n }\n]\n```\n\nIf deleting exisitng records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "add_on_charges": { "type": "array", "x-stoplight": { "id": "rm6mgg6xcn0eu" }, "items": { "x-stoplight": { "id": "4wfwplap5xusm" }, "anyOf": [ { "$ref": "#/components/schemas/AddOnCharge-Create" }, { "$ref": "#/components/schemas/AddOnCharge-Update-Destroyable" } ] } } } } } } } } }, "/v1/driver_days/{driver-day-id}/approval_status": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "Driver Day Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalStatus for a Driver Day", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Approval-Status" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver-days-driver-day-id-driver_status", "description": "Deprecated in favor of \"Retrieve `ApprovalStatus` for a visible `DriverDay` for a Company\"\n\nRetrieve `ApprovalStatus` for a visible `DriverDay`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "2nvlpn1o4537v" }, "deprecated": true } }, "/v1/driver_days/{driver-day-id}/approvals": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "Driver Day Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a Driver Day", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-driver-days-driver-day-id-driver_day_approvals", "description": "Deprecated in favor of \"Retrieve `ApprovalAssignments` for a `DriverDay` as a `Company`\"\n\nRetrieve all `ApprovalAssignments` visible to your `Company` for a `DriverDay`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "f3xryhg69wok0" }, "deprecated": true } }, "/v1/driver_days/{driver-day-id}/approve": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a DriverDay", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-driver-days-id-approve", "description": "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.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } }, "x-stoplight": { "id": "ugmeav46tzydy" }, "security": [], "tags": [ "DriverDays" ], "deprecated": true } }, "/v1/driver_days/{driver-day-id}/file_attachments": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "Driver Day ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on a DriverDay", "tags": [ "FileAttachments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-driver_days-driver-day-id-file_attachments", "x-stoplight": { "id": "8nu308410yk0c" }, "description": "Create a `FileAttachment` related to a `DriverDay`. Requires permission to create attachment on `DriverDay`—`create_driver_day_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "parameters": [], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } } }, "get": { "summary": "Retrieve all FileAttachments for a given DriverDay", "tags": [ "FileAttachments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "gd8jklxjcxcvl" }, "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-file_attachments", "x-stoplight": { "id": "2wcbb9rjtaj7i" }, "description": "Retrieve all `FileAttachments` for a given `DriverDay`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ] } }, "/v1/driver_days/{driver-day-id}/jobs": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs that belong to a DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "xyy8veijv11t2" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-jobs", "x-stoplight": { "id": "k91pou38hfwe4" }, "x-internal": true, "description": "Retrieve `Jobs` that belong to a `DriverDay`", "deprecated": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/driver_days/{driver-day-id}/payable": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Payable Invoice for a given DriverDay", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-payable", "x-stoplight": { "id": "5jis0xgcq54ht" }, "x-internal": true, "description": "Retrieve a `Payable Invoice` for a given `DriverDay`." } }, "/v1/driver_days/{driver-day-id}/phases/typeahead": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on DriverDay Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "b4vaf80v7nxjv" }, "items": { "$ref": "#/components/schemas/Phase-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-phases-typeahead", "x-stoplight": { "id": "zsflkez4xes2j" }, "x-internal": true, "description": "Typeahead search against the `name` property for `Phases` for a `DriverDay` visible to the currently authenticated `Company`.\n\nThis returns all the `Phases` across `Orders` for the `Jobs` that are in a `DriverDay`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/driver_days/{driver-day-id}/resource_usage_logs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a ResourceUsageLog for a DriverDay", "tags": [ "ResourceUsageLogs" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-driver_days-driver-day-id-resource_usage_logs", "x-stoplight": { "id": "dz5kbwhr7dq3v" }, "description": "Create a `ResourceUsageLog` for a `DriverDay`.\n\nThis endpoint requires the `create_resource_usage_log` `IamPermission`.\n\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/ResourceUsageLog-Create" } } } } }, "get": { "summary": "Retrieve ResourceUsageLogs that belong to a DriverDay", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "4l168dt2n6x17" }, "items": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-driver-day-id-resource_usage_logs", "x-stoplight": { "id": "qg99g6th70tnc" }, "description": "Retrieve `ResourceUsageLogs` that belong to a `DriverDay`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update ResourceUsageLogs for a DriverDay", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "f0b5tqify2g35" }, "items": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-driver_days-driver-day-id-resource_usage_logs", "x-stoplight": { "id": "oge2awwb9vg9t" }, "x-internal": true, "description": "Batch update `ResourceUsageLogs` for a `DriverDay`\n\nThis endpoint requires:\n- `create_resource_usage_log` `IamPermission` for create\n- `edit_resource_usage_log` `IamPermission` for update\n- `delete_resource_usage_log` `IamPermission` for delete", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "resource_usage_logs" ], "properties": { "resource_usage_logs": { "type": "array", "x-stoplight": { "id": "vd66sa3dy0b8v" }, "items": { "x-stoplight": { "id": "a2tc4eykvyp80" }, "anyOf": [ { "$ref": "#/components/schemas/ResourceUsageLog-Create" }, { "$ref": "#/components/schemas/ResourceUsageLog-Update-Destroyable" } ] } } } } } } } } }, "/v1/driver_days/{driver-day-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-day-id", "in": "path", "required": true, "description": "DriverDay Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a DriverDay", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-driver-days-id-unapprove", "description": "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.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "security": [], "x-stoplight": { "id": "8s60tcrkp5dpp" }, "tags": [ "DriverDays" ], "deprecated": true } }, "/v1/driver_days/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "DriverDay ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-driver_days-id", "x-stoplight": { "id": "zth8xjubunp99" }, "x-internal": true, "description": "Retrieve `DriverDay` by ID" }, "patch": { "summary": "Update a DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-driver_days-id", "x-stoplight": { "id": "i4u9rhhhslct5" }, "x-internal": true, "description": "Update a `DriverDay` by ID", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DriverDay-Update" } } } } } }, "/v1/drivers/{driver-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for a Driver", "responses": { "201": { "description": "Created", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-drivers-driver-id-auto_add_on_assignments", "x-stoplight": { "id": "gpplt50s4ratm" }, "description": "Create `AutoAddOnAssignment` for a `Driver`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } }, "tags": [ "AutoAddOnAssignments" ] }, "get": { "summary": "Get AutoAddOnAssignments for a Driver", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "dltpky6py8r7v" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-drivers-driver-id-auto_add_on_assignments", "x-stoplight": { "id": "huuaz4g6borkb" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for a `Driver`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "tags": [ "AutoAddOnAssignments" ] } }, "/v1/drivers/{driver-id}/auto_add_ons": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve AutoAddOns for a Driver", "tags": [ "AddOns" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "0fugxh6ieixfm" }, "items": { "$ref": "#/components/schemas/AddOn-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-drivers-driver-id-auto_add_ons", "x-stoplight": { "id": "v45j700v4mjgo" }, "description": "Retrieve `AutoAddOns` for a `Driver`", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "deprecated": true } }, "/v1/drivers/{driver-id}/auto_add_ons/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "AddOn ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete AutoAddOn for a Driver", "tags": [ "AddOns" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-drivers-driver-id-auto_add_ons-id", "x-stoplight": { "id": "4y3lveq5ipi71" }, "x-internal": true, "description": "Delete `AutoAddOn` for a `Driver`" } }, "/v1/drivers/{driver-id}/company_shares": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyShares for a Driver", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "vr8hf4nu24td9" }, "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-drivers-driver-id-company_shares", "x-stoplight": { "id": "5fzbcj492p0he" }, "description": "Retrieve `CompanyShares` for a `Driver`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/drivers/{driver-id}/driver_state/off_duty": { "parameters": [ { "schema": { "type": "string" }, "name": "driver-id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update a Driver's State to off_duty", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverStateEvent-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-drivers-driver-id-driver_state-off_duty", "x-stoplight": { "id": "6gzx2pe70t1d7" }, "description": "Update the status of a `driver` to `off_duty`.\n\nThis endpoint requires the `edit_user` permission." } }, "/v1/drivers/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Driver ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Driver by ID", "tags": [ "Drivers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Driver-Read-Show" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-drivers-id", "x-stoplight": { "id": "9xieixne0b707" }, "description": "Deprecated in favor of \"Retrieve a `Driver` by ID for a `Company`\"\n\nRetrieve a `Driver` by ID", "deprecated": true } }, "/v1/equipment": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an Equipment in the current Company", "operationId": "post-v1-equipment", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "ua1i3uzw7m2oh" }, "description": "Create an `Equipment` in the current `Company`\n\nThis endpoint requires the `create_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Equipment-Create" } } } } }, "get": { "summary": "Retrieve a list of Equipment", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "gsyxnf632qz6r" }, "items": { "$ref": "#/components/schemas/Equipment-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment", "x-stoplight": { "id": "1qsr8l6g7yebg" }, "description": "Retrieve `Equipment` visible to a `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `external_id`\n * `license_number`\n * `name`\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-label_ids" } ], "deprecated": true } }, "/v1/equipment/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Equipment", "tags": [ "Typeaheads", "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Equipment-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment-typeahead", "description": "Typeahead search against the `name` property for `Equipment` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-dispatchable" }, { "$ref": "#/components/parameters/filter-shared" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" } ], "x-stoplight": { "id": "d0zb2trrtqlx5" }, "deprecated": true } }, "/v1/equipment/{equipment-id}/activate": { "parameters": [ { "schema": { "type": "string" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Activate an Equipment", "operationId": "put-v1-equipment-equipment-id-activate", "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "af5z6dxvgjx9c" }, "description": "Activate an `Equipment`\n\nThis endpoint requires the `edit_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/equipment/{equipment-id}/company_shares": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyShares for an Equipment", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "q999ofuzlh6t6" }, "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment-equipment-id-company_shares", "x-stoplight": { "id": "bti38ji5bxios" }, "description": "Retrieve `CompanyShares` for an `Equipment`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/equipment/{equipment-id}/deactivate": { "parameters": [ { "schema": { "type": "string" }, "name": "equipment-id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Deactivate an Equipment", "operationId": "put-v1-equipment-equipment-id-deactivate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "mfzw7sn0rkveq" }, "description": "Deactivate an `Equipment`\n\nThis endpoint requires the `edit_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/equipment/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Equipment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Equipment", "tags": [ "Equipment" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment-id", "x-stoplight": { "id": "i4t2xnzra6464" }, "description": "Deprecated in favor of \"Retrieve `Equipment` by ID for a `Company`\"\n\nRetrieve an `Equipment` by ID", "deprecated": true }, "patch": { "summary": "Update an Equipment", "operationId": "patch-v1-equipment-id", "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "zrwuiu29hbut1" }, "tags": [ "Equipment" ], "description": "Update `Equipment` by ID\n\nThis endpoint required the `edit_equipment` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Equipment-Update" } } } } }, "delete": { "summary": "Delete an Equipment", "operationId": "delete-v1-equipment-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "0bvmojmgiys2o" }, "description": "Delete an `Equipment`\n\nThis endpoint required the `delete_equipment` permission", "tags": [ "Equipment" ] } }, "/v1/equipment_types": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an EquipmentType in the current Company", "operationId": "post-v1-equipment_types", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/EquipmentType-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "eg4775ynrvd3o" }, "tags": [ "EquipmentType" ], "description": "Create an `EquipmentType` in the current `Company`\n\nThis endpoint requires the `create_equipment_type` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EquipmentType-Create" } } } } } }, "/v1/equipment_types/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on EquipmentType", "tags": [ "Typeaheads", "EquipmentType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "1s1jka3l1rifj" }, "items": { "$ref": "#/components/schemas/EquipmentType-Read-Typeahead" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment_types-typeahead", "x-stoplight": { "id": "yc1b9hgq4r0g2" }, "x-internal": true, "description": "Typeahead search against the `name` property for `EquipmentType` visible to the currently authenticated `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/equipment_types/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "EquipmentType ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single EquipmentType", "tags": [ "EquipmentType" ], "responses": { "200": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/EquipmentType-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-equipment_types-id", "x-stoplight": { "id": "fdtjgh52xfv7x" }, "description": "Retrieve `EquipmentType` by `ID`" }, "patch": { "summary": "Update an EquipmentType", "tags": [ "EquipmentType" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/EquipmentType-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-equipment_types-id", "x-stoplight": { "id": "j18zhg6jcgfne" }, "description": "Update `EquipmentType` by ID\n\nThis endpoint requires the `edit_equipment_type` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EquipmentType-Update" } } } } }, "delete": { "summary": "Delete an EquipmentType", "tags": [ "EquipmentType" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-equipment_types-id", "x-stoplight": { "id": "fbm0zg8dc8kr5" }, "description": "Delete `EquipmentType` by ID\n\nThis endpoint requires the `delete_equipment_type` permission" } }, "/v1/file_attachments/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "The ID of the file attachment you're operating on " }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a FileAttachment by ID", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-file_attachments-file_attachment_id", "x-stoplight": { "id": "flpyoj876qp2p" }, "description": "Read a specific `FileAttachment`", "tags": [ "FileAttachments" ] }, "patch": { "summary": "Update a FileAttachment by ID", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-file_attachments-file_attachment_id", "x-stoplight": { "id": "am4r9ekeskla9" }, "description": "Update `FileAttachment` by ID. Requires permission to edit attachment on a particular object: \n\nFor Projects: `edit_project_attachments`\\\nFor Orders: `edit_order_attachments`\\\nFor Jobs: `edit_job_attachments`\\\nFor Loads: `edit_load_attachments`\\\nFor Driver Days: `edit_driver_day_attachments`\\\nFor Settlements: `edit_settlement_attachments`\\\n\nDrivers and Foremen that have this permission, can only edit `FileAttachments` that they have added.", "tags": [ "FileAttachments" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Update" } } } } }, "delete": { "summary": "Delete a FileAttachment by ID", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-file_attachments-file_attachment_id", "x-stoplight": { "id": "tgfqi473ukd0j" }, "description": "Delete `FileAttachment` by ID. Requires permission to delete attachment on a particular object: \n\nFor Projects: `delete_project_attachments`\\\nFor Orders:`delete_order_attachments`\\\nFor Jobs: `delete_job_attachments`\\\nFor Loads: `delete_load_attachments`\\\nFor Driver Days: `delete_driver_day_attachments`\\\nFor Settlements: `delete_settlement_attachments`\\\n\nDrivers and Foremen that have this permission, can only delete `FileAttachments` that they have added.", "tags": [ "FileAttachments" ] } }, "/v1/foremen/{foreman-id}/company_shares": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "foreman-id", "in": "path", "required": true, "description": "Foreman ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyShares for a Foreman", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "snkrv3k6x25sh" }, "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-foremen-foreman-id-company_shares", "x-stoplight": { "id": "hyuvlw1dlry8q" }, "description": "Retrieve `CompanyShares` for a `Foreman`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/fuel_price_indices/{fuel-price-index-id}/fuel_prices": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "fuel-price-index-id", "in": "path", "description": "FuelPriceIndex ID", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FuelPrice for a FuelPriceIndex", "tags": [ "FuelSurcharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelPrice-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-fuel_price_indices-fuel-price-index-id-fuel_prices", "x-stoplight": { "id": "c3iujyj14m2yk" }, "description": "Create a `FuelPrice` for a `FuelPriceIndex`\n\nThis endpoint requires the `create_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelPrice-Create" } } } } }, "get": { "summary": "Retrieve Fuel Prices that belong to a FuelPriceIndex", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "xud1dvw59hpa4" }, "items": { "$ref": "#/components/schemas/FuelPrice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-fuel_price_indices-fuel-price-index-id-fuel_prices", "x-stoplight": { "id": "di6a0yk14l7uu" }, "description": "Retrieve `FuelPrices` that belong to a `FuelPriceIndex`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/fuel_price_indices/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "FuelPriceIndex ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update FuelPriceIndex", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelPriceIndex-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-fuel_price_indices-id", "x-stoplight": { "id": "rglynamxfchx1" }, "description": "Update `FuelPriceIndex` by `ID`\n\nThis endpoint requires the `edit_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelPriceIndex-Update" } } } } }, "delete": { "summary": "Delete FuelPriceIndex", "tags": [ "FuelSurcharges" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-fuel_price_indices-id", "x-stoplight": { "id": "alrhrsq4z9h2m" }, "description": "Delete `FuelPriceIndex` by `ID`\n\nThis endpoint requires the `delete_fuel_price_indices` permission" } }, "/v1/fuel_prices/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "FuelPrice ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update FuelPrice", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelPrice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-fuel_prices-id", "x-stoplight": { "id": "b7lvb2h1glz4i" }, "description": "Update `FuelPrice` by `ID`\n\nThis endpoint requires the `edit_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelPrice-Update" } } } } }, "delete": { "summary": "Delete FuelPrice", "tags": [ "FuelSurcharges" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-fuel_prices-id", "x-stoplight": { "id": "2ng6xzgo1uipj" }, "description": "Delete `FuelPrice` by `ID`\n\nThis endpoint requires the `delete_fuel_price_indices` permission" } }, "/v1/fuel_surcharge_schedule_prices/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "FuelSurchargeSchedulePrice ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "patch": { "summary": "Update FuelSurchargeSchedulePrice", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelSurchargeSchedulePrice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-fuel_surcharge_schedule_prices-id", "x-stoplight": { "id": "ii4ghlsn13iff" }, "description": "Update `FuelSurchargeSchedulePrice` by `ID`\n\nThis endpoint requires the `edit_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelSurchargeSchedulePrice-Update" } } } } }, "delete": { "summary": "Delete FuelSurchargeSchedulePrice", "tags": [ "FuelSurcharges" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-fuel_surcharge_schedule_prices-id", "x-stoplight": { "id": "svlbe4mut156p" }, "description": "Delete `FuelSurchargeSchedulePrice` by `ID`\n\nThis endpoint requires the `delete_fuel_price_indices` permission" } }, "/v1/fuel_surcharge_schedules/{fuel-surcharge-schedule-id}/fuel_surcharge_schedule_prices": { "parameters": [ { "schema": { "type": "string" }, "name": "fuel-surcharge-schedule-id", "in": "path", "required": true, "description": "FuelSurchargeSchedule ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Create a FuelSurchargeSchedulePrice for a FuelSurchargeSchedule", "tags": [ "FuelSurcharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelSurchargeSchedulePrice-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-fuel_surcharge_schedules-fuel-surcharge-schedule-id-fuel_surcharge_schedule_prices", "x-stoplight": { "id": "mqtr1s3ulkfum" }, "description": "Create a `FuelSurchargeSchedulePrice` for a `FuelSurchargeSchedule`\n\nThis endpoint requires the `create_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelSurchargeSchedulePrice-Create" } } } } }, "get": { "summary": "Retrieve FuelSurchargeSchedulePrices that belong to a FuelSurchargeSchedule", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "dwesmlba40uh6" }, "items": { "$ref": "#/components/schemas/FuelSurchargeSchedulePrice-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-fuel_surcharge_schedules-fuel-surcharge-schedule-id-fuel_surcharge_schedule_prices", "x-stoplight": { "id": "ezpdqlfcwz4a5" }, "description": "Retrieve `FuelSurchargeSchedulePrices` that belong to a `FuelSurchargeSchedule`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/fuel_surcharge_schedules/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "FuelSurchargeSchedule ID" }, { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "patch": { "summary": "Update FuelSurchargeSchedule", "tags": [ "FuelSurcharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-fuel_surcharge_schedules-id", "x-stoplight": { "id": "rfd4ul6jiib0u" }, "description": "Update `FuelSurchargeSchedule` by `ID`\n\nThis endpoint requires the `edit_fuel_price_indices` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Update" } } } } }, "delete": { "summary": "Delete FuelSurchargeSchedule", "tags": [ "FuelSurcharges" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-fuel_surcharge_schedules-id", "x-stoplight": { "id": "lzqbxoxllq42p" }, "description": "Delete `FuelSurchargeSchedule` by `ID`\n\nThis endpoint requires the `delete_fuel_price_indices` permission" } }, "/v1/iam_roles": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all IamRoles", "tags": [ "IamRoles" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "zi4niohrncbqf" }, "type": "array", "items": { "$ref": "#/components/schemas/IamRole-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-iam_roles", "description": "Retrieve `IamRoles` for the users company along with all system roles" } }, "/v1/job_assignments/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Job Assignment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single JobAssignment", "tags": [ "JobAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobAssignment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-job_assignments-id", "x-stoplight": { "id": "j7jjhdbtdz8ij" }, "description": "Retrieve a single `JobAssignment`.", "parameters": [] }, "patch": { "summary": "Update a JobAssignment", "tags": [ "JobAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/JobAssignment-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-job_assignments-id", "x-stoplight": { "id": "uynsex7qkgzqq" }, "description": "Update a `Job Assignment` by ID\n\nThis endpoint requires the `edit_job_assignment` permission", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobAssignment-Update" } } } } } }, "/v1/job_assignments/{job-assignment-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-assignment-id", "in": "path", "required": true, "description": "JobAssignment ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for a JobAssignment", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-job_assignments-job-assignment-id-auto_add_on_assignments", "x-stoplight": { "id": "ib7d4gjlhyy4o" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for a `JobAssignment`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for a JobAssignment", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "6a4oijcsoj4ic" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-job_assignments-job-assignment-id-auto_add_on_assignments", "x-stoplight": { "id": "df6no3h7kigff" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for a `JobAssignment`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/jobs": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs for the current Company", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "t9ombozql972b" }, "items": { "$ref": "#/components/schemas/Job-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs", "x-stoplight": { "id": "t4aenqbhzfdqh" }, "description": "Retrieve `Jobs` for the current `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `order_id`\n * `job_id`\n * `company.legal_name`\n * `account.name`\n * `project.name`\n * `order.dispatch_number`\n * user as driver: `driver.first_name` || `driver.last_name`\n * contact as foreman_contact: `foreman_contact.name` || `foreman_contact.email` || `foreman_contact.phone`\n * contact as collaborator_contact: `collaborator_contact.name` || `collaborator_contact.email` || `collaborator_contact.phone`\n * contact as sales_contact: `sales_contact.name` || `sales_contact.email` || `sales_contact.phone`\n * contact as supervisor_contact: `supervisor_contact.name` || `supervisor_contact.email` || `supervisor_contact.phone`\n\nFilter usage:\n* to filter a single state: `filter[states][]=created`\n* to filter multiple states: `filter[states][]=created&filter[states][]=arrived_dropoff`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "allowEmptyValue": true }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_ids" }, { "$ref": "#/components/parameters/ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-order-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" } ] } }, "/v1/jobs/approval": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs for the current Company for approval", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Job-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-approval", "description": "Retrieve completed `Jobs` for the current `Company` which are ready for the `Foreman` to approve.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" } ], "x-stoplight": { "id": "sp8zkxh0ik89f" } } }, "/v1/jobs/assigned": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs that are assigned to the current User", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "r27xfpc5ady6o" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-assigned", "x-stoplight": { "id": "fxs4tl98k7jg8" }, "description": "Retrieve current `User`'s `Jobs`\n\nFilter usage:\n* to filter a single state: `filter[states][]=created`\n* to filter multiple states: `filter[states][]=created&filter[states][]=arrived_dropoff`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "explode": false, "allowEmptyValue": true } ], "tags": [ "Jobs" ] } }, "/v1/jobs/bulk_accept": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Accept Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_accept", "x-stoplight": { "id": "khogcezmcocy1" }, "x-internal": true, "description": "Accept multiple `Jobs` based on the given `job_ids` asynchronously.\n\nTo accept a `Job` successfully, the principal should either be the `Driver` of the `Job` or has an `edit_job` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "7zhg6osjbkmmu" }, "items": { "x-stoplight": { "id": "ayy834gi42fle" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/jobs/bulk_assign": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Vendor to Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_assign", "x-stoplight": { "id": "vpmedaxgplayh" }, "description": "Assigns multiple `Jobs` to the given `Vendor` asynchronously.\n\nThis endpoint requires the `edit_job` permission\n\nDeprecated in favor of `PUT /v1/jobs/bulk_assign_vendors`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/BulkAssignVendor-Create" } } } }, "deprecated": true } }, "/v1/jobs/bulk_assign_drivers": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Drivers to Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_assign_drivers", "x-stoplight": { "id": "mbb1m1mtaew2a" }, "description": "Assigns a list of multiple `Jobs` to the given `Driver` asynchronously.\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "driver_assignments" ], "properties": { "driver_assignments": { "type": "array", "x-stoplight": { "id": "utlv8nffqqlo4" }, "items": { "$ref": "#/components/schemas/DriverAssignment-Create" } } } } } } } } }, "/v1/jobs/bulk_assign_vendors": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Assign Vendors to Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_assign_vendors", "x-stoplight": { "id": "8w5c9brylf6w9" }, "description": "Assigns a list of multiple `Jobs` to the given `Vendor` asynchronously.\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "vendor_assignments" ], "properties": { "vendor_assignments": { "type": "array", "x-stoplight": { "id": "srdt4eh43431v" }, "items": { "$ref": "#/components/schemas/BulkAssignVendor-Create" } } } } } } } } }, "/v1/jobs/bulk_copy_assignments": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Copy Assignments", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_copy_assignments", "x-stoplight": { "id": "zyc3q69ua4z61" }, "description": "Bulk Copy `JobAssignments` asynchronously.\n\nThis endpoint requires the `edit_job` permission", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "order_id", "job_ids" ], "properties": { "order_id": { "type": "string", "x-stoplight": { "id": "u9geb7lsnnjw9" }, "format": "uuid", "description": "The `Order` ID where the `JobAssignments` will be copied to" }, "job_ids": { "type": "array", "x-stoplight": { "id": "fm4o3vnu9n8nq" }, "description": "The `Job` IDs of the `JobAssignments` that are going to be copied", "items": { "x-stoplight": { "id": "1bnz6e10nc77j" }, "type": "string", "format": "uuid" } }, "deep_copy": { "type": "boolean", "x-stoplight": { "id": "mngdpfsujx6gr" }, "description": "If `true`, it will copy all the `JobAssignment` chain.\nIf `false`, it will copy only the immediate `JobAssignment`" } } } } } } } }, "/v1/jobs/bulk_delete": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk delete Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_delete", "x-stoplight": { "id": "31m0khi5ahvn4" }, "description": "Bulk delete multiple `Jobs` by `id` asynchronously.\n\nThis endpoint requires the `delete_job` permission.\n", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "phc7tuz5e4tyn" }, "items": { "x-stoplight": { "id": "cuqr9w0jcaud4" }, "type": "string", "format": "uuid" } } } } } } } } }, "/v1/jobs/bulk_driver_sms": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk send SMS to job's drivers", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-jobs-bulk_driver_sms", "x-stoplight": { "id": "ip8npgmtohjff" }, "description": "Bulk send sms text to `Job`'s `drivers`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/BulkSms-Create" } } } } } }, "/v1/jobs/bulk_send": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Bulk Send Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "3k60j8iiyqde1" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-jobs-bulk_send", "x-stoplight": { "id": "ynyrs3lzw7iex" }, "description": "Send multiple `Driver`-assigned or `Vendor`-assigned `Jobs` based on the given `job_ids` and `order_ids` asynchronously.\n\nThis endpoint requires the `edit_job` permission", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "o8ct2uoykrtf8" }, "items": { "x-stoplight": { "id": "2tzrrlx3d7hky" }, "type": "string", "format": "uuid" } } } } } }, "description": "This allows either `job_ids` or `order_ids` or both" } } }, "/v1/jobs/bulk_update": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Bulk Update Jobs", "tags": [ "Jobs" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "patch-v1-jobs-bulk_update", "x-stoplight": { "id": "fludxocpc74s7" }, "description": "Bulk update multiple `Jobs` with attributes defined in `data` asynchronously.\n\nThis endpoint requires the `edit_job` permission.\n\nBulk Updatable attributes: `notes`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Job-Bulk-Update" } } } } } }, "/v1/jobs/collaborator": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs where the current User is a Collaborator", "description": "Retrieve `Jobs` where the current `User` is a `Collaborator`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "explode": false, "allowEmptyValue": true } ], "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "cc7xfpc5ady6o" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-collaborator", "x-stoplight": { "id": "yz85dm6wtupf7" } } }, "/v1/jobs/driver": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs where the current User is a Driver", "description": "Retrieve `Jobs` where the current `User` is a `Driver`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "explode": false, "allowEmptyValue": true } ], "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ff7xfpc5ady6o" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-driver", "x-stoplight": { "id": "nn85dm6wtupf7" } } }, "/v1/jobs/foreman": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs where the current User is a Foreman", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "AA7xfpc5ady6o" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-foreman", "x-stoplight": { "id": "ktrhlpd3oqyze" }, "description": "Retrieve `Jobs` where the current `User` is a `Foreman`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "explode": false, "allowEmptyValue": true } ] } }, "/v1/jobs/salesperson": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Jobs where the current User is a Salesperson", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "salesperson-data-id" }, "items": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-salesperson", "x-stoplight": { "id": "salesperson-endpoint-id" }, "description": "Retrieve `Jobs` where the current `User` is a `Salesperson`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/components/schemas/JobState" } }, "in": "query", "name": "filter[states]", "description": "Job state filter", "explode": false, "allowEmptyValue": true } ] } }, "/v1/jobs/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Jobs", "deprecated": true, "description": "Deprecated in favor of `GET /v1/companies/{company-id}/jobs/typeahead`. Typeahead search against the `job_id` property for `Jobs` visible to the currently authenticated `Company`.", "tags": [ "Typeaheads", "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Job-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-typeahead", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "h1bh1yjfzib67" } } }, "/v1/jobs/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Job", "operationId": "get-v1-jobs-id", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "33bulw2e1kcaq" }, "description": "Retrieve `Job` by ID", "parameters": [], "tags": [ "Jobs" ] }, "patch": { "summary": "Update a Job", "operationId": "patch-v1-jobs-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "scrsovn40hd9x" }, "description": "Update a `Job` by ID\n\nThis endpoint requires the `edit_job` permission.\n\nIf setting the `driver_id`, the `assign_job` permission is also required.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job-Update" } } }, "description": "" }, "tags": [ "Jobs" ] }, "delete": { "summary": "Delete a Job", "tags": [ "Jobs" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-jobs-id", "x-stoplight": { "id": "ha9vmaalr3uux" }, "description": "Delete a `Job` by ID\n\nThis endpoint requires the `delete_job` permission" } }, "/v1/jobs/{job-id}/accept": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Accept a Job", "operationId": "put-v1-jobs-job-id-accept", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Accept a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "meeitvl63v85c" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/add_on_charges": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOnCharge for a Job", "tags": [ "AddOnCharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-jobs-job-id-add-on-charges", "x-stoplight": { "id": "xr122zynv088s" }, "x-internal": true, "description": "Create an `AddOnCharge` for a `Job`.\n\nThis endpoint is used to request an `AddOnCharge` for a `Job` that can be applied on a billing object.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Create" } } } } }, "get": { "summary": "Retrieve AddOnCharges for a Job", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "nb8iy18s9f6c8" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-add-on-charges", "x-stoplight": { "id": "mmddentq2cgui" }, "x-internal": true, "description": "Retrieve `AddOnCharges` for a `Job`.\n\nThis endpoint returns the requested `AddOnCharges` for a `Job`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update AddOnCharges for a Job", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "n7e5pr773lnrt" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-jobs-job-id-add-on-charges", "x-stoplight": { "id": "i50mevcejjfoi" }, "x-internal": true, "description": "Batch update `AddOnCharges` for an `Job`\n\nThis endpoint allows updating, creating, deleting `AddOnCharges` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\ne.g.\n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf creating new records:\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nadd_on_charges: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5,\n \"add_on_rate_type\": \"RateForEach\"\n },\n {\n \"percentage\": 10,\n \"add_on_rate_type\": \"RatePercentOfTotal\"\n }\n]\n```\n\nIf deleting exisitng records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "add_on_charges": { "type": "array", "x-stoplight": { "id": "2la6grsivscm7" }, "items": { "x-stoplight": { "id": "b2e1z3awpe093" }, "anyOf": [ { "$ref": "#/components/schemas/AddOnCharge-Create" }, { "$ref": "#/components/schemas/AddOnCharge-Update-Destroyable" } ] } } } } } } } } }, "/v1/jobs/{job-id}/additional_equipment": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Assign Equipment to a Job", "operationId": "post-v1-jobs-job-id-additional_equipment", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "ax8w576i4pazz" }, "type": "array", "items": { "$ref": "#/components/schemas/Equipment-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Assign additional `Equipment` to a `Job`\n\nThis endpoint requires the `edit_job_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job-AssignAdditionalEquipment" } } } }, "x-stoplight": { "id": "x3mtqqavqzj00" }, "x-internal": true } }, "/v1/jobs/{job-id}/approval_status": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalStatus for a Job", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Approval-Status" } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-job-job-id-driver_status", "description": "Deprecated in favor of \"Retrieve `ApprovalStatus` for a visible `Job` for a Company\"\n\nRetrieve `ApprovalStatus` for a visible `Job`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "amcv2nm5zojnz" }, "deprecated": true } }, "/v1/jobs/{job-id}/approvals": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a Job", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-job_approvals", "description": "Deprecated in favor of \"Retrieve ApprovalAssignments for a Job for a Company\"\n\nRetrieve all `ApprovalAssignments` visible to your `Company` for a `Job`", "x-stoplight": { "id": "wpui2o9l6q7d8" }, "tags": [ "ApprovalAssignments" ], "deprecated": true } }, "/v1/jobs/{job-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Job", "tags": [ "Jobs" ], "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-jobs-id-approve", "description": "Approve a `Job` by ID\n\nThis endpoint requires the `approve_job` permission.\n\nPrincipals with the `Company Admin` role can specify a specific `approval_type`.", "x-stoplight": { "id": "jtv8a8b5fllaw" }, "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "approved_work_time_minutes": { "type": "integer", "x-stoplight": { "id": "pveh7hxuwirvd" }, "minimum": 0 } } }, { "$ref": "#/components/schemas/Approval-Approve" } ] } } } } } }, "/v1/jobs/{job-id}/arrive": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Arrive to site for a Job", "operationId": "put-v1-jobs-job-id-arrive", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Arrive to `site` for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "ao36sudo57upt" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/assign_vendor": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Assign a vendor to a Job", "operationId": "put-v1-jobs-job-id-assign_vendor", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "rnqr7i6zz52ug" }, "tags": [ "Jobs" ], "description": "Assign a `driver` to an `Account`, with `vendor` type\n\nThis endpoint requires the `assign_job` `IAmPermission`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "vendor_id": { "type": "string", "x-stoplight": { "id": "3ypag81ut68sv" }, "format": "uuid" }, "compliance_override": { "type": "boolean", "x-stoplight": { "id": "e8k4r6wm9uj3c" }, "description": "When true, logs a compliance override for the vendor assignment" } }, "required": [ "vendor_id" ] } } } } } }, "/v1/jobs/{job-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for a Job", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-jobs-job-id-auto_add_on_assignments", "x-stoplight": { "id": "rlpg83fl77xfh" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for a `Job`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for a Job", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "jmdovwyzpttad" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-job-id-auto_add_on_assignments", "x-stoplight": { "id": "a5itcv0qdnt8a" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for a `Job`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/jobs/{job-id}/cancel": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Cancel a Job", "operationId": "put-v1-jobs-job-id-cancel", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Cancel a `Job` by ID\n\nThis endpoint requires the `cancel_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "dfpolcy1vse81" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/complete": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete a Job", "operationId": "put-v1-jobs-job-id-complete", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Complete a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "7q6belum7mk83" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/complete_load": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete Load for a Job", "operationId": "put-v1-jobs-job-id-complete-load", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Load `material` for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "tags": [ "Jobs" ], "x-stoplight": { "id": "12dctecwgwtkj" }, "x-internal": true } }, "/v1/jobs/{job-id}/copy": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Copy a Job", "operationId": "post-v1-jobs-job-id-copy", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "spsgln1l4q3k0" }, "description": "Creates a new `Job` with the same attributes as the job with provided `job-id`.", "tags": [ "Jobs" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/driver_sms": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send SMS to a driver of a Job", "tags": [ "Jobs" ], "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "1zqe8cy4fd8fd" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-jobs-job-id-driver_sms", "x-stoplight": { "id": "zid4jwue45nhw" }, "description": "Send sms text to `driver` of a `Job`.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sms-Create" } } } } } }, "/v1/jobs/{job-id}/enroute": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Move to Site for a Job", "operationId": "put-v1-jobs-job-id-enroute", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Move to `site` for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "65zitfb007hmp" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/equipment": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Assign Equipment to a Job", "operationId": "post-v1-jobs-job-id-equipment-assign", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Equipment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Assign `Equipment` to a `Job`\n\nThis endpoint requires the `edit_job_equipment` permission", "tags": [ "Equipment" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job-AssignEquipment" } } } }, "x-stoplight": { "id": "ice4dlmyxxef7" }, "x-internal": true } }, "/v1/jobs/{job-id}/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "The ID of the job you're operating on " }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on a Job", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-jobs-job_id-file_attachments", "x-stoplight": { "id": "wy2nbmoa1w8ve" }, "description": "Create a `FileAttachment` related to an `Job`. Requires permission to create attachment on `Job`—`create_job_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } }, "tags": [ "FileAttachments" ], "x-internal": true }, "get": { "summary": "Retrieve all FileAttachments for a given Job", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "bws8um7tyq6zq" }, "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job_id-file_attachments", "x-stoplight": { "id": "pbhvztovzeq3q" }, "description": "Retrieve all `FileAttachments` for a given `Job`", "tags": [ "FileAttachments" ], "parameters": [ { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" } ] } }, "/v1/jobs/{job-id}/files": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "description": "Job ID", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all associated FileAttachments for a Job", "tags": [ "FileAttachments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "zcvhcyrqhy1os" }, "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-files", "x-stoplight": { "id": "z4p1ctnwuedlr" }, "description": "This endpoint retrieves all associated `FileAttachments` for a `Job`, specifically:\n * all `FileAttachments` on the `Job`\n * all `FileAttachments` on the `Job's` `Loads`\n * all `FileAttachments` on `Tickets` connected to this `Job`\n\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/jobs/{job-id}/flag": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Flag a Job by ID", "operationId": "put-v1-jobs-job-id-flag", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "sdazplrnef0ye" }, "description": "Flag a `Job` by ID\n\nThis endpoint requires the `edit_job` permission", "tags": [ "Jobs" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/job_assignments": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a JobAssignment for a Job", "tags": [ "JobAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobAssignment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-jobs-job-id-job_assignments", "x-stoplight": { "id": "871p9td29wiee" }, "description": "Create a `JobAssignment` for a `Job`.\n\nThis endpoint requires the `create_job_assignment` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobAssignment-Create" } } } } }, "get": { "summary": "Retrieve JobAssignments for a Job", "tags": [ "JobAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "qb2yybtqqfd4b" }, "items": { "$ref": "#/components/schemas/JobAssignment-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-job_assignments", "x-stoplight": { "id": "6h651ov38hwiy" }, "description": "Retrieve all `JobAssignments` visible to your `Company` for a `Job`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ] } }, "/v1/jobs/{job-id}/job_events": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all JobEvents that belong to a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "a5c0fcj0ne1j4" }, "items": { "$ref": "#/components/schemas/JobEvent-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-job_events", "x-stoplight": { "id": "fuexsmvb3vkhu" }, "description": "Retrieve `Job` `Job-Events` by `ID`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ] } }, "/v1/jobs/{job-id}/load_material": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Load Material for a Job", "operationId": "put-v1-jobs-job-id-load-material", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Load `material` for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "lp4kjgjoqgjsn" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/loads": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Add a new load to a Job", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-jobs-id-loads", "x-stoplight": { "id": "lup09kisyoij9" }, "tags": [ "Loads" ], "description": "Create a `Load` by for a `Job`\n\nThis endpoint requires the `create_loads` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Load-Create" } } } } }, "get": { "summary": "Retrieve Loads of a Job", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "af2gavgs3876u" }, "items": { "$ref": "#/components/schemas/Load-LoadSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-loads", "x-stoplight": { "id": "nfnyrh6bqz3ek" }, "description": "Retrieve `Loads` of a `Job`.", "deprecated": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-ticket-flagged" }, { "$ref": "#/components/parameters/filter-states-" } ] } }, "/v1/jobs/{job-id}/loads/cycles": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all LoadCycles for a Job", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "x-stoplight": { "id": "bw4koenxmkftf" }, "required": [ "load_cycles", "load_cycle_time_minutes_avg" ], "properties": { "load_cycles": { "type": "array", "x-stoplight": { "id": "7irrsjqt3890c" }, "items": { "$ref": "#/components/schemas/LoadCycle-Read" } }, "load_cycle_time_minutes_avg": { "type": "integer", "x-stoplight": { "id": "1ysbs4rh0fv42" } } } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-loads-cycles", "x-stoplight": { "id": "9om38mymyv5al" }, "description": "Retrieve all `LoadCycles` for a `Job`. \n\nA `LoadCycle` is an edge between two consecutive `Loads` that have reached the `arrived_pickup` state on a given `Job`.\n\nThe response includes all calculated `LoadCycles` as well as the average time (in minutes).", "tags": [ "LoadCycles" ] } }, "/v1/jobs/{job-id}/location_histories": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Location Histories for a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "2xf7jmnlqr5ne" }, "items": { "$ref": "#/components/schemas/Job-LocationHistory-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job_id-location_histories", "x-stoplight": { "id": "bwycedlk6xmi9" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve `LocationHistories` for a `Job`.\n", "x-internal": true, "deprecated": true } }, "/v1/jobs/{job-id}/moving_sites/{moving-site-id}/location_histories": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "schema": { "type": "string" }, "name": "moving-site-id", "in": "path", "required": true, "description": "Moving Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Location Histories For MovingSite on A Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Job-LocationHistory-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job_id-moving-sites-moving-site-id-location_histories", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve `LocationHistory` of a `MovingSite` for a `Job`.\n\n", "x-internal": true, "x-stoplight": { "id": "ww354yu31b37z" }, "deprecated": true } }, "/v1/jobs/{job-id}/pause": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pause a Job", "operationId": "put-v1-jobs-job-id-pause", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Pause a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/pay": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Job", "operationId": "put-v1-jobs-job-id-pay", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "8c40bvhcxmbjc" }, "tags": [ "Jobs" ], "description": "Pay a `Job` by ID\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/payable": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Payable Invoice for a given Job", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-payable", "x-stoplight": { "id": "wzx41h77exb35" }, "x-internal": true, "description": "Retrieve a `Payable Invoice` for a given `Job`. \n\nThis can be a `Payable` for a `Vendor` or a `Driver`. ", "parameters": [] } }, "/v1/jobs/{job-id}/phase": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Assign Phase to a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-jobs-job-id-phases-assign", "x-stoplight": { "id": "mx1xzoehftj1d" }, "description": "Assign a `Phase` to a `Job` which belongs to the `Job`'s `Order`.\n\nThis endpoint requires the `edit_job_phase` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Phase-Assign-Update" } } } } } }, "/v1/jobs/{job-id}/receivable": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Receivable for a given Job", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Invoice-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-receivable", "x-stoplight": { "id": "7s58pkoplhp7h" }, "x-internal": true, "description": "Retrieve a `Receivable Invoice` for a given `Job`", "parameters": [] } }, "/v1/jobs/{job-id}/reject": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Reject a Job", "operationId": "put-v1-jobs-job-id-reject", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Reject a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_reason": { "type": "string", "x-stoplight": { "id": "g816b0ep1dql5" }, "description": "A user-provided reason for rejecting the Job", "nullable": true } } } } } }, "x-stoplight": { "id": "1k4bcms8bapb8" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/remove_flag": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Remove flag for a Job", "operationId": "put-v1-jobs-job-id-remove_flag", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "u0bdmab94f133" }, "tags": [ "Jobs" ], "description": "Remove flag for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/remove_signoff": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Remove signoff for a Job", "operationId": "put-v1-jobs-job-id-remove_signoff", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "i44dj0ce2f3xl" }, "description": "Remove signoff for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission", "tags": [ "Jobs" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/request": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Request a Job", "operationId": "put-v1-jobs-job-id-request", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "ctw14zh61w36x" }, "description": "Request a `Job` by ID to assigned `driver_id` on the job.\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/resource_usage_logs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ResourceUsageLogs that belong to a Job", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "gfkyo9yj4uy2n" }, "items": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-resource_usage_logs", "x-stoplight": { "id": "z4y3xwsbmp853" }, "description": "Retrieve `ResourceUsageLogs` that belong to a `Job`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update ResourceUsageLogs for a Job", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "lk6wlett4xjjz" }, "items": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-jobs-job-id-resource_usage_logs", "x-stoplight": { "id": "02uzluvolq2f0" }, "x-internal": true, "description": "Batch update `ResourceUsageLogs` for a `Job`\n\nThis endpoint requires:\n- `create_resource_usage_log` `IamPermission` for create\n- `edit_resource_usage_log` `IamPermission` for update\n- `delete_resource_usage_log` `IamPermission` for delete", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "resource_usage_logs" ], "properties": { "resource_usage_logs": { "type": "array", "x-stoplight": { "id": "lzw5p5gnzkhaj" }, "items": { "x-stoplight": { "id": "rf8u56mtethmw" }, "anyOf": [ { "$ref": "#/components/schemas/ResourceUsageLog-Create" }, { "$ref": "#/components/schemas/ResourceUsageLog-Update-Destroyable" } ] } } } } } } } } }, "/v1/jobs/{job-id}/resume": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Resume a Job", "operationId": "put-v1-jobs-job-id-resume", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Resume a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "tags": [ "Jobs" ], "x-stoplight": { "id": "d6bgcnssnpham" } } }, "/v1/jobs/{job-id}/review": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Review a Job", "operationId": "put-v1-jobs-job-id-review", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Sets the `Job` by ID to `in_review` state.\n\nThis endpoint requires the `edit_job` permission", "tags": [ "Jobs" ], "x-stoplight": { "id": "6irtmw9tvg13s" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/sign_off": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Sign off a Job", "operationId": "put-v1-jobs-job-id-sign_off", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "y4wcyygi29v3n" }, "tags": [ "Jobs" ], "description": "Sign off a `Job` by ID\n\nThis endpoint requires the `edit_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/jobs/{job-id}/summary": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the JobSummary for a Job", "tags": [ "JobSummaries" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobSummary-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-summary", "x-stoplight": { "id": "hej76n21ji0ia" }, "description": "Retrieve the `JobSummary` for a `Job`.\n\nA `JobSummary` will only exist for a `Job` in the `completed` state." }, "patch": { "summary": "Update the JobSummary for a Job", "tags": [ "JobSummaries" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobSummary-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-jobs-job-id-summary", "x-stoplight": { "id": "xo4y468ml04wm" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobSummary-Update" } } } }, "description": "Update the `JobSummary` for a `Job`.\n\nThis endpoint requires the `edit_job_summary` `IamPermission`." } }, "/v1/jobs/{job-id}/tickets": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Tickets for a Job", "tags": [ "Tickets", "Jobs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-jobs-job-id-tickets", "x-stoplight": { "id": "mvwxdiz0x5hf8" }, "description": "Retrive `Tickets` for a `Job`.\nFilter usage:\n* to filter a from date: `filter[from_date]`\n* to filter a to date: `filter[to_date]`\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[from_date]", "description": "Start range of ticket.created_at" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[to_date]", "description": "End range of ticket.created_at" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[flagged]", "description": "Filter to only flagged or un-flagged Tickets" }, { "$ref": "#/components/parameters/filter-sources" } ] } }, "/v1/jobs/{job-id}/timeline": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the Timeline of a Job", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "0hbibju6p2b8m" }, "items": { "$ref": "#/components/schemas/JobTimeline-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-jobs-job-id-timeline", "x-stoplight": { "id": "dkfishtfi5vno" }, "description": "Retrieve `Job`'s Timeline by ID" } }, "/v1/jobs/{job-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Job", "tags": [ "Jobs" ], "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-jobs-id-unapprove", "description": "Unapprove a `Job` by ID\n\nThis endpoint requires the `approve_job` permission.\n\nPrincipals with the `Company Admin` role can specify a specific `approval_type`.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } }, "x-stoplight": { "id": "yh83vcccn8oja" } } }, "/v1/jobs/{job-id}/unassign": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unassign the Driver or Vendor from a Job", "operationId": "v1-companies-company-id-jobs-job-id-unassign", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Unassign a `vendor` for a `Job` by ID\n\nThis endpoint requires the `assign_job` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "7hx6skl5cfvg1" }, "tags": [ "Jobs" ] } }, "/v1/jobs/{job-id}/unload_material": { "parameters": [ { "schema": { "type": "string" }, "name": "job-id", "in": "path", "required": true, "description": "Job ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unload the Material for a Job", "operationId": "put-v1-jobs-job-id-unload-material", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Unload `material` for a `Job` by ID\n\nThis endpoint requires the `edit_job` permission or if the current user is the assigned driver", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEvent-Update" } } } }, "x-stoplight": { "id": "v28h8lkq7gui6" }, "tags": [ "Jobs" ] } }, "/v1/kml_files/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "KMLFile ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update a KMLFile", "tags": [ "KMLFiles" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/KMLFile-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-kml_files-id", "x-stoplight": { "id": "gdf4wrfvs8c3u" }, "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KMLFile-Update" } } } }, "description": "Update `KMLFile` by `ID`\n" }, "delete": { "summary": "Delete a KMLFile", "tags": [ "KMLFiles" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-kml_files-id", "x-stoplight": { "id": "k1nx7gat6ccom" }, "x-internal": true, "description": "Delete a `KMLFile` by `ID`" } }, "/v1/line_item_types": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve LineItemTypes", "tags": [ "LineItemType" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "m8k3nq5vr7w2p" }, "items": { "$ref": "#/components/schemas/LineItemType-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-line_item_types", "x-stoplight": { "id": "p4r2t6x8z0b3d" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve all `LineItemTypes`. LineItemTypes define the types of line items that can appear on settlements (e.g., FreightRateLineItem, MaterialRateLineItem)." } }, "/v1/loads/approval": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Loads for the current Company for approval", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Load-Approval-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-approval", "description": "Retrieve completed `Loads` for the current `Company` which are ready for the `Foreman` to approve.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" } ], "x-stoplight": { "id": "z51hw09mt5tai" }, "tags": [ "Loads" ] } }, "/v1/loads/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Load", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-id", "x-stoplight": { "id": "jed5du7adixtr" }, "description": "Retrieve `Load` by ID" }, "patch": { "summary": "Update a Load", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-loads-id", "x-stoplight": { "id": "af3i9voxx310f" }, "description": "Update a `Load` by ID\n\nThis endpoint requires the `edit_load` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Load-Update" } } } } }, "delete": { "summary": "Delete a Load", "tags": [ "Loads" ], "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-loads-id", "x-stoplight": { "id": "nsarg5khevzu9" }, "description": "Delete a `Load` by ID\n\nThis endpoint requires the `delete_load` permission" } }, "/v1/loads/{load-id}/approvals": { "parameters": [ { "schema": { "type": "string" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ApprovalAssignments for a Load", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApprovalAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-load-id-load_approvals", "description": "Deprecated in favor of \"Retrieve ApprovalAssignments for a Load for a Company\"\n\nRetrieve all `ApprovalAssignments` visible to your `Company` for a `Load`", "tags": [ "ApprovalAssignments" ], "x-stoplight": { "id": "uazehzp622xqz" }, "deprecated": true } }, "/v1/loads/{load-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Load", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-loads-id-approve", "x-stoplight": { "id": "q1ixgaodcz6t3" }, "description": "Approve a `Load` by ID\n\nThis endpoint requires the `approve_load` permission.", "deprecated": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Approval-Approve" } } } } } }, "/v1/loads/{load-id}/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "The ID of the load you're operating on " }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on a Load", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-loads-load-id-file_attachments", "x-stoplight": { "id": "ic212tirenvan" }, "description": "Create a `FileAttachment` related to an `Load`. Requires permission to create attachment on `Load`—`create_load_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } }, "tags": [ "FileAttachments" ] }, "get": { "summary": "Retrieve all FileAttachments for a given Load", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "121cwskv2zirr" }, "type": "array", "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-load-id-file_attachments", "x-stoplight": { "id": "g4ldnfvd0tf8g" }, "description": "Retrieve all `FileAttachments` for a given `Load`", "tags": [ "FileAttachments" ], "parameters": [ { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" } ] } }, "/v1/loads/{load-id}/resource_usage_logs": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve ResourceUsageLogs that belong to a Load", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "wkpinw1ezy28u" }, "items": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-load-id-resource_usage_logs", "x-stoplight": { "id": "s9p76vkokzzq8" }, "description": "Retrieve `ResourceUsageLogs` that belong to a `Load`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/loads/{load-id}/signatures": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Signatures for a Load", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "3ujvqjwsh3075" }, "items": { "x-stoplight": { "id": "1bqu386h0nlnx" }, "anyOf": [ { "$ref": "#/components/schemas/DriverSignature-Read" }, { "$ref": "#/components/schemas/DropoffSignature-Read" } ] } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-loads-load-id-signatures", "x-stoplight": { "id": "5gjvkfcb58ttk" }, "description": "Retrieve all `Signatures` for a `Load`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/loads/{load-id}/signatures/driver": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DriverSignature on a Load", "tags": [ "Loads" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-loads-load-id-signatures-driver", "x-stoplight": { "id": "ib24ngk4ymny2" }, "description": "Create or update the `DriverSignature` on a `Load`.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DriverSignature-Create" } } } } }, "delete": { "summary": "Delete the DriverSignature from a Load", "tags": [ "Loads" ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-loads-load-id-signatures-driver", "x-stoplight": { "id": "giaqykshv9j4q" }, "description": "Delete the `DriverSignature` from a `Load`." } }, "/v1/loads/{load-id}/signatures/dropoff": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Create or update the DropoffSignature on a Load", "tags": [ "Loads" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DropoffSignature-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-loads-load-id-signatures-dropoff", "x-stoplight": { "id": "rj36ccpsiro53" }, "description": "Create or update the `DropoffSignature` on a `Load`. ", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/DropoffSignature-Create" } } } } }, "delete": { "summary": "Delete the DropoffSignature from a Load", "tags": [ "Loads" ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-loads-load-id-signatures-dropoff", "x-stoplight": { "id": "mqn0ibintrro9" }, "description": "Delete the `DropoffSignature` from a `Load`" } }, "/v1/loads/{load-id}/summary": { "parameters": [ { "schema": { "type": "string" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update the LoadSummary for a Load", "tags": [ "LoadSummaries" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/LoadSummary-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-loads-load-id-summary", "x-stoplight": { "id": "xp4y568mj04wm" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoadSummary-Update" } } } }, "description": "Update the `LoadSummary` for a `Load`.\n\nThis endpoint requires the `edit_load_summaries` and `edit_job` `IamPermission`." } }, "/v1/loads/{load-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "load-id", "in": "path", "required": true, "description": "Load ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Load", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Load-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-loads-id-unapprove", "description": "Unapprove a `Load` by ID\n\nThis endpoint requires the `approve_load` permission.", "deprecated": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "gw8j86fn75frt" } } }, "/v1/location_histories/latest": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve latest Location Histories for a Company", "tags": [ "LocationHistories" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "1glvq81dstm0v" }, "items": { "$ref": "#/components/schemas/NextBillionAssetLocations-LatestLocation-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-location_histories-latest", "x-stoplight": { "id": "rwy89pd9skn5r" }, "description": "Retrieve latest `LocationHistories` for a `Company`.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "filter[order_id]", "description": "Filters location histories to include only those associated with the specified order's jobs " }, { "schema": { "type": "string" }, "in": "query", "name": "filter[job_id]", "description": "Filters location histories to include only those associated with the specific job " } ], "deprecated": true } }, "/v1/material_rates": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a MaterialRate", "tags": [ "MaterialRates" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-material_rates", "x-stoplight": { "id": "jca6qthq49z0o" }, "description": "Create a `MaterialRate`.\n\nThis endpoint requires the `create_material_rate` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialRate-Create" } } } } } }, "/v1/material_rates/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "MaterialRate ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single MaterialRate", "tags": [ "MaterialRates" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-material_rates-id", "x-stoplight": { "id": "ehe1z9phshp18" }, "description": "Retrieve a `MaterialRate` by ID." }, "patch": { "summary": "Update a MaterialRate", "tags": [ "MaterialRates" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-material_rates-id", "x-stoplight": { "id": "xg0rca5uv71ia" }, "description": "Update a `MaterialRate` by ID.\n\nThis endpoint requires the `edit_material_rate` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialRate-Update" } } } } }, "delete": { "summary": "Delete a MaterialRate", "tags": [ "MaterialRates" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-material_rates-id", "x-stoplight": { "id": "rj8qvz9fhm7jr" }, "description": "Delete a `MaterialRate` by ID.\n\nThis endpoint requires the `edit_material_rate` permission." } }, "/v1/material_types": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a list of MaterialTypes", "tags": [ "MaterialType" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "wo8bd1eib2ubl" }, "type": "array", "items": { "$ref": "#/components/schemas/MaterialType-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-material_types", "x-stoplight": { "id": "2411m0ads382c" }, "description": "Get list of all `MaterialTypes`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/materials": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Material", "tags": [ "Materials" ], "operationId": "post-v1-materials", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "27dur2xjkdn98" }, "description": "Create a new Material\n\nThis endpoint requires the `create_materials` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Material-Create" } } } } }, "get": { "summary": "Retrieve Materials that belong to the current Company", "tags": [ "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "5l8c4sizu62bj" }, "items": { "$ref": "#/components/schemas/Material-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-materials", "x-stoplight": { "id": "ex8sbs07p4lok" }, "description": "Retrieve `Materials` visible to the currently authenticated `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `name`\n * `external_id`\n * `material_type.name`\n ", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/materials/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Materials", "tags": [ "Typeaheads", "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Material-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-material-typeahead", "description": "Typeahead search against the `name` property for `Material` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "g1vnefs3m2mdt" } } }, "/v1/materials/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Material ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Material", "tags": [ "Materials" ], "operationId": "get-v1-materials-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "yo1jdwvr7x93k" }, "description": "Retrieve a `Material` by ID" }, "patch": { "summary": "Update a Material", "tags": [ "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-materials-id", "x-stoplight": { "id": "czlg6jh55ey3i" }, "description": "Update `Material` by ID\n\nThis endpoint required the `edit_material` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Material-Update" } } } } }, "delete": { "summary": "Delete a Material", "tags": [ "Materials" ], "operationId": "delete-v1-materials-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "252bxk4epppji" }, "description": "Delete a `Material` by ID\n\nThis endpoint requires the `delete_material` permission" } }, "/v1/materials/{material-id}/activate": { "parameters": [ { "schema": { "type": "string" }, "name": "material-id", "in": "path", "required": true, "description": "Material ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Activate a Material", "tags": [ "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-materials-material-id-activate", "x-stoplight": { "id": "4y5ta1v0pa28s" }, "description": "Activate a `Material` by ID\n\nThis endpoint requires the `edit_material` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/materials/{material-id}/deactivate": { "parameters": [ { "schema": { "type": "string" }, "name": "material-id", "in": "path", "required": true, "description": "Material ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Deactivate a Material", "tags": [ "Materials" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Material-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-materials-material-id-deactivate", "x-stoplight": { "id": "m1v1iij2wksdp" }, "description": "Deactivate a `Material` by ID\n\nThis endpoint requires the `edit_material` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/mobile_context": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Mobile Context", "tags": [ "Reflection" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/MobileContext-Read" } }, "required": [ "data" ] } } } }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-mobile_context", "x-stoplight": { "id": "fo8cpg6nzzuam" }, "x-internal": true, "description": "Retrieve the current Mobile Context", "security": [] } }, "/v1/omni_reports": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Omni Reports visible to the current Company", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "t7zdd3ibkyp19" }, "items": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-omni_reports", "x-stoplight": { "id": "rypfgt41jqlgi" }, "description": "Retrieve all `Omni Reports` visible to the current `Company`\n\nThis endpoint requires the `view_report` permission", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" } ], "tags": [ "OmniReports" ] } }, "/v1/omni_reports/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "Report ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve embedded link for Omni Report by Report Name", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/OmniReportLink-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-omni_reports-report_name", "x-stoplight": { "id": "qqas9dmyc7mof" }, "description": "Retrieve embedded link for Omni Report by `ID`\n\nThis endpoint requires the `view_report` permission", "parameters": [], "x-internal": true }, "patch": { "summary": "Update Omni Report", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-omni_reports-id", "x-stoplight": { "id": "yag41l1bpmyuh" }, "description": "Update `OmniReport` by `ID`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OmniReport-Update" } } } } }, "delete": { "summary": "Delete Omni Report", "tags": [ "OmniReports" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-omni_reports-id", "x-stoplight": { "id": "7q8q7mlwouqv3" }, "description": "Delete `Omni Report` by `ID`", "x-internal": true } }, "/v1/orders": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an Order", "operationId": "post-v1-orders", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "x42tyegyeh66w" }, "description": "Create a new `Order`\n\nThis endpoint requires the `create_order` permission", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Create" } } } }, "deprecated": true }, "get": { "summary": "Retrieve Orders that belong to the current Company", "operationId": "get-v1-orders", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mzh7ea2cn1718" }, "items": { "$ref": "#/components/schemas/Order-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "e4jgtx3mxeuss" }, "tags": [ "Orders" ], "description": "Retrieve `Orders` visible to the currently authenticated `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `company_name`\n * `account_name`\n * `project_name`\n * `order_id`\n * `project_external_id`\n * `dispatch_number`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "schema": { "type": "array" }, "in": "query", "name": "ids", "description": "Order IDs" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-department_ids" } ], "deprecated": true } }, "/v1/orders/dispatch": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Orders based on Jobs for the current Company", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "yn8km4gf63m6w" }, "items": { "$ref": "#/components/schemas/Order-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-dispatch", "x-stoplight": { "id": "7mpiic783azcy" }, "description": "Retrieve `Orders` based on `Jobs` grouped by `Orders` for the current `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `company_name`\n * `account_name`\n * `project_name`\n * `order_id`\n * `project_external_id`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-foreman_ids" }, { "$ref": "#/components/parameters/filter-job-collaborator_ids" }, { "$ref": "#/components/parameters/filter-job-salesperson_ids" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/sort-created_at" }, { "$ref": "#/components/parameters/sort-load_at" }, { "$ref": "#/components/parameters/sort-friendly_order_id" }, { "$ref": "#/components/parameters/sort-dispatch_number-name" }, { "$ref": "#/components/parameters/sort-account-name" }, { "$ref": "#/components/parameters/sort-company-legal_name" } ], "x-internal": true, "deprecated": true } }, "/v1/orders/estimate": { "parameters": [ { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "post": { "summary": "Generate estimated Order values", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Order-Estimate-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-orders-estimate", "x-stoplight": { "id": "ke6iixxya5c4m" }, "x-internal": true, "description": "Generates estimated `Order` values.\n\nOne of `total_loads`, `total_units`, or `truck_quantity` must be set in the request.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Order-Estimate-Create" } } } }, "deprecated": true } }, "/v1/orders/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Order", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-id", "x-stoplight": { "id": "94snghibytdys" }, "description": "Retrieve `Order` by ID", "parameters": [], "deprecated": true }, "patch": { "summary": "Update an Order", "operationId": "patch-v1-orders-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "0dbe6fob4xovz" }, "description": "Update `Order` by ID\n\nThis endpoint requires the `edit_order` permission _or_ the `edit_order_pre_accept` permission, which only allows editing if the Order is in `created`, `pending_request` or `rejected` state", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Update" } } } }, "tags": [ "Orders" ], "deprecated": true } }, "/v1/orders/{order-id}/accept": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Accept an Order", "operationId": "put-v1-orders-order-id-accept", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "ahctk8jujf17r" }, "tags": [ "Orders" ], "description": "Accept an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "deprecated": true } }, "/v1/orders/{order-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for an Order", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-orders-order-id-auto_add_on_assignments", "x-stoplight": { "id": "46vbpxwxyaj60" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for an `Order`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } }, "deprecated": true }, "get": { "summary": "Get AutoAddOnAssignments for an Order", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mb1vbj8e4ha9n" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-auto_add_on_assignments", "x-stoplight": { "id": "wb920awxysm98" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for an `Order`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ], "deprecated": true } }, "/v1/orders/{order-id}/cancel": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Cancel an Order", "operationId": "put-v1-orders-order-id-cancel", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "xqglda635fg0d" }, "description": "Cancel an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "deprecated": true } }, "/v1/orders/{order-id}/complete": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Complete an Order", "operationId": "put-v1-orders-order-id-complete", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "tqhsymelhh2km" }, "description": "Complete an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "deprecated": true } }, "/v1/orders/{order-id}/copy": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Copy an Order", "operationId": "post-v1-orders-order-id-copy", "responses": { "201": { "description": "Created", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "veh4v5n8xfn6t" }, "description": "Copy an existing `Order`.\n\nThis endpoint required the `create_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order-Copy" } } } }, "deprecated": true } }, "/v1/orders/{order-id}/default_sites/{waypoint-type}": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve default sites for an order, given a waypoint type.", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order-id-default-sites", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve the `Sites` that belong to the default list of an `Order`, given a particular 'WaypointType'.\n", "x-internal": true, "x-stoplight": { "id": "wguhj02d3b7rh" }, "deprecated": true } }, "/v1/orders/{order-id}/default_sites/{waypoint-type}/{site-id}": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order id" }, { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Add a site to default site list on order", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-orders-order-id-default_sites-waypoint-type-site-id", "x-stoplight": { "id": "bgblx8ozfx49v" }, "description": "Add a `Site` to the default_site list for an `Order`, given a particular 'WaypointType'.\n\nNote: The underlying site grouping will be created automatically when the first \nsite is added for a given order. ", "x-internal": true, "deprecated": true }, "delete": { "summary": "Delete a single site from a default list of an order.", "tags": [ "Sites", "Orders" ], "responses": { "204": { "description": "Shared Response" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-orders-order-id-default_sites-waypoint-type-site-id", "x-stoplight": { "id": "0xv7jo7tt2k44" }, "description": "Delete a `Site` to the default_site list for an `Order`, given a particular 'WaypointType'.", "x-internal": true, "deprecated": true } }, "/v1/orders/{order-id}/driver_sms": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send SMS to a driver of all the Jobs of an Order", "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-orders-order-id-driver_sms", "description": "Send sms text to `driver` of all `Job`s of an `Order`.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Sms-Create" } } } }, "x-stoplight": { "id": "qni94m07ocnqq" }, "tags": [ "Orders" ], "deprecated": true } }, "/v1/orders/{order-id}/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "The ID of the order you're operating on " }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on an Order", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-orders-order_id-file_attachments", "x-stoplight": { "id": "hc7nwzlt5x6ae" }, "description": "Create a `FileAttachment` related to an `Order`. Requires permission to create attachment on `Order`—`create_order_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } }, "tags": [ "FileAttachments" ], "deprecated": true }, "get": { "summary": "Retrieve all FileAttachments for a given Order", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "tj07k22i6yxkl" }, "type": "array", "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order_id-file_attachments", "x-stoplight": { "id": "rqdbk8gf13faa" }, "description": "Retrieve all `FileAttachments` for a given `Order`", "tags": [ "FileAttachments" ], "parameters": [ { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" } ], "deprecated": true } }, "/v1/orders/{order-id}/hold": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Hold an Order", "operationId": "put-v1-orders-order-id-hold", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "tags": [ "Orders" ], "description": "Hold an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "nq9yp0by8wemw" }, "deprecated": true } }, "/v1/orders/{order-id}/jobs": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new Job for an Order", "operationId": "post-v1-orders-order-id-jobs", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Job-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "abqmf23y9fdmq" }, "description": "Create a new `Job` for an `Order`.\n\nThis endpoint requires the `create_job` `IamPermission`.", "tags": [ "Jobs" ], "deprecated": true }, "get": { "summary": "Retrieve Jobs that belong to an Order", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "9vknjqzpxznou" }, "items": { "$ref": "#/components/schemas/Job-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-jobs", "x-stoplight": { "id": "97zpzyi3rrdx8" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-driver_ids" }, { "$ref": "#/components/parameters/filter-material_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-service_ids" }, { "$ref": "#/components/parameters/filter-equipment_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-company_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-site_types" }, { "$ref": "#/components/parameters/filter-salesperson_ids" } ], "description": "Retrieve `Jobs` that belong to an `Order` and is visible to the currently authenticated Company.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `order_id`\n * `job_id`\n * `company.legal_name`\n * `account.name`\n * `project.name`\n * `order.dispatch_number`\n * user as driver: `driver.first_name` || `driver.last_name`\n * contact as foreman_contact: `foreman_contact.name` || `foreman_contact.email` || `foreman_contact.phone`\n * contact as collaborator_contact: `collaborator_contact.name` || `collaborator_contact.email` || `collaborator_contact.phone`\n * contact as sales_contact: `sales_contact.name` || `sales_contact.email` || `sales_contact.phone`\n * contact as supervisor_contact: `supervisor_contact.name` || `supervisor_contact.email` || `supervisor_contact.phone`\n\nFilter usage:\n* to filter a single state: `filter[states][]=created`\n* to filter multiple states: `filter[states][]=created&filter[states][]=arrived_dropoff`", "deprecated": true } }, "/v1/orders/{order-id}/loads": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Loads of an Order", "tags": [ "Loads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "m79zsypmd8iqi" }, "items": { "$ref": "#/components/schemas/Load-LoadSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order-id-loads", "x-stoplight": { "id": "f71l0hplsp631" }, "description": "Retrieve `Loads` of an `Order`.", "deprecated": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-ticket-flagged" }, { "$ref": "#/components/parameters/filter-states-" } ] } }, "/v1/orders/{order-id}/materials/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Materials that belong to Order's Company", "tags": [ "Orders", "Materials" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "xr3m6ssu8y6ed" }, "items": { "$ref": "#/components/schemas/Material-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order-id-materials-typeahead", "x-stoplight": { "id": "j0ap9rwx29chq" }, "description": "Typeahead search against the `name` property for `Materials` that belong to the `Order`'s `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "deprecated": true } }, "/v1/orders/{order-id}/phases": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Order Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Phase-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order-id-phases-index", "x-internal": true, "description": "This returns all the `Phases` for an `Order`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-stoplight": { "id": "yxeywnz85ntpf" }, "deprecated": true } }, "/v1/orders/{order-id}/phases/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Order Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mbiku8988m3gn" }, "items": { "$ref": "#/components/schemas/Phase-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-phases-typeahead", "x-stoplight": { "id": "h33hwt6dtb7h6" }, "description": "Typeahead search against the `name` property for `Phases` for an `Order` visible to the currently authenticated `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/search-query" } ], "deprecated": true } }, "/v1/orders/{order-id}/reject": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Reject an Order", "operationId": "put-v1-orders-order-id-reject", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "uru4rb9y35ubf" }, "description": "Reject an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "tags": [ "Orders" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_reason": { "type": "string", "x-stoplight": { "id": "tn076pj84m0j1" }, "description": "A user-provided reason for rejecting the Order", "maxLength": 100, "minLength": 1, "nullable": true } } } } } }, "deprecated": true } }, "/v1/orders/{order-id}/request": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Request an Order", "operationId": "put-v1-orders-order-id-request", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "4tukok39el2od" }, "tags": [ "Orders" ], "description": "Request an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "deprecated": true } }, "/v1/orders/{order-id}/sites/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Sites that belong to Order's Company", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "kiktkjftpqqlc" }, "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-sites-typeahead", "x-stoplight": { "id": "g8ff3h891sb9p" }, "description": "Typeahead search against the `name`, or `external_id` property for `Sites` that belong to the `Order`'s `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-states" } ], "deprecated": true } }, "/v1/orders/{order-id}/start": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Start an Order", "operationId": "put-v1-orders-order-id-start", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "a038a0rp3m80z" }, "tags": [ "Orders" ], "description": "Start an `Order`.\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "deprecated": true } }, "/v1/orders/{order-id}/tickets": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Tickets for an Order", "tags": [ "Tickets", "Orders" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-id-tickets", "description": "Retrive `Tickets` for an `Order`.\nFilter usage:\n* to filter a from date: `filter[from_date]`\n* to filter a to date: `filter[to_date]`\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[from_date]", "description": "Start range of ticket.created_at" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[to_date]", "description": "End range of ticket.created_at" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[flagged]", "description": "Filter to only flagged or un-flagged Tickets" }, { "$ref": "#/components/parameters/filter-sources" } ], "x-stoplight": { "id": "ncxsngghpi7ea" }, "deprecated": true } }, "/v1/orders/{order-id}/tickets/rollup_summary": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Ticket Rollup Summary for an Order", "tags": [ "Tickets", "Orders" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TicketRollupSummary-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-orders-order-id-id-tickets-rollup-summary", "description": "Retrive `TicketRollupSummary` for an `Order`.\nFilter usage:\n* filter on ticket source: `filter[sources]`\n", "parameters": [ { "$ref": "#/components/parameters/filter-sources" } ], "x-stoplight": { "id": "gflnfaum35oba" }, "deprecated": true } }, "/v1/orders/{order-id}/timeline": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "order-id", "in": "path", "required": true, "description": "Order Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the Timeline of an Order", "tags": [ "Jobs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OrderTimeline-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-orders-order-id-timeline", "description": "Retrieve `Orders`'s Timeline by ID", "parameters": [ { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-limit" } ], "x-stoplight": { "id": "2fbmr5sd9n14j" }, "deprecated": true } }, "/v1/orders/{order-id}/weather_hold": { "parameters": [ { "schema": { "type": "string" }, "name": "order-id", "in": "path", "required": true, "description": "Order ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Weather Hold an Order", "operationId": "put-v1-orders-order-id-weather-hold", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "tags": [ "Orders" ], "description": "Weather Hold an `Order`\n\nThis endpoint requires the `edit_order` `IamPermission`.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "hxrd3ip6pgfao" }, "deprecated": true } }, "/v1/projects": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Project in the current Company", "operationId": "post-v1-projects", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Project-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "hzl58l811aajv" }, "description": "Create a new `Project`\n\nThis endpoint requires the `create_project` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project-Create" } } } }, "tags": [ "Projects" ] }, "get": { "summary": "Retrieve Projects that belong to the current Company", "operationId": "get-v1-projects", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "596sx9n2ju902" }, "type": "array", "items": { "$ref": "#/components/schemas/Project-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "h741en60ac5ld" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-requester_ids" }, { "$ref": "#/components/parameters/filter-external_ids" }, { "$ref": "#/components/parameters/filter-account_ids" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-po_job_numbers" }, { "$ref": "#/components/parameters/filter-service_class_ids" }, { "$ref": "#/components/parameters/filter-equipment_type_ids" }, { "$ref": "#/components/parameters/filter-foreman_ids" }, { "$ref": "#/components/parameters/filter-collaborator_ids" }, { "$ref": "#/components/parameters/filter-salesperson_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" } ], "tags": [ "Projects" ], "description": "Retrieve `Projects` for a `Company`.\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `name`\n * `po_job_number`\n * `project_id`\n * `company.legal_name`\n * `account.name`\n * `external_id`" } }, "/v1/projects/external_ids/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Projects for a Company", "tags": [ "Typeaheads", "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Project-Read-Typeahead-External-Id" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-external_ids-typeahead", "description": "Typeahead search against the `external_id` property all `Projects` that belong to current `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-states" } ], "x-stoplight": { "id": "g3c7a95tje9xx" }, "x-internal": true } }, "/v1/projects/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Projects", "tags": [ "Typeaheads", "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Project-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-typeahead", "description": "Typeahead search against the `name` or `external_id` property for `Projects` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-department_ids" } ], "x-stoplight": { "id": "2bo13xsu452qn" } } }, "/v1/projects/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Project", "tags": [ "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Project-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-id", "x-stoplight": { "id": "uwa6vxp0zgx1s" }, "description": "Retrieve `Project` by ID" }, "patch": { "summary": "Update Project", "operationId": "patch-v1-projects-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Project-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "05suyjgrih7ay" }, "tags": [ "Projects" ], "description": "Update `Project` by ID\n\nThis endpoint requires the `edit_project` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project-Update" } } } } }, "delete": { "summary": "Delete Project", "operationId": "delete-v1-projects-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "huc6v88eeafj8" }, "description": "Delete `Project` by ID\n\nThis endpoint requires the `delete_project` permission", "tags": [ "Projects" ] } }, "/v1/projects/{project-id}/activate": { "parameters": [ { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Activate a Project", "operationId": "put-v1-projects-project-id-activate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Project-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "9pbv98fgjhk0o" }, "tags": [ "Projects" ], "description": "Activate a `Project`\n\nThis endpoint requires the `edit_project` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/projects/{project-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for a Project", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-projects-project-id-auto_add_on_assignments", "x-stoplight": { "id": "1swriowasik3r" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for a `Project`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for a Project", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "bv5wgrh96b3x4" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-projects-project-id-auto_add_on_assignments", "x-stoplight": { "id": "w0i7tozhjlfjz" }, "description": "Get `AutoAddOnAssignments` for a `Project`", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ] } }, "/v1/projects/{project-id}/deactivate": { "parameters": [ { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Deactivate a Project", "operationId": "put-v1-projects-project-id-deactivate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Project-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "ylrh322g74akl" }, "tags": [ "Projects" ], "description": "Deactivate a `Project`\n\nThis endpoint requires the `edit_project` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/projects/{project-id}/default_sites/{waypoint-type}": { "parameters": [ { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve default sites for a project, given a waypoint type.", "tags": [ "Sites", "Projects" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-project-id-default-sites", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve the `Sites` that belong to the default list of an `Project`, given a particular 'WaypointType'.\n", "x-stoplight": { "id": "x9tdnf2b680k9" }, "x-internal": true } }, "/v1/projects/{project-id}/default_sites/{waypoint-type}/{site-id}": { "parameters": [ { "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "name": "waypoint-type", "in": "path", "required": true, "description": "Waypoint type" }, { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site id" }, { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Add a site to default site list on order", "tags": [ "Sites", "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Site-Read-Nested" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-projects-project-id-default_sites-waypoint-type-site-id", "description": "Add a `Site` to the default_site list for an `Project`, given a particular 'WaypointType'.\n\nNote: The underlying site grouping will be created automatically when the first \nsite is added for a given project. ", "x-internal": true, "x-stoplight": { "id": "ucjvqgmfu1q80" } }, "delete": { "summary": "Delete a single site from a default list of an order.", "tags": [ "Sites", "Orders" ], "responses": { "204": { "description": "Shared Response" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-projects-project-id-default_sites-waypoint-type-site-id", "description": "Delete a `Site` to the default_site list for an `Order`, given a particular 'WaypointType'.", "x-internal": true, "x-stoplight": { "id": "kpx387ps3xdlg" } } }, "/v1/projects/{project-id}/file_attachments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "project-id", "in": "path", "description": "The ID of the project you're operating on ", "required": true }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on a Project", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-projects-project_id-file_attachments", "x-stoplight": { "id": "423h0z6d6mc7b" }, "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } }, "description": "Create a `FileAttachment` related to a `Project`. Requires permission to create attachment on `Project`—`create_project_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "tags": [ "FileAttachments" ] }, "get": { "summary": "Retrieve all FileAttachments for a given Project", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "hvcshzfiz4hlu" }, "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-project_id-file_attachments", "x-stoplight": { "id": "tfbkyg0njj4tt" }, "description": "Retrieve all `FileAttachments` for a given `Project`", "tags": [ "FileAttachments" ], "parameters": [ { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" } ] } }, "/v1/projects/{project-id}/material_rates": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve MaterialRates of a Project", "tags": [ "MaterialRates" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "887nads4836tt" }, "items": { "$ref": "#/components/schemas/MaterialRate-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-project-id-material_rates", "x-stoplight": { "id": "qvi8fjfhnaos4" }, "description": "Retrieve `MaterialRates` of a `Project`.", "x-internal": false, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/projects/{project-id}/phases": { "parameters": [ { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Project Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Phase-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-projects-phases-index", "x-internal": true, "description": "This returns all the `Phases` for a `Project`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-stoplight": { "id": "yynlfa7n5qj8x" } } }, "/v1/projects/{project-id}/phases/typeahead": { "parameters": [ { "schema": { "type": "string" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Project Phases", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "winwahxto6owf" }, "items": { "$ref": "#/components/schemas/Phase-Read-Typeahead" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-projects-project-id-phases-typeahead", "x-stoplight": { "id": "jxoz046591t0s" }, "description": "Typeahead search against the `name` property for `Phases` for an `Project` visible to the currently authenticated `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/projects/{project-id}/site_rate_schedules": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "project-id", "in": "path", "required": true, "description": "Project ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a SiteRateSchedule for a Project", "tags": [ "SiteRateSchedules" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/SiteRateSchedule-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-projects-project-id-site_rate_schedules", "x-stoplight": { "id": "9t7id39o20c58" }, "x-internal": true, "description": "Create a `SiteRateSchedule` for a `Project`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SiteRateSchedule-Create" } } } } }, "get": { "summary": "Retrieve SiteRateSchedules for a Project", "tags": [ "SiteRateSchedules" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": " Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "uviq1t32dfz3d" }, "items": { "$ref": "#/components/schemas/SiteRateSchedule-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-projects-project-id-site_rate_schedules", "x-stoplight": { "id": "u9lgfbaq3wu8d" }, "description": "Retrieve `SiteRateSchedules` for a `Project`", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-site_id" } ] } }, "/v1/rates": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Rate", "operationId": "post-v1-rates", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "q7qw7tfl4h563" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "zowfqe8wwlc7y" }, "tags": [ "Rates" ], "description": "Create a `Rate`\n\nThis endpoint requires the `create_rate` permission\n", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/RateTime-Create" }, { "$ref": "#/components/schemas/RatePerUnit-Create" }, { "$ref": "#/components/schemas/RateCommission-Create" }, { "$ref": "#/components/schemas/RateFlatCommission-Create" }, { "$ref": "#/components/schemas/RateFlatRate-Create" } ] } } } } }, "get": { "summary": "Retrieve Rates that belong to the current Company", "operationId": "get-v1-rates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "u3h3dqoukazsu" }, "items": { "x-stoplight": { "id": "rky6961dxy8r9" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "g6jyfmnr2ofv8" }, "tags": [ "Rates" ], "description": "Retrieve `Rates` for a `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[account_id]", "description": "Account ID filter", "allowEmptyValue": false }, { "schema": { "type": "string" }, "in": "query", "name": "filter[project_id]", "description": "Project ID filter", "allowEmptyValue": false }, { "schema": { "type": "string" }, "in": "query", "name": "filter[service_id]", "description": "Service ID filter", "allowEmptyValue": false }, { "schema": { "type": "string" }, "in": "query", "name": "filter[equipment_id]", "description": "Equipment ID filter", "allowEmptyValue": false }, { "schema": { "type": "string" }, "in": "query", "name": "filter[account_type]", "description": "Account type filter (deprecated, will only work if owner_type is not provided)" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[include_default]", "description": "Includes default rates when set to true" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[owner_type]", "description": "RateOwnerType filter (should be used instead of account_type, this takes precedence over account_type)" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[driver_id]", "description": "Driver ID filter" }, { "$ref": "#/components/parameters/filter-service_class_id" }, { "$ref": "#/components/parameters/filter-equipment_type_id" } ] } }, "/v1/rates/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Rates", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "mkubms5vew2o2" }, "items": { "x-stoplight": { "id": "rdnefjijzp2mg" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-rates-typeahead", "x-stoplight": { "id": "me0xr5dfv82xw" }, "description": "Typeahead search against the `name` property for `Rates` visible to the currently authenticated `Company`", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_id" }, { "$ref": "#/components/parameters/filter-driver_id" }, { "$ref": "#/components/parameters/filter-equipment_id" }, { "$ref": "#/components/parameters/filter-service_id" }, { "$ref": "#/components/parameters/filter-project_id" }, { "$ref": "#/components/parameters/filter-include_default" }, { "$ref": "#/components/parameters/filter-owner_type" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-service_class_id" }, { "$ref": "#/components/parameters/filter-equipment_type_id" } ] } }, "/v1/rates/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Rate ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Rate", "operationId": "get-v1-rates-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "j65mnit68ekrb" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "j8j0yisgzv2vi" }, "tags": [ "Rates" ], "description": "Retrieve `Rate` by ID" }, "patch": { "summary": "Update a Rate", "operationId": "patch-v1-rates-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "p9bxmqkmcn02c" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "oxa3pcdlps8n2" }, "description": "Update a `Rate` by ID\n\nThis endpoint requires the `edit_rate` permission", "tags": [ "Rates" ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/RateTime-Update" }, { "$ref": "#/components/schemas/RatePerUnit-Update" }, { "$ref": "#/components/schemas/RateCommission-Update" }, { "$ref": "#/components/schemas/RateFlatRate-Update" } ] } } } } }, "delete": { "summary": "Delete a Rate", "operationId": "delete-v1-rates-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "0l4m3cafk36vr" }, "description": "Delete a `Rate` by ID\n\nThis endpoint requires the `delete_rate` permission", "tags": [ "Rates" ] } }, "/v1/rates/{rate-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "rate-id", "in": "path", "required": true, "description": "Rate ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignment for a Rate", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-rates-rate-id-auto_add_on_assignments", "x-stoplight": { "id": "ri1es0xegbx5i" }, "x-internal": true, "description": "Create `AutoAddOnAssignment` for a `Rate`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for a Rate", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "rcpv6isrxmyuh" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-rates-rate-id-auto_add_on_assignments", "x-stoplight": { "id": "m5a3yxp26uywt" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for a `Rate`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/rates/{rate-id}/copy": { "parameters": [ { "schema": { "type": "string" }, "name": "rate-id", "in": "path", "required": true, "description": "Rate ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Copy a Rate", "operationId": "post-v1-rates-rate-id-copy", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "ca94i2rfpejku" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read" }, { "$ref": "#/components/schemas/RatePerUnit-Read" }, { "$ref": "#/components/schemas/RateCommission-Read" }, { "$ref": "#/components/schemas/RateFlatRate-Read" } ] } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "chtletqj7jm14" }, "tags": [ "Rates" ], "description": "Copy a `Rate` to another `Account` or `Driver`\n\nThis endpoint requires the `create_rate` permission\n\nUsage:\n- provide either `account_id` or `driver_id`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Rate-Copy" } } } } } }, "/v1/report_categories/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "ReportCategory ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update ReportCategory", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ReportCategory-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-report_categories-id", "x-stoplight": { "id": "qy5eik2q9mvfq" }, "description": "Update `ReportCategory` by `ID`", "x-internal": true, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportCategory-Update" } } } } }, "delete": { "summary": "Delete ReportCategory", "tags": [ "OmniReports" ], "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-report_categories-id", "x-stoplight": { "id": "c0l9abzhmysus" }, "description": "Delete `ReportCategory` by `ID`", "x-internal": true } }, "/v1/report_categories/{report-category-id}/omni_reports": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "report-category-id", "in": "path", "required": true, "description": "Report Category ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all OmniReports that are under a ReportCategory", "tags": [ "OmniReports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "azjet1zexx24n" }, "items": { "$ref": "#/components/schemas/OmniReport-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-report_categories-report-category-id-omni_reports", "x-stoplight": { "id": "6f31eb2dkyncc" }, "description": "Retrieve all `OmniReports` that are under a `ReportCategory`\n\nThis endpoint requires the `view_report` permission", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "x-internal": true } }, "/v1/resource_scopes/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "ResourceScope ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete a ResourceScope", "tags": [ "ResourceScopes" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-resource_scopes-id", "x-stoplight": { "id": "re1nudb6vqw52" }, "description": "Delete a `ResourceScope`.\n\nThis endpoint requires the `delete_resource_scope` permission." } }, "/v1/resource_usage_logs/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "ResourceUsageLog ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update a ResourceUsageLog", "tags": [ "ResourceUsageLogs" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ResourceUsageLog-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-resource_usage_logs-id", "x-stoplight": { "id": "vldlvzh0ks1at" }, "description": "Update a `ResourceUsageLog`\n\nThis endpoint requires the `edit_resource_usage_log` `IamPermission`.\n ", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/ResourceUsageLog-Update" } } } } }, "delete": { "summary": "Delete a ResourceUsageLog by ID", "tags": [ "ResourceUsageLogs" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-resource_usage_logs-id", "x-stoplight": { "id": "yjrvjoqsirwuh" }, "description": "Deletes a `ResourceUsageLog` by `ID`\n\nThis endpoint requires the `delete_resource_usage_log` `IamPermission`.\n" } }, "/v1/route_estimate": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Calculate estimated Route time and distance", "tags": [ "Orders" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/RouteEstimate-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-route_estimate", "x-stoplight": { "id": "an0nocp74jfki" }, "description": "Calculate estimated `Route` `time` and `distance`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/RouteEstimate-Create" } } } } } }, "/v1/service_classes": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new ServiceClass.", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-service_class", "description": "Create a new `ServiceClass`\n\nThis endpoint requires the `create_service_class` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceClass-Create" } } } }, "x-stoplight": { "id": "6nya23w8eukbm" }, "tags": [ "ServiceClass" ] }, "get": { "summary": "Retrieve ServiceClasses that belong to the current Company", "tags": [ "ServiceClass" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "98wr38oldqe5z" }, "items": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-service_classes", "x-stoplight": { "id": "6h26dyq4w1j17" }, "description": "Retrieve `ServiceClass`s that belong to the current `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/service_classes/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on ServiceClasses", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-service_classes-typeahead", "description": "Typeahead search against the `name` property for `ServiceClass` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "bg12r6fixecwz" }, "tags": [ "Typeaheads", "ServiceClass" ] } }, "/v1/service_classes/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "ServiceClass ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single ServiceClass.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-service_class-id", "description": "Retrieve a single `ServiceClass` by ID", "x-stoplight": { "id": "a48wg7r9xpcjz" }, "tags": [ "ServiceClass" ] }, "patch": { "summary": "Update a ServiceClass", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ServiceClass-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-service_class-id", "description": "Update `ServiceClas` by ID\n\nThis endpoint requires the `edit_service_class` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceClass-Update" } } } }, "x-stoplight": { "id": "sfjgdsg09thh9" }, "tags": [ "ServiceClass" ] }, "delete": { "summary": "Delete a ServiceClass", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-service_class-id", "description": "Delete a `ServiceClass` by ID\n\nThis endpoint requires the `delete_service_class` permission", "x-stoplight": { "id": "1ejk79nemle9w" }, "tags": [ "ServiceClass" ] } }, "/v1/services": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Services that belong to the current Company", "tags": [ "Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Service-Read" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-services", "description": "Retrieve `Services` visible to a `Company`", "x-stoplight": { "id": "q28j4bggcccd9" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/services/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Services", "tags": [ "Typeaheads", "Services" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Service-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-services-typeahead", "description": "Typeahead search against the `name` property for `Services` visible to the currently authenticated `Company`.\n", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ], "x-stoplight": { "id": "aa7i510yp8rbs" } } }, "/v1/settlements": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Settlement", "deprecated": true, "tags": [ "Settlements" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-settlements", "x-stoplight": { "id": "edybmu707nwwg" }, "x-internal": true, "description": "Create a new `Settlement`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement-Create" } } } } } }, "/v1/settlements/payables": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve payable Settlements visible to the current Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "a2ov7z6wnk7ng" }, "items": { "$ref": "#/components/schemas/Settlement-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-settlements-payables", "x-stoplight": { "id": "osrfk6yuj1410" }, "x-internal": true, "description": "Retrieve payable `Settlements` visible to the current `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-vendor_account_ids" }, { "$ref": "#/components/parameters/filter-pickup_site_ids" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/settlements/receivables": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve receivable Settlements visible to the current Company", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "8s0p6u7sd0tha" }, "items": { "$ref": "#/components/schemas/Settlement-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-settlements-receivables", "x-stoplight": { "id": "r3z1dqzdtjud3" }, "x-internal": true, "description": "Retrieve receivable `Settlements` visible to the current `Company`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-states" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" }, { "$ref": "#/components/parameters/filter-rate_types" }, { "$ref": "#/components/parameters/filter-project_ids" }, { "$ref": "#/components/parameters/filter-customer_account_ids" }, { "$ref": "#/components/parameters/filter-dropoff_site_ids" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/settlements/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-settlements-id", "x-stoplight": { "id": "farjqojrpwvay" }, "x-internal": true, "description": "Retrieve a `Settlement` by ID" }, "patch": { "summary": "Update a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-settlements-settlement-id", "x-stoplight": { "id": "7ztgb8uph9m2l" }, "x-internal": true, "description": "Update a `Settlement` by ID", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement-Update" } } } } } }, "/v1/settlements/{settlement-id}/add_on_charges": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an AddOnCharge for a Settlement", "tags": [ "AddOnCharges" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-settlements-settlement-id-add-on-charges", "x-stoplight": { "id": "lcfbg9vsjgekb" }, "description": "Create an `AddOnCharge` for a `Settlement`.\n\nThis endpoint is used to apply an `AddOnCharge` for an `Settlement`.", "x-internal": true, "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/AddOnCharge-Create" } } } } }, "get": { "summary": "Retrieve AddOnCharges for a Settlement", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "syquhr0motskr" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-settlements-settlement-id-add-on-charges", "x-stoplight": { "id": "oor6jevy3ynek" }, "x-internal": true, "description": "Retrieve `AddOnCharges` for a `Settlement`.\n\nThis endpoint returns the applied `AddOnCharges` for a `Settlement`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] }, "patch": { "summary": "Batch update AddOnCharges for a Settlement", "tags": [ "AddOnCharges" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "in5y0dfgj4jvp" }, "items": { "$ref": "#/components/schemas/AddOnCharge-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-settlements-settlement-id-add-on-charges", "x-stoplight": { "id": "75zqxlladu67l" }, "x-internal": true, "description": "Batch update `AddOnCharges` for a `Settlement`\n\nThis endpoint allows updating, creating, deleting `AddOnCharges` all at once.\n\nIf updating existing records:\n- must provide the `id` for each record to be updated\n- only provide the fields to be updated\ne.g.\n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"quantity\": 20.25,\n \"rate\": 15.75\n }\n]\n```\n\nIf creating new records:\n- must not provide the `id` for each record to be created\n- provide all the fields needed for the record\ne.g.\n```json\nadd_on_charges: [\n {\n \"quantity\": 20.25,\n \"rate\": 12.5,\n \"add_on_rate_type\": \"RateForEach\"\n },\n {\n \"percentage\": 10,\n \"add_on_rate_type\": \"RatePercentOfTotal\"\n }\n]\n```\n\nIf deleting exisitng records:\n- must provide the `id` and the property `_destroy: 1`\n\ne.g. \n```json\nadd_on_charges: [\n {\n \"id\": \"some-uuid\"\n \"_destroy\": 1\n }\n]\n```", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "add_on_charges": { "type": "array", "x-stoplight": { "id": "mofgsixpv66s5" }, "items": { "x-stoplight": { "id": "k82c0mauuc5as" }, "anyOf": [ { "$ref": "#/components/schemas/AddOnCharge-Create" }, { "$ref": "#/components/schemas/AddOnCharge-Update-Destroyable" } ] } } } } } } } } }, "/v1/settlements/{settlement-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-approve", "x-stoplight": { "id": "wl5hgxeou1fug" }, "x-internal": true, "description": "Deprecated in favor of \"Approve a `Settlement` by ID as a `Company`\".\n\nApprove a `Settlement` by ID", "deprecated": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/settlements/{settlement-id}/customer_approve": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Settlement as the Customer", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-customer_approve", "x-stoplight": { "id": "d0jiubzzh9kss" }, "x-internal": true, "description": "Approve a `Settlement` as the `Customer` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/settlements/{settlement-id}/customer_pay": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Settlement as the Customer", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-customer_pay", "x-stoplight": { "id": "1lerkb068nx5o" }, "x-internal": true, "description": "Pay a `Settlement` as the `Customer` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/settlements/{settlement-id}/email_settlement": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Email a Settlement", "tags": [ "Settlements" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-settlements-settlement-id-email_settlement", "x-stoplight": { "id": "p9cmgo4deit1m" }, "x-internal": true, "deprecated": true, "description": "Email a `Settlement`\n\nThis requires `edit_settlement` permission.\n\n**Deprecated:** Use the company-scoped endpoint `/v1/companies/{company-id}/settlements/{settlement-id}/email_settlement` instead.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/EmailSettlement-Create" } } } } } }, "/v1/settlements/{settlement-id}/file_attachments": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a FileAttachment on a Settlement", "tags": [ "Settlements" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-settlements-settlement-id-file_attachments", "x-stoplight": { "id": "bu7mlo519vwtt" }, "description": "Create a `FileAttachment` related to a `Settlement`. Requires permission to create attachment on `Project`—`create_settlement_attachments`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `file` 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 `file` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "$ref": "#/components/schemas/FileAttachment-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileAttachment-Create" } } } } }, "get": { "summary": "Retrieve all FileAttachments for a given Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "d1ud1vtst7d4c" }, "items": { "$ref": "#/components/schemas/FileAttachment-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-settlements-settlement-id-file_attachments", "x-stoplight": { "id": "piyk0vobs6pul" }, "description": "Retrieve all `FileAttachments` for a given `Settlement`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/settlements/{settlement-id}/invoices/rebill_rates": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Rebill Settlement's Invoices Rates", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-settlements-settlement-id-invoices-rebill_rates", "x-stoplight": { "id": "nuqxexq3jbetb" }, "x-internal": true, "description": "Rebill `Settlement`'s `Invoices` `Rates`", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "utj4i1gptjio4" }, "items": { "$ref": "#/components/schemas/RebillSettlementInvoiceRate-Update" } } } } } } } } }, "/v1/settlements/{settlement-id}/pay": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Pay a Settlement", "deprecated": true, "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-pay", "x-stoplight": { "id": "dhwetqxc32l8v" }, "x-internal": true, "description": "Pay a `Settlement` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/settlements/{settlement-id}/rebill": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Generate new Settlement for Rebill", "deprecated": true, "tags": [ "Settlements" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-settlements-settlement-id-rebill", "x-stoplight": { "id": "p2htovdrh7paw" }, "description": "Generate new `Settlement` for Rebill", "x-internal": true } }, "/v1/settlements/{settlement-id}/send_settlement": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send a Settlement", "deprecated": true, "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-send_settlement", "x-stoplight": { "id": "3cuz18fs4dtzo" }, "x-internal": true, "description": "Deprecated in favor of \"Send a `Settlement` by ID as a `Company`\".\n\nSend a `Settlement` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/settlements/{settlement-id}/settlement_email_deliveries": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Get SettlementEmailDeliveries for a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "vn9k0n3j8a20o" }, "items": { "$ref": "#/components/schemas/SettlementEmailDelivery-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-settlements-settlement-id-settlement_email_deliveries", "x-stoplight": { "id": "xr9oz1mw2dmj3" }, "x-internal": true, "description": "Get `SettlementEmailDeliveries` for a `Settlement`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/settlements/{settlement-id}/settlement_line_items": { "parameters": [ { "schema": { "type": "string" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all SettlementLineItems that belongs to a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "23ncatk5wbbsd" }, "items": { "$ref": "#/components/schemas/SettlementLineItem-Group-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-settlements-settlement-id-settlement_line_items", "x-stoplight": { "id": "ka3efweyefdzu" }, "x-internal": true, "description": "Retrieve all `SettlementLineItems` that belongs to a `Settlement`.\n\nNotes:\n- if the `Settlement`'s configuration has no grouping, then the array response would just contain a single grouped result without the `group` field and the `line_items` would be all the line items.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "settlement_line_item_type", "description": "Override `Settlement`'s `settlement_line_item_type` for rendering `SettlementLineItems`. See `SettlementLineItemType` enum for values." } ], "requestBody": { "content": {} } } }, "/v1/settlements/{settlement-id}/unapprove": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Unapprove a Settlement", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" } }, "operationId": "put-v1-settlements-settlement-id-unapprove", "x-stoplight": { "id": "e2rjh9sk7jp2n" }, "description": "Deprecated in favor of \"Unapprove a `Settlement` by ID as a `Company`\".\n\nUnapprove a `Settlement` by ID", "deprecated": true, "tags": [ "Settlements" ], "x-internal": true } }, "/v1/settlements/{settlement-id}/void": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "settlement-id", "in": "path", "required": true, "description": "Settlement ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Void a Settlement by ID", "deprecated": true, "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Settlement-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-settlements-settlement-id-void", "x-stoplight": { "id": "d6q0t9bsown9f" }, "x-internal": true, "description": "Void a `Settlement` by ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "void_reason": { "type": "string", "x-stoplight": { "id": "l12lsi1c0ivcf" }, "nullable": true } } } } } } } }, "/v1/site_rate_schedules/{id}": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "id", "in": "path", "required": true, "description": "SiteRateSchedule ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update SiteRateSchedule", "tags": [ "SiteRateSchedules" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/SiteRateSchedule-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-site_rate_schedules-id", "x-stoplight": { "id": "7n97um2fzgwax" }, "x-internal": true, "description": "Update `SiteRateSchedule` by ID", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SiteRateSchedule-Update" } } } } }, "delete": { "summary": "Delete SiteRateSchedule", "tags": [ "SiteRateSchedules" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-site_rate_schedules-id", "x-stoplight": { "id": "n0vscbzjpxo1j" }, "x-internal": true, "description": "Delete `SiteRateSchedule` by ID", "requestBody": { "content": {} } } }, "/v1/site_rate_schedules/{site-rate-schedule-id}/auto_add_on_assignments": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "site-rate-schedule-id", "in": "path", "required": true, "description": "SiteRateSchedule ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create AutoAddOnAssignments for a SiteRateSchedule", "tags": [ "AutoAddOnAssignments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-site_rate_schedules-site-rate-schedule-id-auto_add_on_assignments", "x-stoplight": { "id": "2utuw9y73vppe" }, "x-internal": true, "description": "Create `AutoAddOnAssignments` for a `SiteRateSchedule`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAddOnAssignment-Create" } } } } }, "get": { "summary": "Get AutoAddOnAssignments for a SiteRateSchedule", "tags": [ "AutoAddOnAssignments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "1v8fq6f1bnymy" }, "items": { "$ref": "#/components/schemas/AutoAddOnAssignment-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-site_rate_schedules-site-rate-schedule-id-auto_add_on_assignments", "x-stoplight": { "id": "lb6t2lbbjuhhx" }, "x-internal": true, "description": "Get `AutoAddOnAssignments` for a `SiteRateSchedule`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-account_type" } ] } }, "/v1/sites": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new Site", "operationId": "post-v1-sites", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "k7lhkqzzwuk2f" }, "description": "Create a new `Site`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Site-Create" } } } }, "tags": [ "Sites" ] }, "get": { "summary": "Retrieve Sites that belong to the current Company", "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-sites", "description": "Retrieve `Site` for a `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "$ref": "#/components/parameters/filter-department_ids" }, { "$ref": "#/components/parameters/filter-site_types" } ], "x-stoplight": { "id": "vn5123d2arw9q" }, "tags": [ "Sites" ] } }, "/v1/sites/dispatch": { "parameters": [ { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " } ], "get": { "summary": "Retrieve Sites based on the current Dispatch results", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-sites-dispatch-index", "parameters": [ { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" }, { "$ref": "#/components/parameters/facet-filter-waypoint-type" } ], "x-internal": true, "description": "Returns `Sites`, but instead of all `Sites` for a `Company` this returns all `Sites` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs.\n", "x-stoplight": { "id": "7hw1qdoh30cza" } } }, "/v1/sites/dispatch/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Sites based on the current Dispatch results", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-sites-dispatch", "x-stoplight": { "id": "hzrkjbdk62679" }, "parameters": [ { "$ref": "#/components/parameters/filter-dispatch_number_ids" }, { "$ref": "#/components/parameters/filter-job-company_ids" }, { "$ref": "#/components/parameters/filter-job-customer_account_ids" }, { "$ref": "#/components/parameters/filter-job-driver_ids" }, { "$ref": "#/components/parameters/filter-job-dropoff_site_ids" }, { "$ref": "#/components/parameters/filter-job-end_date" }, { "$ref": "#/components/parameters/filter-job-equipment_ids" }, { "$ref": "#/components/parameters/filter-job-external_ids" }, { "$ref": "#/components/parameters/filter-job-material_ids" }, { "$ref": "#/components/parameters/filter-job-pickup_site_ids" }, { "$ref": "#/components/parameters/filter-job-project_ids" }, { "$ref": "#/components/parameters/filter-job-service_ids" }, { "$ref": "#/components/parameters/filter-job-site_types" }, { "$ref": "#/components/parameters/filter-job-start_date" }, { "$ref": "#/components/parameters/filter-job-states" }, { "$ref": "#/components/parameters/filter-job-vendor_account_ids" }, { "$ref": "#/components/parameters/search-job-datagrid" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/facet-search-query" }, { "$ref": "#/components/parameters/facet-filter-waypoint-type" } ], "x-internal": true, "description": "Returns `Sites` in a typeahead style but instead of all `Sites` for a `Company` this returns all `Sites` that are associated to the dispatch list, where the dispatch list is defined by the `filter` and `search` inputs." } }, "/v1/sites/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Sites", "tags": [ "Typeaheads", "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Site-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-sites-typeahead", "description": "Typeahead search against the `name`, or `external_id` property for `Sites` visible to the currently authenticated `Company`.", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-states" } ], "x-stoplight": { "id": "jrkvfu8c3q0vl" } } }, "/v1/sites/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Site", "deprecated": true, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-sites-id", "description": "Retrieve a `Site` by ID", "x-stoplight": { "id": "uuekoybwm7wzt" }, "tags": [ "Sites" ] }, "patch": { "summary": "Update a Site", "operationId": "patch-v1-sites-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "febb3uxt2nw10" }, "tags": [ "Sites" ], "description": "Update `Site` by ID\n\nThis endpoint required the 'edit_site' permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Site-Update" } } } } }, "delete": { "summary": "Delete a Site by ID", "operationId": "delete-v1-sites-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "v9asxa8m1ssxo" }, "description": "Delete a `Site` by ID\n\nThis endpoint requires the `delete_site` permission", "tags": [ "Sites" ] } }, "/v1/sites/{site-id}/activate": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Activate a Site", "operationId": "put-v1-sites-site-id-activate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "njjuuzuk14xuj" }, "tags": [ "Sites" ], "description": "Activate a `Site` by ID\n\nThis endpoint requires the `edit_site` permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/sites/{site-id}/additional_geofences": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create an Additional Geofence for a Site", "tags": [ "Sites" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-sites-site_id-additional_geofences", "x-stoplight": { "id": "b27gvueac52km" }, "description": "Create an `Additional Geofence` for a `Site`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NextBillionGeofence-Create" } } } } }, "get": { "summary": "Retrieve additional geofences for a Site", "deprecated": true, "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "madrvw3rqaljm" }, "items": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-sites-site_id-additional_geofences", "x-stoplight": { "id": "n1fyym0b7sdfh" }, "description": "Retrieve additional `geofences` for a `Site` by `site_id`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/sites/{site-id}/additional_geofences/bulk_assign": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Bulk assign Additional Geofences for a Site", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "fr7ix9vpc898h" }, "type": "array", "items": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-sites-site_id-additional_geofences-bulk_assign", "x-stoplight": { "id": "410kclq9qaaba" }, "description": "Bulk assign `Additional Geofences` for a `Site` by `ID`\n\nThis will rewrite all `Additional Geofences` for the `Site` with payload data.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "additional_geofences" ], "properties": { "additional_geofences": { "type": "array", "x-stoplight": { "id": "zxyq8ml6adtgl" }, "items": { "$ref": "#/components/schemas/NextBillionGeofence-Create" } } } } } } } } }, "/v1/sites/{site-id}/additional_geofences/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Additional Geofence ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve an Additional Geofence by ID", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-sites-site_id-additional_geofences-id", "x-stoplight": { "id": "7wzninmlccg3q" }, "description": "Retrieve an `Geofence` for a `Site` by `ID`" }, "patch": { "summary": "Update an Additional Geofence for a Site", "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-sites-site_id-additional_geofences-id", "x-stoplight": { "id": "vd10iqcccr6zu" }, "description": "Update an `Additional Geofence` for a `Site` by `ID`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NextBillionGeofence-Update" } } } } } }, "/v1/sites/{site-id}/company_shares": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve CompanyShares for a Site", "tags": [ "CompanyShares" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyShare-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-sites-site-id-company_shares", "description": "Retrieve `CompanyShares` for a `Site`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/sites/{site-id}/contacts": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Contacts for a Site", "deprecated": true, "tags": [ "Sites" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "jmaedpgurmz8e" }, "items": { "$ref": "#/components/schemas/Contact-Read-Nested" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-sites-site-id-contacts", "x-stoplight": { "id": "m6ftngksysg17" }, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ], "description": "Retrieve all `Contacts` visible to your `Company` for a `Site`" } }, "/v1/sites/{site-id}/contacts/bulk_assign": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Assign Contacts for a Site", "tags": [ "Sites" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-sites-site-id-contacts-bulk_assign", "x-stoplight": { "id": "le5cnpnn3ewom" }, "description": "Assigns `Contacts` for a `Site`", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactBulkAssign-Create" } } } } } }, "/v1/sites/{site-id}/deactivate": { "parameters": [ { "schema": { "type": "string" }, "name": "site-id", "in": "path", "required": true, "description": "Site ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Deactivate a Site", "operationId": "put-v1-sites-site-id-deactivate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Site-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "tags": [ "Sites" ], "description": "Deactivate a `Site` by ID\n\nThis endpoint requires the `edit_site` permission", "x-stoplight": { "id": "h0koklrlsanml" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/sso_connections": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Retrieve a list of SSOConnections for a given email", "tags": [ "Authentication" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SSOConnection-Read" } } } } } } }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-sso_connections", "x-stoplight": { "id": "wkp0lw5wbamay" }, "description": "Retrive a list of `SSOConnections` for a given `email`", "security": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SSOConnection-Query" } } } } } }, "/v1/telematics/fleets": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Telematics Fleets visible to the current Company", "tags": [ "Telematics" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "yxddrx1suecmq" }, "items": { "$ref": "#/components/schemas/TelematicsFleet-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-telematics_fleet", "x-stoplight": { "id": "b5swlyac0yi3z" }, "description": "Retrieve `TelematicsFleets` visible to the currently authenticated `Company`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" } ] } }, "/v1/telematics/fleets/{fleet-id}/remote_vehicles": { "parameters": [ { "schema": { "type": "string" }, "name": "fleet-id", "in": "path", "required": true, "description": "Fleet ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve all Remote Vehicles for a Telematics Fleet visible to the current Company", "tags": [ "Telematics" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "ldg7xe292ml6s" }, "items": { "$ref": "#/components/schemas/TelematicsRemoteVehicle-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-telematics-fleets-:id-remote_vehicles", "x-stoplight": { "id": "88nz5bw8kqauh" }, "description": "Retrieve all `Remote Vehicles` for a `Telematics Fleet` visible to the current Company", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" } ] } }, "/v1/telematics/remote_vehicles/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Telematics Remote Vehicle ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "patch": { "summary": "Update a Telematics Remote Vehicle", "tags": [ "Telematics" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/TelematicsRemoteVehicle-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-telematics-remote_vehicle-id", "x-stoplight": { "id": "tcbxsox3f288c" }, "description": "Update a `Telematics Remote Vehicle` by `id`.\n\nThis endpoint requires the `edit_telematics_remote_vehicles` permission.\n", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TelematicsRemoteVehicle-Update" } } } } } }, "/v1/tickets": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a Ticket", "operationId": "post-v1-tickets", "responses": { "201": { "description": "Created", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "grug3kaa54qpn" }, "tags": [ "Tickets" ], "description": "Create a `Ticket`\n\nThis endpoint requires the `create_ticket` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ticket-Create" } } } } }, "get": { "summary": "Retrieve Tickets that belong to the current Company", "tags": [ "Tickets" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "tria7go8pqqi9" }, "items": { "$ref": "#/components/schemas/Ticket-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "get-v1-tickets", "x-stoplight": { "id": "ip4clt2871jqj" }, "description": "Retrieve `Tickets` for a `Company`\n\nFilter usage:\n* to filter a from date: `filter[from_date]`\n* to filter a to date: `filter[to_date]`", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[from_date]", "description": "Start range of ticket.created_at" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[to_date]", "description": "End range of ticket.created_at" }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[flagged]", "description": "Filter to only flagged or un-flagged Tickets" } ], "x-internal": true } }, "/v1/tickets/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Ticket ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Ticket", "tags": [ "Tickets" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-tickets-id", "x-stoplight": { "id": "l4iqzqn7t4xzj" }, "description": "Retrieve `Ticket` by ID" }, "patch": { "summary": "Update a Ticket", "operationId": "patch-v1-tickets-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "ukwpwcy5dis0t" }, "tags": [ "Tickets" ], "description": "Update a `Ticket` by ID\n\nThis endpoint requires the `edit_ticket` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ticket-Update" } } } } }, "delete": { "summary": "Delete a Ticket", "operationId": "delete-v1-tickets-id", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "yraim58bdmx84" }, "tags": [ "Tickets" ], "description": "Delete a `Ticket` by ID\n\nThis endpoint requires the `delete_ticket` permission" } }, "/v1/tickets/{ticket-id}/ai_metadata": { "parameters": [ { "schema": { "type": "string" }, "name": "ticket-id", "in": "path", "required": true, "description": "Ticket ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve a single Ticket's AI metadata", "tags": [ "Tickets" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Ticket-Metadata-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-tickets-ticket-id-ai-metadata", "x-stoplight": { "id": "aaaqzqn7t4xzj" }, "description": "Retrieve `Ticket`'s AI metadata by ID" } }, "/v1/tickets/{ticket-id}/approve": { "parameters": [ { "schema": { "type": "string" }, "name": "ticket-id", "in": "path", "required": true, "description": "Ticket ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Approve a Ticket", "operationId": "put-v1-tickets-ticket-id-approve", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Approve a `Ticket` by ID\n\nThis endpoint requires the `edit_ticket` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "p7hd8j339m33d" }, "tags": [ "Tickets" ] } }, "/v1/tickets/{ticket-id}/image": { "parameters": [ { "schema": { "type": "string" }, "name": "ticket-id", "in": "path", "required": true, "description": "Ticket ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Update the Image that belongs to a Ticket", "operationId": "post-v1-tickets-ticket-id-image", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "j9qfptfyqfedu" }, "tags": [ "Tickets" ], "description": "Add or replace the `image` for a `Ticket`. \n\nThis endpoint requires the `edit_ticket` `IamPermission`\n\nThe following restrictions apply:\n * `image` must be one of the following image types:`jpeg`, `jpg`.\n\n* If you're using a `DirectUpload` then you must use the `application/json` mime-type and `image` 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 `image` must be a file.", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Ticket-Image-Create" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Ticket-Image-Create" } } } } }, "delete": { "summary": "Delete the Image that belongs to a Ticket", "operationId": "delete-v1-tickets-ticket-id-image", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "0jji2xykebe3z" }, "tags": [ "Tickets" ], "description": "Delete the `image` for a `Ticket`. \n\nThis endpoint requires the `delete_ticket` `IamPermission`" } }, "/v1/tickets/{ticket-id}/void": { "parameters": [ { "schema": { "type": "string" }, "name": "ticket-id", "in": "path", "required": true, "description": "Ticket ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Void a Ticket", "operationId": "put-v1-tickets-ticket-id-void", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Ticket-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "409": { "$ref": "#/components/responses/StateError" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "Void a `Ticket` by ID.\n\nThis endpoint requires the `edit_ticket` permission.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "x-stoplight": { "id": "9hs3hplf1xkrm" }, "tags": [ "Tickets" ] } }, "/v1/traffic_control_plans/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Traffic Control Plans", "tags": [ "Typeaheads" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "x-stoplight": { "id": "lhtoihtpghk3f" }, "type": "array", "items": { "$ref": "#/components/schemas/TrafficControlPlan-Read-Typeahead" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-traffic_control_plans-typeahead", "x-stoplight": { "id": "bzyu4qke4lumc" }, "description": "Typeahead search against the `name` property for `Traffic Control Plans` visible to the currently authenticated `Company`.\n", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" } ] } }, "/v1/users": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a User", "operationId": "post-v1-users", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Read", "x-stoplight": { "id": "fc68vd1prtuts" } } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Create a `User`\n\nThis endpoint requires the `create_user` permission", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User-Create" } } } }, "tags": [ "Users" ] }, "get": { "summary": "Retrieve Users that belong to the current Company", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "x-stoplight": { "id": "sdssn4pxcl3iy" }, "type": "array", "items": { "$ref": "#/components/schemas/User-Read", "x-stoplight": { "id": "29tkyj0rzkrl0" } } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-datagrid" }, { "schema": { "type": "string", "enum": [ "execute_jobs", "manage_sites", "manage_materials", "manage_equipment", "manage_accounts", "manage_users" ] }, "in": "query", "name": "filter[access]", "description": "User access filter", "allowEmptyValue": true }, { "$ref": "#/components/parameters/filter-iam_roles" }, { "$ref": "#/components/parameters/filter-label_ids" } ], "description": "Retrieve `Users` visible to your `Company`\n\nDatagrid search (`search[datagrid]`) queries against the following properties:\n * `first_name`\n * `last_name`\n * `email`\n * `phone`\n * `company.legal_name`\n * `iam_roles.name`\n\nNote:\n- `filter[iam_roles]` array are applied as `OR` in the query\n- `filter[label_ids]` array are applied as `OR` in the query" } }, "/v1/users/me": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the current User", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Me-Read" } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-me", "description": "Retrieve the current authenticated `User`", "tags": [ "Users" ] } }, "/v1/users/me/access": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve current User's Access", "tags": [ "Users" ], "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "x-stoplight": { "id": "83mx63p61cb6q" }, "items": { "$ref": "#/components/schemas/Access-Read" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-me-access", "x-stoplight": { "id": "8osd42hir7w7m" }, "description": "Retrieve current `User`'s `Access`", "x-internal": true } }, "/v1/users/me/device_tokens": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a new UserDeviceToken", "tags": [ "Integrations" ], "operationId": "post-v1-users-user-id-device_tokens", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DeviceToken-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "5i0dob2olucfs" }, "description": "This endpoint stores the firebase user token on the backend to generate notifications.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceToken-Create" } } } }, "x-internal": true } }, "/v1/users/me/driver_day": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve current User's DriverDay", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-me-driver_day", "x-stoplight": { "id": "cgk9hj2rmkxw5" }, "x-internal": true, "description": "Retrieve current `User`'s `DriverDay`", "tags": [ "DriverDays" ] } }, "/v1/users/me/driver_day/break": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update Driver to Break State for Current Driver Day", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-me-driver_day-break", "x-internal": true, "description": "Updates the current authenticated driver to break state for their active `DriverDay`.\nThis endpoint requires the `Driver` role", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_day/off_duty": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Mark the current DriverDay as off duty", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-me-driver_day-off_duty", "x-internal": true, "description": "Mark the current `DriverDay` as off duty by calling the `DriverDayService.off_duty!` service method.\nThis endpoint requires the `Driver` role", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_day/on_duty": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Start or resume the current DriverDay", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-me-driver_day-on_duty", "x-internal": true, "description": "Start or resume the current `DriverDay`.\nThis endpoint requires the `Driver` role", "x-stoplight": { "id": "wakspqgdghnwe" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_days/previous": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve current User's Previous DriverDays", "tags": [ "DriverDays" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "7m8ls2c2p82sc" }, "items": { "$ref": "#/components/schemas/DriverDay-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-me-driver_days-previous", "x-stoplight": { "id": "axjkg4x0xye3r" }, "x-internal": true, "description": "Retrieve current `User`'s Previous `DriverDays`. It does not include the current `DriverDay` for the current `User`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-start_date" }, { "$ref": "#/components/parameters/filter-end_date" } ] } }, "/v1/users/me/driver_state": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the current driver_state", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/DriverStateEvent-Read" } } } } } }, "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-me-driver_state", "description": "Retrieve the current driver_state of the `User` if user is a `driver`.\nThis endpoint requires the `Driver` role", "x-stoplight": { "id": "3r6knyjwslf8r" }, "tags": [ "DriverStateEvent" ], "x-internal": true } }, "/v1/users/me/driver_state/break": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update Driver State to break", "operationId": "put-v1-users-me-driver_state-break", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/DriverStateEvent-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "This endpoint will update the status of a `driver` to `break`.\nThis endpoint requires the `Driver` role", "x-internal": true, "tags": [ "DriverStateEvent" ], "x-stoplight": { "id": "3dd5zs6xv4efd" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_state/off_duty": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update Driver State to off_duty", "operationId": "put-v1-users-me-driver_state-off_duty", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/DriverStateEvent-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "description": "This endpoint will update the status of a `driver` to `off_duty`.\nThis endpoint requires the `Driver` role", "x-internal": true, "tags": [ "DriverStateEvent" ], "x-stoplight": { "id": "rng97e9k7325i" }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_state/on_duty": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update Driver State to on_duty", "operationId": "put-v1-users-me-driver_state-on_duty", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/DriverStateEvent-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "tpt1ubr0empbb" }, "description": "This endpoint will update the status of a `driver` to `on_duty`.\nThis endpoint requires the `Driver` role", "x-internal": true, "tags": [ "DriverStateEvent" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/me/driver_state/time_logged": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the time driver logged today", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Driver-Time-Logged-Read" } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-me-driver_state_time_logged", "description": "Retrieve the time in minutes the `driver` was on_duty today.\nThis endpoint requires the `Driver` role", "tags": [ "DriverStateEvent" ], "x-internal": true, "x-stoplight": { "id": "83m58md6hxaor" } } }, "/v1/users/me/iam_permissions": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve Permissions granted to the current User", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/IamPermission-Read-Nested" } } }, "required": [ "data" ] } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-me-iam-permissions", "description": "Retrieve the current authenticated users permissions", "tags": [ "Users" ], "x-stoplight": { "id": "oshhefbjay9o3" } } }, "/v1/users/me/location": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Set Current Location", "tags": [ "Users" ], "operationId": "get-v1-users-me-location", "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "vpv57qj94t9zg" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileDeviceLocation-Create" } } } }, "x-internal": true, "description": "Set the current location for a User's Mobile Device" } }, "/v1/users/me/locations": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Bulk Create Historical Locations", "tags": [ "Users" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "patch-v1-users-me-location", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MobileDeviceLocations-Create" } } } }, "x-stoplight": { "id": "01j1tm6m17rt2" }, "x-internal": true, "description": "Record historical location data for a User's Mobile Device" } }, "/v1/users/me/user_device_permissions": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Update UserDevicePermissions", "tags": [ "UserDevicePermission" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "hj6esbdtqp5ps" } } } } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" } }, "operationId": "put-v1-user_device_permissions", "x-stoplight": { "id": "pxqntykou9mmn" }, "description": "This endpoint will be used by the mobile app to update the user's permissions given in the app.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDevicePermission-Update" } } } } } }, "/v1/users/typeahead": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Typeahead search on Users", "tags": [ "Typeaheads", "Users" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/User-Read-Typeahead" } } }, "required": [ "data" ] } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-typeahead", "description": "Typeahead search against the `first_name` and `last_name` property for `Users` visible to the currently authenticated `Company`.\n\nNote:\n- `filter[iam_roles]` array are applied as `OR` in the query", "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/search-query" }, { "$ref": "#/components/parameters/filter-iam_roles" } ], "x-stoplight": { "id": "ot445z3l0x9vy" } } }, "/v1/users/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve User", "operationId": "get-v1-users-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/User-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "x-stoplight": { "id": "aa3d7et8uws3l" }, "description": "Retrieve a `User` by ID", "tags": [ "Users" ] }, "patch": { "summary": "Update a User", "operationId": "patch-v1-users-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/User-Read" } }, "required": [ "data" ] } } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "description": "Update a `User` by ID\n\nA `User` can always update their own `Equipment` via the `equipment_id` /`additional_equipment_ids` properties.\n\nAny other updates require the `edit_user` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User-Update" } } } }, "tags": [ "Users" ] }, "delete": { "summary": "Delete a User", "operationId": "delete-v1-users-id", "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "x-stoplight": { "id": "5x7b0jxyu11c0" }, "description": "Delete a `User` by ID\n\nThis endpoint requires the `delete_user` permission", "tags": [ "Users" ] } }, "/v1/users/{user-id}/impersonations": { "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Impersonate a User", "tags": [ "Users" ], "responses": { "201": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AuthToken" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-users-user-id-impersonations", "x-stoplight": { "id": "odezqsjnkifwz" }, "x-internal": true, "description": "Impersonate a `User`. \n\nThis endpoint requires the `impersonate` `IamPermission`. " } }, "/v1/users/{user-id}/invite/email": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send an Email Invite to a User", "tags": [ "Users" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "adspcrg3phakp" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-user-id-invite-email", "x-stoplight": { "id": "hlezr70c8g6yf" }, "description": "This endpoint sends an Email invite to a `User` asynchronously.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/{user-id}/invite/sms": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Send an SMS Invite to a User", "tags": [ "Users" ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "string", "x-stoplight": { "id": "sx8dj8kbpae6u" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-user-id-invite-sms", "x-stoplight": { "id": "86ihbacn7wppo" }, "description": "This endpoint sends an SMS invite to a `User` asynchronously.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } } }, "/v1/users/{user-id}/resource_scopes": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create a ResourceScope", "tags": [ "ResourceScopes" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/ResourceScope-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-users-user-id-resource_scopes", "x-stoplight": { "id": "zn35yvtq7u0wa" }, "description": "Create a `ResourceScope`.\n\nThis endpoint requires the `create_resource_scope` permission.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResourceScope-Create" } } } } }, "get": { "summary": "Retrieve ResourceScopes for a User", "tags": [ "ResourceScopes" ], "responses": { "200": { "description": "OK", "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "x-stoplight": { "id": "eip7tkhv50170" }, "items": { "$ref": "#/components/schemas/ResourceScope-Read" } } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-user-id-resource_scopes", "x-stoplight": { "id": "qm98v9vg3cc6g" }, "description": "Retrieve `ResourceScopes` for a `User`.", "parameters": [ { "$ref": "#/components/parameters/page-limit" }, { "$ref": "#/components/parameters/page-after" }, { "$ref": "#/components/parameters/page-before" }, { "$ref": "#/components/parameters/filter-resource_type" } ] } }, "/v1/users/{user-id}/scheduled_time_offs": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "post": { "summary": "Create Scheduled Time Off", "tags": [ "Users" ], "responses": { "201": { "description": "Create Schedule Time off", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Scheduled-Time-Off-Read" } } } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "post-v1-users-user-id-scheduled_time_offs", "x-stoplight": { "id": "ubfk9lzx43bvu" }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Scheduled-Time-Off-Create" } } } }, "description": "Create a Scheduled Time Off for a `User`" }, "get": { "summary": "Retrieve Scheduled Time Offs for a User", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Scheduled-Time-Off-Read" } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "Contains prev and next links for pagination" } } }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-v1-users-user-id-scheduled-time-offs", "description": "Retrieve all active `ScheduledTimeOffs` visible to your `Company` for a `User`", "x-stoplight": { "id": "02awe5qks8fom" }, "tags": [ "Users" ] } }, "/v1/users/{user-id}/scheduled_time_offs/available": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Mark Schedule Available", "tags": [ "Users" ], "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-user-id-scheduled_time_offs-available", "x-stoplight": { "id": "1sv20rk9hgx3p" }, "description": "Mark current `User` as available and disable any `Scheduled Time Off`" } }, "/v1/users/{user-id}/scheduled_time_offs/unavailable": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User Id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "put": { "summary": "Mark Schedule Unavailable", "tags": [ "Users" ], "responses": { "202": { "description": "Shared Response", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "put-v1-users-user-id-scheduled_time_offs-unavailable", "description": "Mark current `User` as unavailable and create a new `Scheduled time off`", "x-stoplight": { "id": "ofzx9cwy5ijgn" } } }, "/v1/users/{user-id}/scheduled_time_offs/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User Id" }, { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Scheduled time off id" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Delete a Scheduled Time Off", "tags": [ "Users" ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "404": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/ModelError" } }, "operationId": "delete-v1-users-user-id-scheduled_time_offs-id", "x-stoplight": { "id": "zrkopxn2l5756" }, "description": "Delete Scheduled Time Off for a `User`" } }, "/v1/users/{user-id}/sessions": { "parameters": [ { "schema": { "type": "string" }, "name": "user-id", "in": "path", "required": true, "description": "User ID" }, { "$ref": "#/components/parameters/Accept-Language" } ], "delete": { "summary": "Revokes all active B2B and B2B sessions for the given User", "tags": [ "Users" ], "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/components/responses/Error" }, "401": { "$ref": "#/components/responses/UnauthenticatedError" }, "403": { "$ref": "#/components/responses/Error" }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "delete-v1-users-user-id-sessions", "description": "This endpoint revokes all active B2B and B2C sessions for the given `User`", "requestBody": { "content": {} }, "x-internal": true, "x-stoplight": { "id": "xrvamut2wb30i" } } }, "/version": { "parameters": [ { "$ref": "#/components/parameters/Accept-Language" } ], "get": { "summary": "Retrieve the current Version", "tags": [ "Reflection" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Version-Read" } }, "required": [ "data" ] } } } }, "406": { "$ref": "#/components/responses/Error" } }, "operationId": "get-version", "x-stoplight": { "id": "a0zz4u8l2iyzr" }, "x-internal": true, "description": "Retrieve the current `Version`", "security": [] } } }, "components": { "schemas": { "Access-Read": { "title": "Access-Read", "x-stoplight": { "id": "3c7it51r82hzg" }, "type": "object", "x-internal": true, "required": [ "name" ], "properties": { "name": { "$ref": "#/components/schemas/AccessName" } }, "additionalProperties": false }, "AccessName": { "title": "AccessName", "x-stoplight": { "id": "xfxqkifvw0lml" }, "enum": [ "manage_users", "manage_accounts", "manage_equipment", "manage_materials", "manage_sites", "execute_jobs", "manage_departments", "manage_rates", "manage_companies", "manage_service_classes", "mobile_tab_schedule", "mobile_tab_driver", "mobile_tab_submit", "mobile_tab_approvals", "mobile_tab_dispatch", "mobile_tab_dispatch_pending", "mobile_tab_assigned", "mobile_tab_assigned_driver", "mobile_tab_assigned_foreman", "mobile_tab_review", "mobile_tab_review_driver", "mobile_tab_review_foreman", "mobile_tab_live_map", "mobile_tab_history", "manage_telematics", "manage_project_attachments", "manage_order_attachments", "manage_job_attachments", "manage_load_attachments", "mobile_tab_shift", "manage_driver_day_attachments", "manage_settlement_attachments", "manage_labels", "sales_tab", "dispatch_tab", "approvals_tab", "live_map_tab", "reports_tab", "settings_tab", "assigned_tab", "assigned_tab_driver", "assigned_tab_foreman", "assigned_tab_salesperson", "manage_compliance" ] }, "Account-Connected-Customer-Create": { "title": "Account-Connected-Customer-Create", "x-stoplight": { "id": "8k1ulz2srbdfc" }, "allOf": [ { "$ref": "#/components/schemas/TreadId" }, { "type": "object", "x-stoplight": { "id": "43gxez0djvi2s" }, "required": [ "account_types" ], "properties": { "account_types": { "type": "array", "items": { "$ref": "#/components/schemas/AccountType" } } } } ] }, "Account-Connected-Platform-Admin-Create": { "title": "Account-Connected-Platform-Admin-Create", "x-stoplight": { "id": "wxdp7kwawtfvy" }, "type": "object", "x-internal": true, "required": [ "sender_company_id", "receiver_company_id", "sender_account_types" ], "properties": { "sender_company_id": { "type": "string", "x-stoplight": { "id": "qlhllclu1mlik" }, "format": "uuid" }, "receiver_company_id": { "type": "string", "x-stoplight": { "id": "lhfwxs74141ue" }, "format": "uuid" }, "sender_account_types": { "type": "array", "x-stoplight": { "id": "0map8tgws15zb" }, "items": { "$ref": "#/components/schemas/AccountType" } } }, "additionalProperties": false }, "Account-Connected-Read-Nested": { "title": "Account-Connected-Read-Nested", "x-stoplight": { "id": "pg8wjapp9i57b" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Discardable" }, { "type": "object", "x-stoplight": { "id": "afxdwofm2lvk9" }, "required": [ "account_types", "truck_count", "auto_accept_orders" ], "properties": { "account_types": { "type": "array", "x-stoplight": { "id": "fuy2f5ufr4t1y" }, "items": { "$ref": "#/components/schemas/AccountType" } }, "truck_count": { "type": "integer", "x-stoplight": { "id": "qy4yfietl0bn9" } }, "auto_accept_orders": { "type": "boolean", "x-stoplight": { "id": "9i9aevgy5ke86" } } } } ], "description": "" }, "Account-Create": { "title": "Account-Create", "x-stoplight": { "id": "gxkg5vrqlzq89" }, "type": "object", "required": [ "name", "account_types", "auto_accept_orders" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "5298s0s0peapc" }, "description": "Account name" }, "department": { "type": "string", "x-stoplight": { "id": "jcmgf3qz70e9w" }, "description": "Department", "deprecated": true, "nullable": true }, "department_id": { "type": "string", "x-stoplight": { "id": "ewd9im004flot" }, "format": "uuid", "description": "The ID of the associated **Department**.\n\nThis should be used instead of `department`.", "nullable": true }, "primary_contact": { "$ref": "#/components/schemas/Contact-Create" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Create" }, "address": { "$ref": "#/components/schemas/Address-Create" }, "billing_address": { "$ref": "#/components/schemas/Address-Create" }, "notes": { "type": "string", "x-stoplight": { "id": "cekepr6fg19fx" }, "description": "Notes", "nullable": true }, "account_types": { "type": "array", "x-stoplight": { "id": "fz4g38ct2r9l3" }, "description": "Account type allowing for multiple values", "items": { "$ref": "#/components/schemas/AccountType" } }, "external_id": { "type": "string", "x-stoplight": { "id": "ck449dcgiige8" }, "description": "Identifier used to associate an account to any external system", "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "ck459dchijge8" }, "description": "The accounting ID of the Account mapping to any accounting system", "nullable": true }, "company_id": { "type": "string", "x-stoplight": { "id": "x9ow3nfelos0a" }, "format": "uuid" }, "truck_count": { "type": "integer", "x-stoplight": { "id": "qzekegh1h2ztd" }, "description": "The allowable number of trucks that is dispatchable to the customer of this account.", "default": 0, "nullable": true }, "auto_accept_orders": { "type": "boolean", "x-stoplight": { "id": "tjzapla5k8r8f" }, "default": false, "description": "Indicates whether orders and their jobs will be accepted automatcially into the vendor account." }, "label_ids": { "type": "array", "x-stoplight": { "id": "lbl1d5cr8acc1" }, "description": "Array of Label IDs to assign to this account.", "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "Account-External-Truck-Identifier-Read": { "title": "Account-External-Truck-Identifier-Read", "x-stoplight": { "id": "n2ygzbhwjvjci" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "7drowvqofpzx9" }, "required": [ "last_ticket_received_at", "account", "external_truck_id", "vendor_account" ], "properties": { "last_ticket_received_at": { "type": "string", "x-stoplight": { "id": "jdad4m2qwp6ru" }, "nullable": true }, "account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read" }, "external_truck_id": { "type": "string", "x-stoplight": { "id": "ec1bnufk87bbo" } }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" } } } ] }, "Account-External-Truck-Identifier-Update": { "title": "Account-External-Truck-Identifier-Update", "x-stoplight": { "id": "6mxvtqu0gyhox" }, "type": "object", "properties": { "company_share_id": { "type": "string", "x-stoplight": { "id": "uc5wqezq5b80g" }, "nullable": true } }, "additionalProperties": false }, "Account-Invite": { "title": "Account-Invite", "x-stoplight": { "id": "8btqvy3ojzvxj" }, "type": "object", "required": [ "name", "contact", "address", "account_types", "auto_accept_orders" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "szxvxy8gtcs4d" }, "description": "name for the `Account` and `Company`" }, "contact": { "$ref": "#/components/schemas/Contact-Create" }, "address": { "$ref": "#/components/schemas/Address-Create" }, "account_types": { "type": "array", "x-stoplight": { "id": "xqelgawt2nuia" }, "description": "Account type allowing for multiple values", "items": { "$ref": "#/components/schemas/AccountType" } }, "company_id": { "type": "string", "x-stoplight": { "id": "vi6xr68lbj1ln" }, "format": "uuid", "nullable": true }, "department": { "type": "string", "x-stoplight": { "id": "bg894oo5aem0d" }, "deprecated": true, "nullable": true }, "department_id": { "type": "string", "x-stoplight": { "id": "7k6resx8we6g2" }, "format": "uuid", "description": "The ID of the associated **Department**.\n\nThis should be used instead of `department`.", "nullable": true }, "notes": { "type": "string", "x-stoplight": { "id": "mozoefi7tn3vn" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "ghv5udvm51jkh" }, "description": "Identifier used to associate an account to any external system", "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "hgv5udvm51jkh" }, "description": "The accounting ID of the Account mapping to any accounting system", "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "xxujn60891ma2" }, "description": "The allowable number of trucks that is dispatchable to the customer of this account.", "nullable": true }, "auto_accept_orders": { "type": "boolean", "x-stoplight": { "id": "osbpw6who0ya6" }, "description": "Indicates whether orders and their jobs will be accepted automatcially into the vendor account." }, "send_invite": { "$ref": "#/components/schemas/SendInvite" }, "company_type": { "x-stoplight": { "id": "xbozhh7e5fbt9" }, "enum": [ "broker", "contractor", "hauler", "owner_operator", "producer" ], "default": "producer" }, "equipment": { "$ref": "#/components/schemas/Account-Invite-Equipment-Create" }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "scoped_company_id": { "type": "string", "x-stoplight": { "id": "9sfcuew1u5enw" }, "format": "uuid", "nullable": true }, "internal_equipment": { "$ref": "#/components/schemas/Account-Invite-Internal-Equipment-Create" }, "label_ids": { "type": "array", "x-stoplight": { "id": "lbl1d5cr8inv1" }, "description": "Array of Label IDs to assign to this account.", "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "Account-Invite-Equipment-Create": { "title": "Account-Connected-Equipment-Create", "x-stoplight": { "id": "96z7vtoxp435z" }, "type": "object", "required": [ "name", "equipment_type_name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "79jp1s2je16pq" } }, "external_id": { "type": "string", "x-stoplight": { "id": "k8wmn7qq9njbq" } }, "license_number": { "type": "string", "x-stoplight": { "id": "7sjz7irjuf0ii" } }, "equipment_type_name": { "type": "string", "x-stoplight": { "id": "lse1trsvxmrn0" } }, "company_share_external_id": { "type": "string", "x-stoplight": { "id": "pmf52ug1jsgn0" } } }, "additionalProperties": false }, "Account-Invite-Internal-Equipment-Create": { "title": "Account-Invite-Internal-Equipment-Create", "x-stoplight": { "id": "vc772nrou4cni" }, "type": "object", "required": [ "name", "equipment_type_id" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "26xxohy7ema3a" } }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "6vdvg75fmsz5w" }, "format": "uuid" }, "ownership": { "$ref": "#/components/schemas/EquipmentOwnership" }, "state": { "$ref": "#/components/schemas/EquipmentState" }, "home_base_id": { "type": "string", "x-stoplight": { "id": "m3vqw8fx2k7nt" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "Account-LatestLocation-Read-Nested": { "title": "Account-LatestLocation-Read-Nested", "x-stoplight": { "id": "rrobgjwm8y242" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "4hcvfg9m00lsi" } } }, "additionalProperties": false }, "Account-Read": { "title": "Account-Read", "x-stoplight": { "id": "wei0biagg591t" }, "allOf": [ { "$ref": "#/components/schemas/Account-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "notes", "truck_count", "auto_accept_orders", "managed", "labels" ], "properties": { "primary_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "address": { "$ref": "#/components/schemas/Address-Read-Nested" }, "notes": { "type": "string", "x-stoplight": { "id": "2sjpg062n562q" }, "description": "Notes", "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "3ha8rwl257389" }, "description": "The allowable number of trucks that is dispatchable to the customer of this account." }, "auto_accept_orders": { "type": "boolean", "x-stoplight": { "id": "ktqejg58pns0n" }, "default": false, "description": "Indicates whether orders and their jobs will be accepted automatcially into the vendor account." }, "connected_account": { "$ref": "#/components/schemas/Account-Connected-Read-Nested" }, "managed": { "type": "boolean", "x-stoplight": { "id": "cbaejg58pns2s" } }, "department": { "$ref": "#/components/schemas/Department-Read-Nested" }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this account" } } } ] }, "Account-Read-Capacity-Typeahead": { "title": "Account-Read-Capacity-Typeahead", "x-stoplight": { "id": "y06sjzp3z6k4c" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "schedule_on", "current_assigned_count", "current_capacity_count" ], "properties": { "name": { "type": "string", "description": "Account name" }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "hlfa8tn5znpsy" }, "description": "Boolean indicator of this Account's current availablity for being dispatched." }, "current_assigned_count": { "type": "number", "x-stoplight": { "id": "bmr4fet0uassi" }, "description": "The truck capacity of this Account that is already assigned for the day." }, "current_capacity_count": { "type": "number", "x-stoplight": { "id": "eyxnoph0ggkd0" }, "description": "The available truck capacity of this Account for the day." }, "connected_company": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uuid" } } }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this account" } } } ], "x-internal": true }, "Account-Read-Driver-Nested": { "title": "Account-Read-Driver-Nested", "x-stoplight": { "id": "o7ewts6ptb2y9" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "igqzka59d2ywt" }, "required": [ "name", "external_id", "company" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "2so5ohbz96yrf" } }, "external_id": { "type": "string", "x-stoplight": { "id": "zh1jd8d1opfpi" }, "nullable": true }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } } ] }, "Account-Read-Foreman-Nested": { "title": "Account-Read-Foreman-Nested", "x-stoplight": { "id": "6x7nqoxlq0ln4" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "h1gfjls454ke5" }, "required": [ "name", "external_id", "company" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "iwmi0nwyczhsv" } }, "external_id": { "type": "string", "x-stoplight": { "id": "j5lovsve92d2z" }, "nullable": true }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } } ] }, "Account-Read-Nested": { "title": "Account-Read-Nested", "x-stoplight": { "id": "zo8r3gsz1tm5h" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Discardable" }, { "type": "object", "x-stoplight": { "id": "gl7hua7pv8xka" }, "required": [ "name", "account_types", "external_id", "accounting_id", "company", "schedule_on" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "a7g065w5byfcf" } }, "account_types": { "type": "array", "x-stoplight": { "id": "a0e9c3lpr1wad" }, "items": { "$ref": "#/components/schemas/AccountType" } }, "external_id": { "type": "string", "x-stoplight": { "id": "yfrec4y0a90cb" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "yfsec5y0a91cb" }, "nullable": true }, "company": { "type": "object", "x-stoplight": { "id": "9loqtu14mvlnq" }, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "udjkdjrz08pzr" }, "format": "uuid" } } }, "billing_address": { "$ref": "#/components/schemas/Address-Read-Nested" }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "0g9kx77zym4ok" } }, "connected_company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" } } } ] }, "Account-Read-Typeahead": { "title": "Account-Read-Typeahead", "x-stoplight": { "id": "0jtlv216ot4og" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "zinx4pmrlrvkg" }, "required": [ "name", "schedule_on" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "675oqyzkv2xvp" }, "description": "Account name" }, "connected_company": { "type": "object", "x-stoplight": { "id": "9e36j656fhsso" }, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "8nxy7z0w3h51m" }, "format": "uuid" } } }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "4yv7e5z57qmn2" } } } } ], "x-internal": true }, "Account-Update": { "title": "Account-Update", "x-stoplight": { "id": "2zrntg5xhcmsd" }, "description": "Update model for `Account`", "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "cv2ymke8sutek" }, "description": "Account name" }, "department": { "type": "string", "x-stoplight": { "id": "wtt5wqixu46yn" }, "description": "Department", "deprecated": true, "nullable": true }, "department_id": { "type": "string", "x-stoplight": { "id": "tkd8y8kgx83mc" }, "format": "uuid", "description": "The ID of the associated **Department**.\n\nThis should be used instead of `department`.", "nullable": true }, "primary_contact": { "$ref": "#/components/schemas/Contact-Update" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Update" }, "address": { "$ref": "#/components/schemas/Address-Update" }, "billing_address": { "$ref": "#/components/schemas/Address-Update" }, "notes": { "type": "string", "x-stoplight": { "id": "tqs5b4rdilyyr" }, "description": "Notes", "nullable": true }, "account_types": { "type": "array", "x-stoplight": { "id": "o8crnsajrp9ii" }, "description": "Account type allowing for multiple values", "items": { "$ref": "#/components/schemas/AccountType" } }, "external_id": { "type": "string", "x-stoplight": { "id": "uormrtrev82c5" }, "description": "Identifier used to associate an account to any external system", "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "uosmrurev83c5" }, "description": "The accounting ID of the Account mapping to any accounting system", "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "wlti4u29w4els" }, "description": "The allowable number of trucks that is dispatchable to the customer of this account.", "default": 0 }, "auto_accept_orders": { "type": "boolean", "x-stoplight": { "id": "r2hvfvnc54wx9" }, "default": false, "description": "Indicates whether orders and their jobs will be accepted automatcially into the vendor account." }, "connected_account": { "$ref": "#/components/schemas/Account-Update-Connected" }, "label_ids": { "type": "array", "x-stoplight": { "id": "h6l1mjd3to0yg" }, "description": "Array of Label IDs to assign to this Account", "items": { "type": "string", "format": "uuid" } } } }, { "$ref": "#/components/schemas/AutoAddOn-BulkAssign" } ] }, "Account-Update-Bulk": { "title": "Account-Update-Bulk", "x-stoplight": { "id": "qksofp8c4556h" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "9kzx7a4764y6u" }, "properties": { "available": { "type": "boolean", "description": "Used to set the Account's scheduled time off/on status", "x-stoplight": { "id": "lp2inoi5upycw" } }, "connected_account": { "$ref": "#/components/schemas/Account-Update-Connected" } } } ], "description": "The bulk updates allowed for a single Account", "x-internal": true }, "Account-Update-Connected": { "title": "Account-Update", "x-stoplight": { "id": "tqoelbcljuj2k" }, "type": "object", "description": "Update model for `Account`", "properties": { "truck_count": { "type": "integer", "description": "The allowable number of trucks that is dispatchable to the customer of this account.", "default": 0 } }, "additionalProperties": false }, "AccountType": { "title": "AccountType", "x-stoplight": { "id": "i4vfmd4rwrq8p" }, "enum": [ "customer", "vendor" ], "example": "customer" }, "AddOn-Create": { "title": "AddOn-Create", "x-stoplight": { "id": "o1ksmtglap661" }, "type": "object", "required": [ "name", "add_on_types" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "cl67dsx43nmu0" } }, "cost_rate_value": { "type": "number", "x-stoplight": { "id": "8js81cp6tx9v8" }, "description": "The cost rate or buy price of the add on.", "nullable": true }, "revenue_rate_value": { "type": "number", "x-stoplight": { "id": "8bzixu62d0ste" }, "description": "The revenue rate or sell price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "add_on_types": { "type": "array", "x-stoplight": { "id": "v579mppyl55o8" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "quantity": { "type": "number", "x-stoplight": { "id": "hrcd34s69tbga" } }, "external_id": { "type": "string", "x-stoplight": { "id": "nzp3xodjxp6hi" }, "nullable": true }, "percentage": { "type": "number", "x-stoplight": { "id": "7vjgltw0fe1mf" }, "description": "`RatePercentTotal` specific field", "minimum": -100, "maximum": 100 }, "accounting_id": { "type": "string", "x-stoplight": { "id": "tq2drhrlerp5u" }, "nullable": true }, "rate": { "type": "number", "x-stoplight": { "id": "v9fh5ndjeowwc" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "fuel_surcharge_schedule_id": { "type": "string", "x-stoplight": { "id": "rl4h6y4fwbfhc" }, "format": "uuid", "nullable": true }, "taxable": { "x-stoplight": { "id": "f6h8j0m2n4q6s" }, "type": "boolean", "default": false, "description": "Whether this add-on is eligible for taxation" } }, "additionalProperties": false }, "AddOn-Read": { "title": "AddOn-Read", "x-stoplight": { "id": "pv5vims1nc6wu" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "add_on_types", "quantity", "cost_rate_value", "revenue_rate_value", "revenue_cost_rate_type", "external_id", "percentage", "company", "accounting_id", "rate", "add_on_rate_type", "taxable" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "qmldk5115vb6g" } }, "add_on_types": { "type": "array", "x-stoplight": { "id": "00d1prh7o0dn0" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "quantity": { "type": "string", "x-stoplight": { "id": "etwqachefxyi2" } }, "cost_rate_value": { "type": "string", "x-stoplight": { "id": "02z1yb6pwqgiw" }, "description": "The cost rate or buy price of the add on", "nullable": true }, "revenue_rate_value": { "type": "string", "x-stoplight": { "id": "pq16i16y4jqig" }, "description": "The revenue rate or sell price of the add on" }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "external_id": { "type": "string", "x-stoplight": { "id": "loqwlx3ud5ar3" }, "nullable": true }, "percentage": { "type": "string", "x-stoplight": { "id": "vv7o18vi8pzce" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "accounting_id": { "type": "string", "x-stoplight": { "id": "t76oqekhuly4n" }, "nullable": true }, "rate": { "type": "string", "x-stoplight": { "id": "3b7ro6cldcik7" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "fuel_surcharge_schedule": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read-Nested" }, "taxable": { "x-stoplight": { "id": "u8w0y2b4d6g9i" }, "type": "boolean", "default": false, "description": "Whether this add-on is eligible for taxation" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "AddOn-Read-Nested": { "title": "AddOn-Read-Nested", "x-stoplight": { "id": "v8dl5yn30kkc1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "quantity", "rate", "percentage", "add_on_rate_type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "050zd8kz0vgbs" } }, "quantity": { "type": "string", "x-stoplight": { "id": "c3va13nna81jo" } }, "rate": { "type": "string", "x-stoplight": { "id": "9j3huo3cmv9hx" } }, "percentage": { "type": "string", "x-stoplight": { "id": "qrfrr46gebj4h" } }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "fuel_surcharge_schedule": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read-Nested" } } } ] }, "AddOn-Read-Typeahead": { "title": "AddOn-Read-Typeahead", "x-stoplight": { "id": "b30cmjc02mvjh" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "add_on_rate_type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "tfqmw2od0zvng" } }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "fuel_surcharge_schedule": { "$ref": "#/components/schemas/FuelSurchargeSchedule-Read-Nested" } } } ] }, "AddOn-Update": { "title": "AddOn-Update", "x-stoplight": { "id": "pmbikrt2texf4" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "8d83x31yubex2" } }, "cost_rate_value": { "type": "number", "x-stoplight": { "id": "c759eo8wadm7g" }, "description": "The cost rate or buy price of the add on.", "nullable": true }, "revenue_rate_value": { "type": "number", "x-stoplight": { "id": "b6q0qnut6yezp" }, "description": "The revenue rate or sell price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "add_on_types": { "type": "array", "x-stoplight": { "id": "y8rdc126a6oco" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "quantity": { "type": "number", "x-stoplight": { "id": "b1sgao2v2tluo" } }, "external_id": { "type": "string", "x-stoplight": { "id": "o7p8hcbvq6b5n" }, "nullable": true }, "percentage": { "type": "number", "x-stoplight": { "id": "ci4nu80irnyoc" }, "minimum": -100, "maximum": 100 }, "accounting_id": { "type": "string", "x-stoplight": { "id": "bay8r8dj9cv1r" }, "nullable": true }, "rate": { "type": "number", "x-stoplight": { "id": "0ghnvu2cty0zl" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "fuel_surcharge_schedule_id": { "type": "string", "x-stoplight": { "id": "ms29nqmq7yzc3" }, "format": "uuid", "nullable": true }, "taxable": { "x-stoplight": { "id": "k1m3p5r7t9w1y" }, "type": "boolean", "default": false, "description": "Whether this add-on is eligible for taxation" } }, "additionalProperties": false }, "AddOnApplicableType": { "title": "AddOnApplicableType", "x-stoplight": { "id": "ya40711rhz1dj" }, "enum": [ "Invoice", "Settlement" ] }, "AddOnCharge-Create": { "title": "AddOnCharge-Create", "x-stoplight": { "id": "qaxj9zriu4qic" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "eu4ikmqxz0uhi" } }, "percentage": { "type": "number", "x-stoplight": { "id": "bconrirkf3v7w" }, "minimum": -100, "maximum": 100 }, "quantity": { "type": "number", "x-stoplight": { "id": "3muzrhygt8fxc" } }, "rate": { "type": "number", "x-stoplight": { "id": "95srshuk7r4uk" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "add_on_id": { "type": "string", "x-stoplight": { "id": "ogjl6lwfu5bi2" }, "format": "uuid", "nullable": true }, "invoice_id": { "type": "string", "x-stoplight": { "id": "35pucziaq6pfm" }, "format": "uuid", "deprecated": true }, "external_id": { "type": "string", "x-stoplight": { "id": "gxftfsiuujera" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "q9dmpj8zoqg5s" }, "nullable": true }, "load_id": { "type": "string", "x-stoplight": { "id": "durt2lwgl8p36" }, "format": "uuid" }, "revenue_rate_value": { "type": "number", "x-stoplight": { "id": "dbc9wcoiorot9" }, "description": "The cost rate or buy price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "rebill_revenue_rate_value": { "type": "number", "x-stoplight": { "id": "1ujqtxpv3l88g" }, "nullable": true }, "rebill_percentage": { "type": "number", "x-stoplight": { "id": "16xhc04qcup8d" }, "nullable": true }, "cost_rate_value": { "type": "number", "x-stoplight": { "id": "sj881cp6tx9v8" }, "description": "The cost rate or buy price of the add on.", "nullable": true } }, "additionalProperties": false }, "AddOnCharge-Read": { "title": "AddOnCharge-Read", "x-stoplight": { "id": "3npsewlp3eut7" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "percentage", "quantity", "total_amount", "external_id", "revenue_rate_value", "revenue_cost_rate_type", "add_on_requestable_id", "add_on_requestable_type", "add_on_applicable_id", "add_on_applicable_type", "accounting_id", "rate", "add_on_rate_type", "rebill_revenue_rate_value", "rebill_total_amount" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "eiloaoq75zkem" } }, "percentage": { "type": "string", "x-stoplight": { "id": "nbtky5jycfmbi" } }, "quantity": { "type": "string", "x-stoplight": { "id": "t61r6ezqzfirq" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "t4dnjvisijock" } }, "external_id": { "type": "string", "x-stoplight": { "id": "tof8dd3gihjox" }, "nullable": true }, "revenue_rate_value": { "type": "string", "x-stoplight": { "id": "40m55gbtgnk8i" }, "description": "The revenue rate or sell price of the add on charge" }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "add_on": { "type": "object", "x-stoplight": { "id": "fmommm0xa5oeg" }, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "ec76n4aevm0g5" }, "format": "uuid" } } }, "invoice": { "type": "object", "x-stoplight": { "id": "c4u9ihypwnfj2" }, "deprecated": true, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "2do1g0k27ex1x" }, "format": "uuid" } } }, "add_on_requestable_id": { "type": "string", "x-stoplight": { "id": "3j73z3acol2rf" }, "format": "uuid", "nullable": true }, "add_on_requestable_type": { "$ref": "#/components/schemas/NullableAddOnRequestableType" }, "add_on_applicable_id": { "type": "string", "x-stoplight": { "id": "jsajp8fcd2i93" }, "format": "uuid", "nullable": true }, "add_on_applicable_type": { "$ref": "#/components/schemas/NullableAddOnApplicableType" }, "accounting_id": { "type": "string", "x-stoplight": { "id": "icf2yhgyoisrw" }, "nullable": true }, "rate": { "type": "string", "x-stoplight": { "id": "yr6fsr4l2ksxg" }, "description": "Deprecated in favor of `revenue_rate_value`.", "deprecated": true }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "load": { "x-stoplight": { "id": "2ss02wqx85btm" }, "type": "object", "properties": { "id": { "type": "string", "x-stoplight": { "id": "dtws9lawfedin" }, "format": "uuid" } } }, "job": { "$ref": "#/components/schemas/Job-Read-Nested", "nullable": true }, "rebill_revenue_rate_value": { "type": "string", "x-stoplight": { "id": "sshbcnm4bi3x4" }, "nullable": true }, "rebill_total_amount": { "type": "string", "x-stoplight": { "id": "wkcpvyuj6zgle" }, "nullable": true }, "rebill_percentage": { "type": "string", "x-stoplight": { "id": "c25guuq8lau3w" }, "nullable": true } } } ] }, "AddOnCharge-Update": { "title": "AddOnCharge-Update", "x-stoplight": { "id": "60xqncbbobhdt" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "sdrteeih2f5ef" } }, "percentage": { "type": "number", "x-stoplight": { "id": "2d0so3qv1y6gb" }, "minimum": -100, "maximum": 100 }, "quantity": { "type": "number", "x-stoplight": { "id": "6dh4gnh91kzdc" } }, "rate": { "type": "number", "x-stoplight": { "id": "7quwi593vqe1j" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "add_on_id": { "type": "string", "x-stoplight": { "id": "xadjpeuivo54i" }, "format": "uuid", "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "vt46ss6zjf04a" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "b3dq6kqlgcbm5" }, "nullable": true }, "revenue_rate_value": { "type": "number", "x-stoplight": { "id": "tps5oztw4p2xn" }, "description": "The cost rate or buy price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "rebill_revenue_rate_value": { "type": "number", "x-stoplight": { "id": "9d1ov81cnxbos" }, "nullable": true }, "rebill_percentage": { "type": "number", "x-stoplight": { "id": "guajxqjnam0r2" }, "nullable": true } }, "additionalProperties": false }, "AddOnCharge-Update-Destroyable": { "title": "AddOnCharge-Update-Destroyable", "x-stoplight": { "id": "18c6y7jy30z4l" }, "allOf": [ { "$ref": "#/components/schemas/AddOnCharge-Update" }, { "$ref": "#/components/schemas/Destroyable" } ] }, "AddOnFuelSurchargeRate-Read": { "title": "AddOnFuelSurchargeRate-Read", "type": "object", "required": [ "surcharge", "surcharge_percentage" ], "properties": { "surcharge": { "type": "string", "nullable": true, "description": "The surcharge value from the fuel surcharge schedule price." }, "surcharge_percentage": { "type": "string", "nullable": true, "description": "The surcharge percentage value from the fuel surcharge schedule price." } }, "additionalProperties": false }, "AddOnRateType": { "title": "AddOnRateType", "x-stoplight": { "id": "1c3m0qj0ofdao" }, "enum": [ "RateForEach", "RatePercentOfTotal", "PerLoad", "FuelSurcharge" ], "example": "RateForEach", "default": "RateForEach" }, "AddOnRequestableType": { "title": "AddOnRequestableType", "x-stoplight": { "id": "cmjs5zi8b8ejj" }, "enum": [ "Job", "DriverDay" ] }, "AddOnType": { "title": "AddOnType", "x-stoplight": { "id": "d2h2dx8n8qui8" }, "enum": [ "driver_pay", "invoicing", "job", "settlement", "driver_day" ], "example": "driver_pay", "default": "driver_pay" }, "Address-Create": { "title": "Address-Create", "x-stoplight": { "id": "9wmd46rzgjxh7" }, "type": "object", "required": [ "thoroughfare", "locality", "administrative_area", "postal_code", "country" ], "properties": { "thoroughfare": { "type": "string", "x-stoplight": { "id": "zkh46rwwvpuca" }, "description": "Street address", "example": "123 Fake St." }, "premise": { "type": "string", "x-stoplight": { "id": "bkcia8yh59wzf" }, "description": "Apartment, Suite, Box number, etc.", "example": "3rd Floor" }, "locality": { "type": "string", "x-stoplight": { "id": "e40nnuxgub7ug" }, "description": "City / Town", "example": "New York" }, "administrative_area": { "type": "string", "x-stoplight": { "id": "2bfqcapyozkpp" }, "description": "State / Province / Region (ISO code when available)", "example": "NY" }, "postal_code": { "type": "string", "x-stoplight": { "id": "a9m9rbcbsa635" }, "description": "Postal code / ZIP Code", "example": "10011" }, "country": { "type": "string", "x-stoplight": { "id": "gud5s8ypb8oam" }, "minLength": 2, "maxLength": 2, "pattern": "^[A-Z]{2}", "example": "US", "description": "2 character country ISO code" }, "lat": { "type": "string", "x-stoplight": { "id": "nwg5be93gvmkd" }, "description": "latitude of the `Address`. \n\nMust be a stringified number between -90 and 90 inclusive.\n\nRequired if `lon` is present." }, "lon": { "type": "string", "x-stoplight": { "id": "rcvsjw8cbs4hs" }, "description": "longitude of the `Address`. \n\nMust be a stringified number between -180 and 180 inclusive.\n\nRequired if `lat` is present." }, "place_id": { "type": "string", "x-stoplight": { "id": "xtuyrwo0rqzkh" }, "description": "NextBillion placeID" } }, "additionalProperties": false }, "Address-Read": { "title": "Address-Read", "x-stoplight": { "id": "v1mcd2qgns2tf" }, "type": "object", "required": [ "thoroughfare", "premise", "locality", "administrative_area", "postal_code", "country", "lat", "lon", "place_id" ], "properties": { "thoroughfare": { "type": "string", "x-stoplight": { "id": "8wrr7qkc9ilqn" } }, "premise": { "type": "string", "x-stoplight": { "id": "z4jth408out1q" }, "nullable": true }, "locality": { "type": "string", "x-stoplight": { "id": "kfby6wqpgvxbz" } }, "administrative_area": { "type": "string", "x-stoplight": { "id": "c9bkrloxf4t8d" } }, "postal_code": { "type": "string", "x-stoplight": { "id": "7zq51k1mof3o3" } }, "country": { "type": "string", "x-stoplight": { "id": "iydw9q619ya01" }, "pattern": "^[A-Z]{2}", "example": "US", "minLength": 2, "maxLength": 2 }, "lat": { "type": "string", "x-stoplight": { "id": "kqu1qtf9rivh1" }, "description": "latitude of the `Address`. \n\nMust be a stringified number between -90 and 90 inclusive.\n\nRequired if `lon` is present.", "nullable": true }, "lon": { "type": "string", "x-stoplight": { "id": "oly2yabkzpk9g" }, "description": "longitude of the `Address`. \n\nMust be a stringified number between -180 and 180 inclusive.\n\nRequired if `lat` is present.", "nullable": true }, "place_id": { "type": "string", "x-stoplight": { "id": "im1fdq7qqxdij" }, "description": "NextBillion placeID", "nullable": true } }, "additionalProperties": false }, "Address-Read-Nested": { "title": "Address-Read-Nested", "x-stoplight": { "id": "cvym2dzuo375q" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Address-Read" } ] }, "Address-Update": { "title": "Address-Update", "x-stoplight": { "id": "9btd83m0o0tsa" }, "properties": { "thoroughfare": { "type": "string", "description": "Street address", "example": "123 Fake St." }, "premise": { "type": "string", "description": "Apartment, Suite, Box number, etc.", "example": "3rd Floor" }, "locality": { "type": "string", "description": "City / Town", "example": "New York" }, "administrative_area": { "type": "string", "description": "State / Province / Region (ISO code when available)", "example": "NY" }, "postal_code": { "type": "string", "description": "Postal code / ZIP Code", "example": "10011" }, "country": { "type": "string", "minLength": 2, "maxLength": 2, "pattern": "^[A-Z]{2}", "example": "US", "description": "2 character country ISO code" }, "lat": { "type": "string", "x-stoplight": { "id": "5uu3ex2lbmyzj" }, "description": "latitude of the `Address`. \n\nMust be a stringified number between -90 and 90 inclusive.\n\nRequired if `lon` is present." }, "lon": { "type": "string", "x-stoplight": { "id": "y8xd9dp6rwfeu" }, "description": "longitude of the `Address`. \n\nMust be a stringified number between -180 and 180 inclusive.\n\nRequired if `lat` is present." }, "place_id": { "type": "string", "x-stoplight": { "id": "ujv5qpg067ycc" }, "description": "NextBillion placeID" }, "_destroy": { "type": "integer", "x-stoplight": { "id": "48a0is0umjabv" }, "description": "If this is provided with value of `1` like so `_destroy: 1` then this `Address` will be deleted. The `id` must be set." } }, "type": "object", "additionalProperties": false }, "Address-Update-Destroyable": { "title": "Address-Update-Destroyable", "x-stoplight": { "id": "htxekmvzcymfb" }, "allOf": [ { "$ref": "#/components/schemas/Address-Update" }, { "$ref": "#/components/schemas/Destroyable" } ] }, "AdministrativeArea": { "title": "AdministrativeArea", "x-stoplight": { "id": "aadr7x9k2abc" }, "type": "string", "enum": [ "Unknown", "Alabama", "Alaska", "American Samoa", "Arizona", "Arkansas", "California", "Colorado", "Commonwealth of the Northern Mariana Islands", "Connecticut", "Delaware", "District of Columbia", "Florida", "Georgia", "Guam", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Puerto Rico", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "United States Virgin Islands", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming", "Alberta", "British Columbia", "Manitoba", "New Brunswick", "Newfoundland and Labrador", "Northwest Territories", "Nova Scotia", "Nunavut", "Ontario", "Prince Edward Island", "Québec", "Saskatchewan", "Yukon" ], "description": "State, province, or region" }, "Agave-Customer-Read": { "title": "Agave-Customer-Read", "x-stoplight": { "id": "lrkqnqnnbw20w" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "x-stoplight": { "id": "aonqaxcyssztx" }, "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AgaveApi-Customer-Read" }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" } } } ] }, "Agave-Customer-Update": { "title": "Agave-Customer-Update", "x-stoplight": { "id": "odjq98dxwzjlz" }, "type": "object", "required": [ "customer_account_id" ], "properties": { "customer_account_id": { "type": "string", "x-stoplight": { "id": "438paww6n3w02" }, "nullable": true } }, "additionalProperties": false }, "Agave-Item-Read": { "title": "Agave-Item-Read", "x-stoplight": { "id": "a3vb8ahcciykx" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "x-stoplight": { "id": "idddaealkdwnh" }, "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AgaveApi-Item-Read" }, "agave_itemizable": { "$ref": "#/components/schemas/Agave-Itemizable-Read" } } } ] }, "Agave-Item-Update": { "title": "Agave-Item-Update", "x-stoplight": { "id": "pw1b19ip50dot" }, "type": "object", "x-internal": false, "required": [ "agave_itemizable_id", "agave_itemizable_type" ], "properties": { "agave_itemizable_id": { "type": "string", "x-stoplight": { "id": "zkob6evr1r1rp" }, "nullable": true }, "agave_itemizable_type": { "$ref": "#/components/schemas/NullableAgaveItemizableType" } }, "additionalProperties": false }, "Agave-Itemizable-Read": { "title": "Agave-Itemizable-Read", "x-stoplight": { "id": "3172d842y14iu" }, "allOf": [ { "required": [ "type", "name" ], "type": "object", "properties": { "type": { "$ref": "#/components/schemas/AgaveItemizableType" }, "name": { "type": "string", "x-stoplight": { "id": "oqzh1lv82z4hc" } } } }, { "$ref": "#/components/schemas/Identifier" } ] }, "Agave-LedgerAccount-Read": { "title": "Agave-LedgerAccount-Read", "x-stoplight": { "id": "c8xz4r4fu7c8l" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "x-stoplight": { "id": "ny6m1mju5zd0z" }, "type": "object", "required": [ "data", "type" ], "properties": { "data": { "$ref": "#/components/schemas/AgaveApi-LedgerAccount-Read" }, "type": { "$ref": "#/components/schemas/NullableAgaveLedgerAccountType" } } } ] }, "Agave-LedgerAccount-Update": { "title": "Agave-LedgerAccount-Update", "x-stoplight": { "id": "9ey64eey6day2" }, "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/components/schemas/NullableAgaveLedgerAccountType" } }, "additionalProperties": false }, "Agave-LinkToken-Read": { "title": "Agave-LinkToken-Read", "x-stoplight": { "id": "okrbkuk60vl0s" }, "type": "object", "required": [ "link_token" ], "properties": { "link_token": { "type": "string", "x-stoplight": { "id": "jt5ppwx344ey0" } } }, "x-internal": true, "additionalProperties": false }, "Agave-LinkedAccount-Create": { "title": "Agave-LinkedAccount-Create", "x-stoplight": { "id": "2zhawfbdfuxfx" }, "type": "object", "x-internal": true, "required": [ "public_token" ], "properties": { "public_token": { "type": "string", "x-stoplight": { "id": "05rrotk62krdw" } } }, "additionalProperties": false }, "Agave-LinkedAccount-Read": { "title": "Agave-LinkedAccount-Read", "x-stoplight": { "id": "0sjsyp9wacv42" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "6oqjh5b78v7kp" }, "required": [ "status", "agave_source_system", "synchronized_at" ], "properties": { "status": { "x-stoplight": { "id": "7aabj92ggrge9" }, "enum": [ "pending", "unlinked", "linked", "invalid" ] }, "synchronized_at": { "type": "string", "x-stoplight": { "id": "aaa123jpq0ga9" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone", "nullable": true }, "agave_source_system": { "$ref": "#/components/schemas/Agave-SourceSystem-Read" } } } ], "x-internal": true, "type": "object", "additionalProperties": false }, "Agave-SourceSystem-Read": { "title": "Agave-SourceSystem-Read", "x-stoplight": { "id": "kl65oeohq4fft" }, "type": "object", "x-internal": true, "required": [ "slug", "name", "theme" ], "properties": { "slug": { "type": "string", "x-stoplight": { "id": "8xhusbc3vm838" }, "description": "The Source System's short identifier" }, "name": { "type": "string", "x-stoplight": { "id": "q8ipaf9trcqok" }, "description": "The Source System's user-facing name." }, "theme": { "type": "object", "$ref": "#/components/schemas/Agave-SourceSystem-Theme-Read" } }, "additionalProperties": false }, "Agave-SourceSystem-Theme-Read": { "title": "Agave-SourceSystem-Theme-Read", "x-stoplight": { "id": "b5mcjwmrg0odm" }, "type": "object", "required": [ "square_image" ], "properties": { "square_image": { "type": "string", "x-stoplight": { "id": "p85wsuqesbbox" }, "format": "uri", "description": "The Source System's square image (128 by 128 pixels)." } }, "additionalProperties": false }, "Agave-Vendor-Read": { "title": "Agave-Vendor-Read", "x-stoplight": { "id": "19aj32kx08rlz" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "x-stoplight": { "id": "9nl3xiebb1fae" }, "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/AgaveApi-Vendor-Read" }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" } } } ] }, "Agave-Vendor-Update": { "title": "Agave-Vendor-Update", "x-stoplight": { "id": "lr3wtd2gkfou2" }, "type": "object", "required": [ "vendor_account_id" ], "properties": { "vendor_account_id": { "type": "string", "x-stoplight": { "id": "b16yo6eo40982" }, "nullable": true } }, "additionalProperties": false }, "AgaveApi-Address-Read": { "title": "AgaveApi-Address-Read", "x-stoplight": { "id": "mcba4yux8n6m1" }, "type": "object", "required": [ "street_1", "street_2", "city", "state", "country", "postal_code" ], "properties": { "street_1": { "type": "string", "x-stoplight": { "id": "ujgrcodw2nj27" }, "description": "The first line of a street address", "nullable": true }, "street_2": { "type": "string", "x-stoplight": { "id": "0rwny8l9504sl" }, "description": "The second line of a street address (e.g. a Unit, PO Box).", "nullable": true }, "city": { "type": "string", "x-stoplight": { "id": "3ag6k1f0toxh6" }, "description": "\nThe name of the city.", "nullable": true }, "state": { "type": "string", "x-stoplight": { "id": "8vgr1vvvg16ro" }, "description": "The name of the state, region, or province.", "nullable": true }, "country": { "type": "string", "x-stoplight": { "id": "bdtqg791guxco" }, "description": "The name of the country.", "nullable": true }, "postal_code": { "type": "string", "x-stoplight": { "id": "bu3buwx0xagde" }, "description": "The postal or ZIP code.", "nullable": true } }, "additionalProperties": false }, "AgaveApi-Customer-Read": { "title": "AgaveApi-Customer-Read", "x-stoplight": { "id": "sqntew6ys60i2" }, "type": "object", "required": [ "id", "addresses", "status", "name" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "nlb1zu8ktng0m" }, "format": "uuid", "description": "The UUID of the Customer assigned by Agave." }, "addresses": { "type": "array", "x-stoplight": { "id": "jeugz0nz6bkv7" }, "items": { "$ref": "#/components/schemas/AgaveApi-Address-Read" } }, "status": { "x-stoplight": { "id": "3n3k635ybypr0" }, "description": "The current status of the Customer.", "enum": [ "Active", "Archived", "Inactive", "Unknown" ] }, "name": { "type": "string", "x-stoplight": { "id": "3k0yxt8u9vq4d" }, "description": "The name of the Customer." } }, "additionalProperties": false }, "AgaveApi-Item-Read": { "title": "AgaveApi-Item-Read", "x-stoplight": { "id": "03flwgd4kr9a8" }, "type": "object", "required": [ "id", "name", "type", "cost_unit_of_measure", "price_unit_of_measure", "status", "unit_cost", "unit_price" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "75xu2tf09jg6v" }, "description": "The UUID of the Item assigned by Agave." }, "name": { "type": "string", "x-stoplight": { "id": "pen4ptjjt9wyh" }, "description": "The name of the Item." }, "type": { "x-stoplight": { "id": "s6ra31ow40j25" }, "description": "The type of the Item.", "type": "string", "nullable": true }, "cost_unit_of_measure": { "type": "string", "x-stoplight": { "id": "qtd91punvbbdu" }, "description": "The unit of measure for sales of the Item.", "nullable": true }, "price_unit_of_measure": { "type": "string", "x-stoplight": { "id": "54vh9pp956uaj" }, "description": "The unit of measure for sales of the Item.", "nullable": true }, "status": { "x-stoplight": { "id": "15qodikljzd1u" }, "description": "The status of the Item.", "enum": [ "Active", "Archived", "Inactive", "Unknown" ] }, "unit_cost": { "type": "string", "x-stoplight": { "id": "876cudmrujdcn" }, "description": "The unit cost of the Item.", "nullable": true }, "unit_price": { "type": "string", "x-stoplight": { "id": "xpys33kys219u" }, "description": "The unit price of the Item.", "nullable": true } }, "additionalProperties": false }, "AgaveApi-LedgerAccount-Read": { "title": "AgaveApi-LedgerAccount-Read", "x-stoplight": { "id": "xnztk1jdedlwh" }, "type": "object", "required": [ "id", "name", "status", "type" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "yun29z38ypgq7" }, "description": "The UUID of the Ledger Account assigned by Agave" }, "name": { "type": "string", "x-stoplight": { "id": "fghknpzzlfn9o" }, "description": "The name of the Ledger Account." }, "status": { "x-stoplight": { "id": "xnalbmbfezk3f" }, "description": "The current status of the Ledger Account.", "enum": [ "Active", "Archived", "Pending", "Unknown" ] }, "type": { "$ref": "#/components/schemas/AgaveLedgerAccountType" } }, "additionalProperties": false }, "AgaveApi-Vendor-Read": { "title": "AgaveApi-Vendor-Read", "x-stoplight": { "id": "kv3rvmvyo1ya9" }, "type": "object", "required": [ "id", "alternate_name", "status", "name" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "iy3btyiyap029" }, "description": "The UUID of the Vendor assigned by Agave" }, "address": { "$ref": "#/components/schemas/AgaveApi-Address-Read" }, "alternate_name": { "type": "string", "x-stoplight": { "id": "fs8p5vvvm8f8z" }, "description": "An alternate name for the Vendor (e.g. the trade name or Doing Business As (DBA) name).", "nullable": true }, "status": { "x-stoplight": { "id": "g2lqmodijkcnj" }, "description": "The current status of the Vendor.", "enum": [ "Active", "Archived", "Inactive" ] }, "name": { "type": "string", "x-stoplight": { "id": "t07wexv03qzds" }, "description": "The name of the Vendor." } }, "additionalProperties": false }, "AgaveExportState": { "title": "AgaveExportState", "x-stoplight": { "id": "r9k3m5p7s1t3v" }, "type": "string", "enum": [ "not_exported", "pending", "exported", "failed" ], "description": "The current state of the Agave export" }, "AgaveItemizableType": { "title": "AgaveItemizableType", "x-stoplight": { "id": "a3cc4ur8termc" }, "enum": [ "AddOn", "Service", "LineItemType" ], "example": "AddOn" }, "AgaveLedgerAccountType": { "title": "AgaveLedgerAccountType", "x-stoplight": { "id": "0fw523s0lhy2s" }, "enum": [ "AccountsPayable", "AccountsReceivable" ] }, "AgaveSettlementExport-Read-Nested": { "title": "AgaveSettlementExport-Read-Nested", "x-stoplight": { "id": "w5x7y9z1a3b5c" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "state" ], "properties": { "state": { "$ref": "#/components/schemas/AgaveExportState" }, "agave_invoice_id": { "type": "string", "x-stoplight": { "id": "d7e9f1g3h5i7j" }, "nullable": true, "description": "The invoice ID returned from Agave API" }, "exported_at": { "type": "string", "x-stoplight": { "id": "k9l1m3n5o7p9q" }, "format": "date-time", "nullable": true, "description": "Timestamp when the settlement was successfully exported" }, "last_error": { "type": "string", "x-stoplight": { "id": "r1s3t5u7v9w1x" }, "nullable": true, "description": "Error message from the last failed export attempt" }, "exported_by": { "x-stoplight": { "id": "m7n9p1q3r5s7t" }, "nullable": true, "description": "The principal who initiated the export", "allOf": [ { "$ref": "#/components/schemas/Principal-Read-Nested" } ] } } } ] }, "AiReview-Read-Nested": { "title": "AiReview-Read-Nested", "type": "object", "x-stoplight": { "id": "ai8r3v2ewn3st" }, "description": "An AI-generated review nested within its parent entity.", "required": [ "id", "status", "confidence", "summary", "reasoning", "issues", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the AI review" }, "status": { "type": "string", "enum": [ "flagged", "unreadable", "duplicate", "approved" ], "description": "The AI review status" }, "confidence": { "type": "string", "description": "AI confidence score from 0.00 to 1.00", "nullable": true }, "summary": { "type": "string", "description": "Brief human-readable summary of the review outcome", "nullable": true }, "reasoning": { "type": "string", "description": "Detailed explanation of the AI decision", "nullable": true }, "issues": { "type": "array", "items": { "type": "string" }, "description": "List of issues found during review" }, "created_at": { "type": "string", "format": "date-time", "description": "When the review was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "When the review was last updated" } }, "additionalProperties": false }, "Approval-Approve": { "title": "Approval-Approve", "x-stoplight": { "id": "pib85xwqwgrex" }, "type": "object", "properties": { "external_approver_name": { "type": "string", "x-stoplight": { "id": "7lmlml5incies" }, "nullable": true }, "approval_type": { "$ref": "#/components/schemas/RequestedApprovalType" } }, "additionalProperties": false }, "Approval-Status": { "title": "Approval-Status", "x-stoplight": { "id": "aegeztn5w5roc" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "biller_approved", "company_admin_approved", "driver_approved", "foreman_approved", "billing_approved_at", "field_approved_at" ], "properties": { "biller_approved": { "type": "boolean", "x-stoplight": { "id": "nfc3nt03sl8bb" } }, "company_admin_approved": { "type": "boolean", "x-stoplight": { "id": "7h8yut8t1gc5m" } }, "driver_approved": { "type": "boolean", "x-stoplight": { "id": "a5dbhqhyfjyvc" } }, "foreman_approved": { "type": "boolean", "x-stoplight": { "id": "s1mr5k2nb6pp9" } }, "billing_approved_at": { "type": "string", "x-stoplight": { "id": "igwmhwlt4rljp" }, "format": "date-time", "nullable": true }, "field_approved_at": { "type": "string", "x-stoplight": { "id": "ewrpq44soitt8" }, "format": "date-time", "nullable": true } } } ], "description": "Approval status" }, "ApprovalAction": { "title": "ApprovalAction", "x-stoplight": { "id": "8rmckareb7tfg" }, "enum": [ "approve", "unapprove" ] }, "ApprovalAssignment-Read": { "title": "ApprovalAssignment-Read", "x-stoplight": { "id": "j2fcwgvbf8qjm" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "ehtvb5mvqfibq" }, "required": [ "approval_category" ], "properties": { "approval_type": { "x-stoplight": { "id": "7xzbj92ggrge9" }, "enum": [ "foreman", "biller", "company_admin", "platform_admin" ] }, "approver_id": { "type": "string", "x-stoplight": { "id": "kiva0q8kik4ph" }, "format": "uuid" }, "external_approver_name": { "type": "string", "x-stoplight": { "id": "mzm4cqlaqkbhz" }, "nullable": true }, "approver_type": { "x-stoplight": { "id": "hg7tm679i5kjp" }, "enum": [ "User", "Company", "Impersonation", "M2MClient" ] }, "approval_action": { "$ref": "#/components/schemas/ApprovalAction" }, "approval_category": { "$ref": "#/components/schemas/ApprovalCategory" } } } ], "x-tags": [ "Approvals" ] }, "ApprovalCategory": { "title": "ApprovalCategory", "x-stoplight": { "id": "qhkzxgj1hqou5" }, "enum": [ "field", "billing" ], "default": "field", "example": "field" }, "AuthForgotPassword-Create": { "title": "AuthForgotPassword-Create", "x-stoplight": { "id": "2saioda2pdq5n" }, "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "tsl52wj7j5xm9" }, "format": "email" } }, "additionalProperties": false }, "AuthLogin-Create": { "title": "AuthLogin-Create", "x-stoplight": { "id": "8r1bzidjyz1mz" }, "type": "object", "description": "AuthLogin model for creates. ", "required": [ "email", "password" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "umhqb7sb8n19u" }, "format": "email" }, "password": { "type": "string", "x-stoplight": { "id": "6dy0x2lf783vm" }, "format": "password" } }, "additionalProperties": false }, "AuthMethod": { "title": "AuthMethod", "x-stoplight": { "id": "4h7bxzt0hkx3o" }, "enum": [ "sso", "magic_link", "password", "google_auth", "microsoft_auth", "otp_sms" ], "description": "" }, "AuthMethod-List": { "title": "AuthMethod-List", "x-stoplight": { "id": "u7wycypgxm1cg" }, "type": "object", "required": [ "auth_methods" ], "properties": { "auth_methods": { "type": "array", "x-stoplight": { "id": "jum90iupeh3eo" }, "items": { "$ref": "#/components/schemas/AuthMethod" } } }, "additionalProperties": false }, "AuthMethod-Query": { "title": "AuthMethod-Query", "x-stoplight": { "id": "izjmfp3545323" }, "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "yfrodtjkxwn56" }, "format": "email" } }, "additionalProperties": false }, "AuthResetPassword-Create": { "title": "AuthResetPassword-Create", "x-stoplight": { "id": "lm7pdhq3u14ad" }, "type": "object", "required": [ "password_reset_token", "password" ], "properties": { "password_reset_token": { "type": "string", "x-stoplight": { "id": "8p1wdtma8btj4" } }, "password": { "type": "string", "x-stoplight": { "id": "q6or96jyfcc54" }, "format": "password" } }, "additionalProperties": false }, "AuthSignup-Create": { "title": "AuthSignup-Create", "x-stoplight": { "id": "qtdog0h0a1f08" }, "type": "object", "description": "Input parameters for signing up.", "required": [ "password", "magic_links_token" ], "properties": { "password": { "type": "string", "x-stoplight": { "id": "0enw4rnm5mxmx" }, "format": "password" }, "magic_links_token": { "type": "string", "x-stoplight": { "id": "75knswwo21hzi" } } }, "additionalProperties": false }, "AuthToken": { "title": "AuthToken", "x-stoplight": { "id": "cjpfb2fy29h16" }, "type": "object", "description": "AuthToken model for reads. ", "required": [ "session_jwt" ], "properties": { "session_jwt": { "type": "string", "x-stoplight": { "id": "m8326118lib99" } } }, "additionalProperties": false }, "AutoAddOn-BulkAssign": { "title": "AutoAddOn-BulkAssign", "x-stoplight": { "id": "0zlb8y4dqn6iu" }, "type": "object", "description": "Note: `auto_add_on_account_type` is `required` when assigning to an `Account`", "properties": { "auto_add_on_account_type": { "$ref": "#/components/schemas/AccountType" }, "additional_auto_add_on_ids": { "type": "array", "x-stoplight": { "id": "6pls2iqathkik" }, "items": { "x-stoplight": { "id": "rrt11kfb86o87" }, "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "AutoAddOnAssignment-Create": { "title": "AutoAddOnAssignment-Create", "x-stoplight": { "id": "xbcp4w3ukma2o" }, "type": "object", "description": "If you are creating for an `Account`\n- `account_type` is **required**\n- for Vendor `AutoAddOnAssignments`, use `vendor`\n- for Customer `AutoAddOnAssignments`, use `customer`\n\nIf you are creating for a `User`, `Rate`, `Job`, `JobAssignment`\n- `account_type` is **not required** and accepted\n\nIf you are creating for a `Project`, `Order`\n- `account_type` is **optional**\n- for Vendor `AutoAddOnAssignments`, use `vendor`\n- for Customer `AutoAddOnAssignments`, use `customer`\n- for Driver `AutoAddOnAssignments`, omit or leave as null\n", "required": [ "name", "add_on_rate_type", "add_on_types" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "xlr597o432cg0" } }, "quantity": { "type": "number", "x-stoplight": { "id": "3qb6fnd982cgm" } }, "rate": { "type": "number", "x-stoplight": { "id": "hh4ogt9ya8knx" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "percentage": { "type": "number", "x-stoplight": { "id": "x3cj67o7n4e8x" } }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "external_id": { "type": "string", "x-stoplight": { "id": "ltfkyi20h37bx" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "zt7g5pah6d2tj" }, "nullable": true }, "add_on_id": { "type": "string", "x-stoplight": { "id": "831zr8zmjvuhn" }, "format": "uuid", "nullable": true }, "account_type": { "$ref": "#/components/schemas/NullableAccountType" }, "add_on_types": { "type": "array", "x-stoplight": { "id": "ncxpuxu3sysi0" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "total_installments": { "type": "integer", "x-stoplight": { "id": "gocb0v9zmoc9k" }, "minimum": 0 }, "revenue_rate_value": { "type": "number", "x-stoplight": { "id": "jdshty9g9zvdh" }, "description": "The cost rate or buy price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "cost_rate_value": { "type": "number", "x-stoplight": { "id": "1trwd1jiujjq4" }, "description": "The cost rate or buy price of the add on.", "nullable": true }, "original_auto_add_on_assignment_id": { "type": "string", "x-stoplight": { "id": "2y5xit7lqcxpe" }, "description": "If you are creating an `AutoAddOnAssignment` based on an existing one, you'd need to provide this value for cascading effect.\n\nIf the `AutoAddOnAssignment` you are basing on already has a `original_auto_add_on_assignment_id`, then just copy it over.\nOtherwise, use its `id` as the `original_auto_add_on_assignment_id` for the new record.", "format": "uuid", "nullable": true }, "source_id": { "type": "string", "x-stoplight": { "id": "bb7pvsbs2g7t4" }, "format": "uuid", "nullable": true }, "source_type": { "$ref": "#/components/schemas/NullableAutoAddOnAssignmentSourceType" } }, "additionalProperties": false }, "AutoAddOnAssignment-Read": { "title": "AutoAddOnAssignment-Read", "x-stoplight": { "id": "mrei4t0lzdaps" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "quantity", "rate", "percentage", "add_on_rate_type", "external_id", "accounting_id", "add_on_types", "total_installments", "auto_add_on_installments_count", "revenue_rate_value", "revenue_cost_rate_type", "cost_rate_value", "account_type", "add_on_id", "original_auto_add_on_assignment_id", "source_id", "source_type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "nniiufnqbcrt6" }, "nullable": true }, "quantity": { "type": "string", "x-stoplight": { "id": "zw1rycytuuf81" }, "nullable": true }, "rate": { "type": "string", "x-stoplight": { "id": "ogfdds5jcdlwy" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`.", "nullable": true }, "percentage": { "type": "string", "x-stoplight": { "id": "ydlu6qwh4b5j7" }, "nullable": true }, "add_on_rate_type": { "$ref": "#/components/schemas/NullableAddOnRateType" }, "external_id": { "type": "string", "x-stoplight": { "id": "9ttqi0mwfjnm3" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "bluyzie0m5jb9" }, "nullable": true }, "add_on_types": { "type": "array", "x-stoplight": { "id": "di5gr4zc9iq3i" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "total_installments": { "type": "integer", "x-stoplight": { "id": "roqevyapa9o4n" } }, "auto_add_on_installments_count": { "type": "integer", "x-stoplight": { "id": "pqh4mr50icy3h" } }, "revenue_rate_value": { "type": "string", "x-stoplight": { "id": "7mjgl79cfvrob" }, "description": "The revenue rate or sell price of the add on" }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/NullableAddOnRateType" }, "cost_rate_value": { "type": "string", "x-stoplight": { "id": "4hr7qbumiem9l" }, "description": "The cost rate or buy price of the add on", "nullable": true }, "account_type": { "$ref": "#/components/schemas/NullableAccountType" }, "add_on_id": { "type": "string", "x-stoplight": { "id": "lrsv4ri327cd3" }, "format": "uuid", "nullable": true }, "original_auto_add_on_assignment_id": { "type": "string", "x-stoplight": { "id": "1bhbvw7jaxkyi" }, "description": "The reference to the original `AutoAddOnAssignment` it was based on.", "format": "uuid", "nullable": true }, "add_on": { "$ref": "#/components/schemas/AddOn-Read-Nested" }, "source_id": { "type": "string", "x-stoplight": { "id": "22wfjpgnq59tz" }, "format": "uuid", "nullable": true }, "source_type": { "$ref": "#/components/schemas/NullableAutoAddOnAssignmentSourceType" } } }, { "$ref": "#/components/schemas/Timestamps" } ], "x-internal": true, "description": "Note:\n- `add_on_id` is deprecated" }, "AutoAddOnAssignment-Update": { "title": "AutoAddOnAssignment-Update", "x-stoplight": { "id": "z49ocol7q9nxb" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "xi0d4uvzp78hu" } }, "quantity": { "type": "number", "x-stoplight": { "id": "nvcxlm30o5buv" } }, "rate": { "type": "number", "x-stoplight": { "id": "zaazomdius88t" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "percentage": { "type": "number", "x-stoplight": { "id": "a59636fzf3gn2" } }, "add_on_rate_type": { "$ref": "#/components/schemas/AddOnRateType", "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "external_id": { "type": "string", "x-stoplight": { "id": "opzbsqbjgv1gi" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "32lqnkmlhd7oo" }, "nullable": true }, "add_on_types": { "type": "array", "x-stoplight": { "id": "djk0y5y7x9nta" }, "items": { "$ref": "#/components/schemas/AddOnType" } }, "total_installments": { "type": "integer", "x-stoplight": { "id": "skwymk99sjn00" }, "minimum": 0 }, "revenue_rate_value": { "type": "string", "x-stoplight": { "id": "w99z2qdprcg5b" }, "description": "The cost rate or buy price of the add on." }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "cost_rate_value": { "type": "string", "x-stoplight": { "id": "naanql8rzlamb" }, "description": "The cost rate or buy price of the add on.", "nullable": true } }, "additionalProperties": false }, "AutoAddOnAssignmentSourceType": { "title": "AutoAddOnAssignmentSourceType", "x-stoplight": { "id": "tp0kpvtzwhimb" }, "enum": [ "Settlement" ], "example": "Settlement" }, "AutoAddOnAssignmentableType": { "title": "AutoAddOnAssignmentableType", "x-stoplight": { "id": "1t8zgwyyb2ffn" }, "enum": [ "Account", "User", "Rate", "Project", "Order", "Job", "JobAssignment", "SiteRateSchedule" ] }, "BillingStatus": { "title": "BillingStatus", "x-stoplight": { "id": "3d3i9tmtxbbf5" }, "enum": [ "unpaid", "free_trial", "paid", "overdue", "suspended", "churned" ], "default": "unpaid", "example": "unpaid", "description": "Billing Status", "x-internal": true }, "BulkAssignVendor-Create": { "title": "BulkAssignVendor-Create", "x-stoplight": { "id": "lsect63gnpfey" }, "type": "object", "required": [ "vendor_account_id", "job_ids" ], "properties": { "vendor_account_id": { "type": "string", "x-stoplight": { "id": "6mzry4ljvklsg" }, "format": "uuid" }, "job_ids": { "type": "array", "x-stoplight": { "id": "83xh4f88ipp5y" }, "items": { "x-stoplight": { "id": "6w7zhrt2beeq7" }, "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "BulkDownload-Create": { "title": "BulkDownload-Create", "x-stoplight": { "id": "dginlau2z9kwc" }, "type": "object", "required": [ "type" ], "properties": { "type": { "x-stoplight": { "id": "bkfphr54z8e8u" }, "enum": [ "pdf", "zip" ] }, "job_ids": { "type": "array", "x-stoplight": { "id": "10qpu61ctkte7" }, "items": { "x-stoplight": { "id": "dr8frggqtjuit" }, "type": "string", "format": "uuid" } }, "filter": { "type": "object", "x-stoplight": { "id": "bfq6p121blguj" }, "properties": { "job": { "type": "object", "x-stoplight": { "id": "2mvncci7daqfc" }, "properties": { "states": { "type": "array", "x-stoplight": { "id": "qqookotjggzde" }, "items": { "$ref": "#/components/schemas/JobState" } }, "customer_account_ids": { "type": "array", "x-stoplight": { "id": "wz8zonskz97iy" }, "items": { "x-stoplight": { "id": "x89yk8ot1xtln" }, "type": "string", "format": "uuid" } }, "driver_ids": { "type": "array", "x-stoplight": { "id": "inn9jbnu2xetg" }, "items": { "x-stoplight": { "id": "yo67fubgekey2" }, "type": "string", "format": "uuid" } }, "dropoff_site_ids": { "type": "array", "x-stoplight": { "id": "jeq43zqrp9lsx" }, "items": { "x-stoplight": { "id": "avvutvbuvurmx" }, "type": "string", "format": "uuid" } }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "1tnty976sj2n5" }, "items": { "x-stoplight": { "id": "fi63f0hbe8alo" }, "type": "string", "format": "uuid" } }, "pickup_site_ids:": { "type": "array", "x-stoplight": { "id": "n9i5cpr7yu64i" }, "items": { "x-stoplight": { "id": "bo329ui51q3hw" }, "type": "string", "format": "uuid" } }, "vendor_account_ids": { "type": "array", "x-stoplight": { "id": "3m6911ke43vf6" }, "items": { "x-stoplight": { "id": "lqu1a9jlq64le" }, "type": "string", "format": "uuid" } }, "start_date": { "type": "string", "x-stoplight": { "id": "iitb5tfvp03um" }, "format": "date" }, "end_date": { "type": "string", "x-stoplight": { "id": "m6yl2h77ai8lf" }, "format": "date" } } }, "categories": { "type": "array", "x-stoplight": { "id": "vrg5vswusdl9n" }, "items": { "$ref": "#/components/schemas/FileAttachmentCategory" } } } } }, "additionalProperties": false }, "BulkDownload-Read": { "title": "BulkDownload-Read", "x-stoplight": { "id": "00dtsuvxgipoi" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "BulkDownload-Result-Read": { "title": "BulkDownload-Result-Read", "x-stoplight": { "id": "ez4x0unqylodq" }, "type": "object", "required": [ "state" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "pi2ok45h33c7t" }, "format": "uuid" }, "state": { "x-stoplight": { "id": "08yy8n6n9uqdz" }, "enum": [ "success", "error" ] }, "objects": { "type": "array", "x-stoplight": { "id": "h78vhpgwkp0ww" }, "items": { "x-stoplight": { "id": "0mwb6xligfp6t" }, "type": "object", "required": [ "url", "name" ], "properties": { "url": { "type": "string", "x-stoplight": { "id": "vigx0jkato5f0" }, "format": "uri" }, "name": { "type": "string", "x-stoplight": { "id": "t5rnhb68fkhyd" } } } } } }, "additionalProperties": false }, "BulkSettlement-Create": { "title": "BulkSettlement-Create", "x-stoplight": { "id": "lnruf22qq13rx" }, "type": "object", "required": [ "start_date", "end_date" ], "properties": { "start_date": { "type": "string", "x-stoplight": { "id": "ckqgv31mvv2nl" }, "format": "date-time" }, "end_date": { "type": "string", "x-stoplight": { "id": "qmy93ymtqm1gp" }, "format": "date-time" }, "bulk_create_for": { "x-stoplight": { "id": "kvudy51orury5" }, "type": "array", "items": { "x-stoplight": { "id": "57l5hekdu9fs0" }, "enum": [ "customers", "vendors", "drivers" ] } }, "customer_account_ids": { "type": "array", "x-stoplight": { "id": "k7m3xp2rvq8fn" }, "description": "Optional list of customer account IDs to filter settlements by", "items": { "type": "string", "format": "uuid" } }, "vendor_account_ids": { "type": "array", "x-stoplight": { "id": "j9n4wq1sur7gm" }, "description": "Optional list of vendor account IDs to filter settlements by", "items": { "type": "string", "format": "uuid" } }, "driver_ids": { "type": "array", "x-stoplight": { "id": "h5p8xt6vuq3bl" }, "description": "Optional list of driver IDs to filter settlements by", "items": { "type": "string", "format": "uuid" } }, "settlement_config": { "type": "object", "x-stoplight": { "id": "9sxvwlbscs1ix" }, "properties": { "settlement_line_item_type": { "$ref": "#/components/schemas/SettlementLineItemType" }, "settlement_line_item_groupings": { "type": "array", "items": { "$ref": "#/components/schemas/SettlementLineItemGrouping" } } } } }, "additionalProperties": false }, "BulkSms-Create": { "title": "BulkSms-Create", "x-stoplight": { "id": "9w0xzr68d98x2" }, "allOf": [ { "$ref": "#/components/schemas/Sms-Create" }, { "type": "object", "x-stoplight": { "id": "zvlzha8nr4c3e" }, "required": [ "job_ids" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "49903n754ikdw" }, "items": { "x-stoplight": { "id": "ld2crm1qbnryj" }, "type": "string", "format": "uuid" } } } } ] }, "Company-Create": { "title": "Company-Create", "x-stoplight": { "id": "chbudrfekyjgt" }, "description": "Input parameters for Company creation.", "type": "object", "required": [ "legal_name", "address", "language", "date_format", "time_format", "system_of_measure", "unit_of_distance", "currency", "time_zone", "primary_contact", "billing_contact", "usage_status", "saas_billing_plan", "billing_status", "company_type" ], "properties": { "parent_company_id": { "type": "string", "x-stoplight": { "id": "jgui5qyj4dznz" }, "description": "The parent `Company` of this `Company`", "format": "uuid", "nullable": true }, "legal_name": { "type": "string", "x-stoplight": { "id": "ppkncfr8pw1m3" }, "example": "Tread", "description": "Legal registered name of the `Company` - used for billing. Must be globally unique" }, "dba_name": { "type": "string", "x-stoplight": { "id": "8u3g04bxtnusn" }, "description": "Doing Business As name. Must be globally unique", "nullable": true }, "address": { "$ref": "#/components/schemas/Address-Create" }, "tread_customer": { "type": "boolean", "x-stoplight": { "id": "e4i3fgzlsyx1c" }, "default": false, "description": "Flag indicating that this `Company` is a customer of Tread" }, "language": { "$ref": "#/components/schemas/Language" }, "date_format": { "$ref": "#/components/schemas/DateFormat" }, "time_format": { "$ref": "#/components/schemas/TimeFormat" }, "system_of_measure": { "$ref": "#/components/schemas/SystemOfMeasure" }, "unit_of_distance": { "$ref": "#/components/schemas/UnitOfDistance" }, "currency": { "$ref": "#/components/schemas/Currency" }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "primary_contact": { "$ref": "#/components/schemas/Contact-Create" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Create" }, "usage_status": { "$ref": "#/components/schemas/UsageStatus" }, "saas_billing_plan": { "$ref": "#/components/schemas/SaasBillingPlan" }, "billing_status": { "$ref": "#/components/schemas/BillingStatus" }, "company_type": { "$ref": "#/components/schemas/CompanyType" }, "fuel_surcharge_percentage": { "type": "number", "x-stoplight": { "id": "62gkf6qbchzxk" }, "description": "The fuel surcharge that will be applied for all the Company's Rates.", "minimum": 0, "maximum": 100 }, "auth_methods": { "type": "array", "x-stoplight": { "id": "sirgoyxdgrstf" }, "items": { "$ref": "#/components/schemas/AuthMethod" } }, "auto_complete_order": { "type": "boolean", "x-stoplight": { "id": "766uuj7yzywqo" } }, "ai_review_loads": { "type": "boolean", "x-stoplight": { "id": "ai1review2loads" }, "description": "Enable AI review of loads for this company" }, "default_lat": { "type": "number", "x-stoplight": { "id": "c52z2j5usqkpr" }, "minimum": -90, "maximum": 90, "nullable": true }, "default_lon": { "type": "number", "x-stoplight": { "id": "wub8z625fvpll" }, "minimum": -180, "maximum": 180, "nullable": true }, "site_radius": { "type": "string", "x-stoplight": { "id": "4gqppk2brel41" }, "nullable": true }, "default_geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "b4fdc0ksu5l85" } } }, "additionalProperties": false }, "Company-Logo-Create": { "title": "Company-Logo-Create", "x-stoplight": { "id": "0ftrms8gtiarc" }, "type": "object", "description": "Company model for logo creation", "required": [ "logo" ], "properties": { "logo": { "x-stoplight": { "id": "4fqw52unkx3b1" }, "anyOf": [ { "x-stoplight": { "id": "34t5ri5242fzy" }, "format": "binary" }, { "x-stoplight": { "id": "mmnbbtiuaqj1u" } } ], "type": "string" } }, "additionalProperties": false }, "Company-Logo-Read": { "title": "Company-Logo-Read", "x-stoplight": { "id": "rq1csqrap8fr" }, "description": "Company logo information for reads.", "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "logo_url": { "type": "string", "nullable": true, "description": "URL to the company's logo image", "x-stoplight": { "id": "logo_url_prop_id" } } }, "required": [ "logo_url" ] } ] }, "Company-Read": { "title": "Company-Read", "x-stoplight": { "id": "qcutoncg3n7kl" }, "allOf": [ { "$ref": "#/components/schemas/Company-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "cak4sl1rqwjew" }, "required": [ "dba_name", "tread_customer", "address", "stytch_organization_id", "language", "time_format", "date_format", "unit_of_distance", "system_of_measure", "currency", "time_zone", "primary_contact", "billing_contact", "logo_url", "billing_status", "saas_billing_plan", "usage_status", "fuel_surcharge_percentage", "auth_methods", "auto_complete_order", "ai_review_loads", "site_radius", "default_geofence_delay_seconds" ], "properties": { "dba_name": { "type": "string", "x-stoplight": { "id": "82k7xebdtasux" }, "description": "Doing Business As name. Must be globally unique", "nullable": true }, "tread_customer": { "type": "boolean", "x-stoplight": { "id": "4crhqnx07wi3s" }, "description": "Flag indicating that this `Company` is a customer of Tread" }, "address": { "$ref": "#/components/schemas/Address-Read-Nested" }, "stytch_organization_id": { "type": "string", "x-stoplight": { "id": "4jj13auzko3ud" }, "description": "Stytch Organization ID of this `Company`. Must be globally unique.", "nullable": true }, "language": { "$ref": "#/components/schemas/Language" }, "time_format": { "$ref": "#/components/schemas/TimeFormat" }, "date_format": { "$ref": "#/components/schemas/DateFormat" }, "unit_of_distance": { "$ref": "#/components/schemas/UnitOfDistance" }, "system_of_measure": { "$ref": "#/components/schemas/SystemOfMeasure" }, "currency": { "$ref": "#/components/schemas/Currency" }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "primary_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "logo_url": { "x-stoplight": { "id": "mnw8c7bini09x" }, "type": "string", "format": "uri", "nullable": true }, "billing_status": { "$ref": "#/components/schemas/BillingStatus" }, "saas_billing_plan": { "$ref": "#/components/schemas/SaasBillingPlan" }, "usage_status": { "$ref": "#/components/schemas/UsageStatus" }, "parent_company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "fuel_surcharge_percentage": { "type": "string", "x-stoplight": { "id": "u43p6mfcjmxy3" } }, "auth_methods": { "type": "array", "x-stoplight": { "id": "y7bj1dk8xtm09" }, "items": { "$ref": "#/components/schemas/AuthMethod" } }, "auto_complete_order": { "type": "boolean", "x-stoplight": { "id": "f4fro1527ji43" } }, "ai_review_loads": { "type": "boolean", "x-stoplight": { "id": "ai2review3loads" }, "description": "Enable AI review of loads for this company" }, "default_lat": { "type": "string", "x-stoplight": { "id": "27ftmnviz2er7" }, "example": "43.648947", "nullable": true }, "default_lon": { "type": "string", "x-stoplight": { "id": "mr9iazlac5hu5" }, "example": "-79.389193", "nullable": true }, "site_radius": { "type": "string", "x-stoplight": { "id": "1fhl9nsdxt5k7" }, "nullable": true }, "default_geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "7oqwj60jyv1jg" } } } } ], "description": "Company model for reads. " }, "Company-Read-Nested": { "title": "Company-Read-Nested", "x-stoplight": { "id": "cb2kn77qmf1l7" }, "description": "Compact Company model for nested reads.", "allOf": [ { "$ref": "#/components/schemas/Identifier", "x-stoplight": { "id": "jwsufva4znm91" } }, { "$ref": "#/components/schemas/TreadId" }, { "type": "object", "properties": { "legal_name": { "type": "string", "x-stoplight": { "id": "yc10t8hieecwk" }, "description": "The Company's name. Must be globally unique." }, "company_type": { "$ref": "#/components/schemas/CompanyType" } }, "required": [ "legal_name", "company_type" ] } ] }, "Company-Read-Typeahead": { "title": "Company-Read-Typeahead", "x-stoplight": { "id": "vl8vd87brmcah" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "legal_name": { "type": "string", "description": "Company Legal Name", "x-stoplight": { "id": "gy5vtcbh7agl2" } } }, "required": [ "legal_name" ] } ], "x-internal": true }, "Company-Update": { "title": "Company-Update", "x-stoplight": { "id": "vzy6sd8how2v7" }, "type": "object", "properties": { "legal_name": { "type": "string", "example": "Tread", "description": "Legal registered name of the `Company` - used for billing. Must be globally unique" }, "dba_name": { "type": "string", "description": "Doing Business As name. Must be globally unique", "nullable": true }, "address": { "$ref": "#/components/schemas/Address-Update" }, "tread_customer": { "type": "boolean", "default": false, "description": "Flag indicating that this `Company` is a customer of Tread" }, "language": { "$ref": "#/components/schemas/Language" }, "date_format": { "$ref": "#/components/schemas/DateFormat" }, "time_format": { "$ref": "#/components/schemas/TimeFormat" }, "system_of_measure": { "$ref": "#/components/schemas/SystemOfMeasure" }, "unit_of_distance": { "$ref": "#/components/schemas/UnitOfDistance" }, "currency": { "$ref": "#/components/schemas/Currency" }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "primary_contact": { "$ref": "#/components/schemas/Contact-Update" }, "billing_contact": { "$ref": "#/components/schemas/Contact-Update" }, "usage_status": { "$ref": "#/components/schemas/UsageStatus" }, "billing_status": { "$ref": "#/components/schemas/BillingStatus" }, "saas_billing_plan": { "$ref": "#/components/schemas/SaasBillingPlan" }, "company_type": { "$ref": "#/components/schemas/CompanyType" }, "fuel_surcharge_percentage": { "type": "number", "x-stoplight": { "id": "tobcjytkoild1" }, "minimum": 0, "maximum": 100 }, "auth_methods": { "type": "array", "x-stoplight": { "id": "gs8umv2xuewdq" }, "items": { "$ref": "#/components/schemas/AuthMethod" } }, "ai_review_loads": { "type": "boolean", "x-stoplight": { "id": "ai3review4loads" }, "description": "Enable AI review of loads for this company" }, "default_lat": { "type": "string", "x-stoplight": { "id": "5ddw2beimkdbg" }, "nullable": true }, "default_lon": { "type": "string", "x-stoplight": { "id": "mor2bcbxiu7zx" }, "nullable": true }, "site_radius": { "type": "number", "x-stoplight": { "id": "qvg3rpedhjo8b" }, "nullable": true }, "default_geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "a2pit27zk3wjw" } } }, "additionalProperties": false }, "CompanyDayDriverStat-Read": { "title": "CompanyDayDriverStat-Read", "x-stoplight": { "id": "3grxlvq5qo470" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "e0k1y5lyccj7x" }, "properties": { "day": { "type": "string", "x-stoplight": { "id": "tq2kbgspesbyq" }, "format": "date" }, "jobs_count": { "type": "integer", "x-stoplight": { "id": "lq3o1iorx79vx" } } } } ], "description": "CompanyDayDriverStat" }, "CompanyDayJobStat-Read": { "title": "CompanyDayJobStat-Read", "x-stoplight": { "id": "wa6f07ctugc6c" }, "type": "object", "description": "CompanyDayJobStat for a given company", "x-tags": [ "companies" ], "x-internal": true, "required": [ "accepted_count", "assigned_count", "canceled_count", "capacity_available_count", "capacity_total_count", "completed_count", "enroute_count", "has_been_accepted_count", "loaded_count", "pending_count", "rejected_count", "sent_count", "total_count", "unassigned_count", "unloaded_count", "day", "orders_total_count", "orders_pending_request_count" ], "properties": { "accepted_count": { "type": "integer", "x-stoplight": { "id": "twszrt69yuwos" }, "exclusiveMinimum": false, "minimum": 0 }, "assigned_count": { "type": "integer", "x-stoplight": { "id": "fuppbsa7ujw6g" }, "minimum": 0 }, "canceled_count": { "type": "integer", "x-stoplight": { "id": "x9y942hfwox7b" }, "minimum": 0 }, "capacity_available_count": { "type": "integer", "x-stoplight": { "id": "qx0qwnd89y4mi" }, "minimum": 0 }, "capacity_total_count": { "type": "integer", "x-stoplight": { "id": "lmyk13tificqj" }, "minimum": 0 }, "completed_count": { "type": "integer", "x-stoplight": { "id": "kn2nqyhbh1hz0" }, "minimum": 0 }, "enroute_count": { "type": "integer", "x-stoplight": { "id": "fyrwxro33j6m1" }, "minimum": 0 }, "has_been_accepted_count": { "type": "integer", "x-stoplight": { "id": "1aa5aateuri17" }, "minimum": 0 }, "loaded_count": { "type": "integer", "x-stoplight": { "id": "1di5riteuri16" }, "minimum": 0 }, "rejected_count": { "type": "integer", "x-stoplight": { "id": "nxq11y3oo3ey9" }, "minimum": 0 }, "sent_count": { "type": "integer", "x-stoplight": { "id": "pufray0h1yp73" }, "minimum": 0 }, "total_count": { "type": "integer", "x-stoplight": { "id": "r04iwq1ebkvcw" }, "minimum": 0 }, "unassigned_count": { "type": "integer", "x-stoplight": { "id": "bj9fofa25auje" }, "minimum": 0 }, "unloaded_count": { "type": "integer", "x-stoplight": { "id": "0y0hli9hcda7z" }, "minimum": 0 }, "day": { "type": "string", "x-stoplight": { "id": "3vupu65rkrszz" }, "format": "date" }, "orders_total_count": { "type": "integer", "x-stoplight": { "id": "vjbzi0eawghvv" } }, "orders_pending_request_count": { "type": "integer", "x-stoplight": { "id": "qr2hnu98voxc7" } }, "pending_count": { "type": "integer", "x-stoplight": { "id": "iys63c417cdo0" }, "minimum": 0, "description": "Total jobs with JobRequested state event for the day" } }, "additionalProperties": false }, "CompanyJobJobEventChannel-Read": { "title": "CompanyJobJobEventChannel-Read", "x-stoplight": { "id": "cjje94xk7m2pq" }, "type": "object", "description": "Real-time updates for JobEvents on a specific Job. Clients subscribe with company_id and job_id to receive JobEvent updates as they occur.", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/JobEvent-Read" } }, "additionalProperties": false }, "CompanyShare-Create": { "title": "CompanyShare-Create", "x-stoplight": { "id": "8bgp42ntgizqx" }, "type": "object", "required": [ "receiver_company_id", "company_shareable_id", "company_shareable_type" ], "properties": { "receiver_company_id": { "type": "string", "x-stoplight": { "id": "ueempsmbg5dpq" }, "format": "uuid" }, "company_shareable_id": { "type": "string", "x-stoplight": { "id": "bptnrqwak0r5i" }, "format": "uuid" }, "company_shareable_type": { "$ref": "#/components/schemas/CompanyShareableType" }, "dispatchable": { "type": "boolean", "x-stoplight": { "id": "3k6wflbl3vsqh" }, "description": "Whether the receiver `Company` can dispatch to the shared model.\n\n`dispatchable` defaults to `false` for `Equipment` and `true` for `User`. " }, "rate_override": { "type": "boolean", "x-stoplight": { "id": "hcmpiszi75zt3" }, "description": "Whether the receiver `Company` can override the `Rate` that will be used by the shared model when dispatched.\n\n`rate_override` is always `false` for `Equipment` and defaults to `false` for `User` (can be edited to `true`)" }, "expires_at": { "type": "string", "x-stoplight": { "id": "izsipmch75zt3" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone" }, "ticket_match_id": { "type": "string", "x-stoplight": { "id": "tmid8bgp42n" } } }, "additionalProperties": false }, "CompanyShare-Read": { "title": "CompanyShare-Read", "x-stoplight": { "id": "3fw8no6g8e334" }, "allOf": [ { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "5tvsur0wkmwr3" }, "required": [ "parent_company_share_id", "company_shareable_id", "company_shareable_type", "receiver_company", "company_shareable" ], "properties": { "parent_company_share_id": { "type": "string", "x-stoplight": { "id": "hl0lvh254bdch" }, "format": "uuid", "nullable": true }, "company_shareable_id": { "type": "string", "x-stoplight": { "id": "l5wwd21py5c6e" }, "format": "uuid", "deprecated": true }, "company_shareable_type": { "$ref": "#/components/schemas/CompanyShareableType", "deprecated": true }, "receiver_company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "company_shareable": { "$ref": "#/components/schemas/CompanyShareable-Read-Nested" } } } ] }, "CompanyShare-Read-Driver-Nested": { "title": "CompanyShare-Read-Driver-Nested", "x-stoplight": { "id": "top7tsa824c0p" }, "allOf": [ { "$ref": "#/components/schemas/CompanyShare-Read-User-Nested" }, { "type": "object", "x-stoplight": { "id": "rnzzjr7g8jgsr" }, "properties": { "receiver_account": { "$ref": "#/components/schemas/Account-Read-Driver-Nested" } } } ] }, "CompanyShare-Read-Foreman-Nested": { "title": "CompanyShare-Read-Foreman-Nested", "x-stoplight": { "id": "ofb9lm02kntr7" }, "allOf": [ { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, { "type": "object", "x-stoplight": { "id": "b1rs2tfs6wv3b" }, "properties": { "receiver_account": { "$ref": "#/components/schemas/Account-Read-Foreman-Nested" } } } ] }, "CompanyShare-Read-Nested": { "title": "CompanyShare-Read-Nested", "x-stoplight": { "id": "makajouqsb7jq" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "s6h0nfzt2fjry" }, "required": [ "external_id", "ticket_match_id", "sender_company", "dispatchable", "schedule_on", "rate_override", "expires_at" ], "properties": { "external_id": { "type": "string", "x-stoplight": { "id": "c9ls3nrhbih3v" }, "nullable": true }, "ticket_match_id": { "type": "string", "x-stoplight": { "id": "a1cd3nrhbih3v" }, "nullable": true }, "sender_company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "dispatchable": { "type": "boolean", "x-stoplight": { "id": "kd884ihz6qi6w" } }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "kd884ihz61234" } }, "rate_override": { "type": "boolean", "x-stoplight": { "id": "mq4osazzielxo" } }, "expires_at": { "type": "string", "x-stoplight": { "id": "aaa111jpq0ga9" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone", "nullable": true } } } ] }, "CompanyShare-Read-User-Nested": { "title": "CompanyShare-Read-User-Nested", "x-stoplight": { "id": "8czythac5qhgz" }, "allOf": [ { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, { "type": "object", "properties": { "default_equipment": { "$ref": "#/components/schemas/Equipment-Read-Default-Nested" } } } ] }, "CompanyShare-Update": { "title": "CompanyShare-Update", "x-stoplight": { "id": "geay0k7358gt2" }, "type": "object", "properties": { "external_id": { "type": "string", "x-stoplight": { "id": "kob9ztzpw31hb" } }, "ticket_match_id": { "type": "string", "x-stoplight": { "id": "baa1ztzpw31hb" } }, "dispatchable": { "type": "boolean", "x-stoplight": { "id": "goxg92u0s8end" } }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "aaaa92u0s8end" } }, "rate_override": { "type": "boolean", "x-stoplight": { "id": "4ezg457x7lxek" } }, "default_equipment_id": { "type": "string", "x-stoplight": { "id": "m1n56g7y6y1m5" }, "nullable": true }, "default_additional_equipment_ids": { "type": "array", "x-stoplight": { "id": "o89g451x7vxb4" }, "items": { "x-stoplight": { "id": "tkcbf1r95tmhc" }, "type": "string", "format": "uuid" } }, "expires_at": { "type": "string", "x-stoplight": { "id": "fbckt1r95tmhc" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone", "nullable": true } }, "additionalProperties": false }, "CompanyShareable-Read-Nested": { "title": "CompanyShareable-Read-Nested", "x-stoplight": { "id": "7gq4gh59nzv6r" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "f3fdykm0k5rid" }, "required": [ "name", "type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "m0zwbwf2ta0tr" } }, "type": { "$ref": "#/components/schemas/CompanyShareableType" } } } ] }, "CompanyShareableType": { "title": "CompanyShareType", "x-stoplight": { "id": "o6j5rtwll4fvm" }, "enum": [ "User", "Equipment", "Site" ], "description": "" }, "CompanyType": { "title": "CompanyType", "x-stoplight": { "id": "dkzo7gjbtb1b3" }, "enum": [ "broker", "contractor", "hauler", "owner_operator", "producer", "super" ], "example": "hauler", "description": "Company Type" }, "ComplianceCheck-Read": { "title": "ComplianceCheck-Read", "x-stoplight": { "id": "cc1read000001" }, "type": "object", "properties": { "has_issues": { "type": "boolean", "x-stoplight": { "id": "cc1readissue01" } }, "warnings": { "type": "array", "x-stoplight": { "id": "cc1readwarn001" }, "items": { "$ref": "#/components/schemas/ComplianceIssue" } }, "blocking": { "type": "array", "x-stoplight": { "id": "cc1readblock01" }, "items": { "$ref": "#/components/schemas/ComplianceIssue" } } }, "required": [ "has_issues", "warnings", "blocking" ], "additionalProperties": false }, "ComplianceDocument-Create": { "title": "ComplianceDocument-Create", "x-stoplight": { "id": "cd1create00001" }, "type": "object", "properties": { "compliance_document_type_id": { "type": "string", "x-stoplight": { "id": "cd1creatcti001" }, "format": "uuid", "description": "ID of the compliance document type" }, "compliant_type": { "type": "string", "x-stoplight": { "id": "cd1creatct0001" }, "enum": [ "Account", "User", "Equipment" ], "description": "Type of entity" }, "compliant_id": { "type": "string", "x-stoplight": { "id": "cd1creatci0001" }, "format": "uuid", "description": "ID of the entity" }, "value": { "type": "string", "x-stoplight": { "id": "cd1creatval001" }, "description": "Custom value" }, "expires_at": { "type": "string", "x-stoplight": { "id": "cd1createxp001" }, "format": "date-time", "description": "Expiration date" } }, "required": [ "compliance_document_type_id" ], "additionalProperties": false }, "ComplianceDocument-Read": { "title": "ComplianceDocument-Read", "x-stoplight": { "id": "cd1read0000001" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "compliant_type": { "type": "string", "x-stoplight": { "id": "cd1readct00001" }, "enum": [ "Account", "User", "Equipment" ], "description": "Type of entity this document belongs to" }, "compliant_id": { "type": "string", "x-stoplight": { "id": "cd1readci00001" }, "format": "uuid", "description": "ID of the entity this document belongs to" }, "value": { "type": "string", "x-stoplight": { "id": "cd1readval0001" }, "nullable": true, "description": "Custom value for this document" }, "expires_at": { "type": "string", "x-stoplight": { "id": "cd1readexp0001" }, "format": "date-time", "nullable": true, "description": "Expiration date of the document" }, "notification_sent_at": { "type": "string", "x-stoplight": { "id": "cd1readnsa0001" }, "format": "date-time", "nullable": true, "description": "Timestamp when expiration notification was sent" }, "compliance_document_type": { "$ref": "#/components/schemas/ComplianceDocumentType-Read-Nested", "x-stoplight": { "id": "cd1readcdt0001" }, "description": "The document type" } }, "required": [ "compliant_type", "compliant_id", "compliance_document_type" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "ComplianceDocument-Read-Nested": { "title": "ComplianceDocument-Read-Nested", "x-stoplight": { "id": "n3q5dwg8m1r7k" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "t6u2fxh9p4s0l" }, "required": [ "compliant_type", "compliant_id" ], "properties": { "compliant_type": { "type": "string", "x-stoplight": { "id": "c8v1gyi3q5w7n" }, "enum": [ "Account", "User", "Equipment" ], "description": "Type of entity this document belongs to" }, "compliant_id": { "type": "string", "x-stoplight": { "id": "d2x4hzj6r8a0p" }, "format": "uuid", "description": "ID of the entity this document belongs to" }, "value": { "type": "string", "x-stoplight": { "id": "e9y7iak5s1b3q" }, "nullable": true, "description": "Custom value for this document" }, "expires_at": { "type": "string", "x-stoplight": { "id": "f0z8jbl4t2c6r" }, "format": "date-time", "nullable": true, "description": "Expiration date of the document" } } } ] }, "ComplianceDocument-Update": { "title": "ComplianceDocument-Update", "x-stoplight": { "id": "cd1update00001" }, "type": "object", "properties": { "value": { "type": "string", "x-stoplight": { "id": "cd1updatval001" }, "description": "Custom value" }, "expires_at": { "type": "string", "x-stoplight": { "id": "cd1updatexp001" }, "format": "date-time", "description": "Expiration date" } }, "additionalProperties": false }, "ComplianceDocumentType-Create": { "title": "ComplianceDocumentType-Create", "x-stoplight": { "id": "cdt1create0001" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "cdt1crname0001" }, "description": "Display name, must be unique for the company" }, "external_id": { "type": "string", "x-stoplight": { "id": "cdt1crcode0001" }, "description": "External identifier for integration with external systems" }, "description": { "type": "string", "x-stoplight": { "id": "cdt1crdesc0001" }, "description": "Optional description" }, "field_type": { "type": "string", "x-stoplight": { "id": "cdt1crft000001" }, "enum": [ "none", "string", "number", "date", "boolean" ], "default": "none" }, "has_expiration": { "type": "boolean", "x-stoplight": { "id": "cdt1crhe000001" }, "default": false }, "dispatch_gating": { "type": "boolean", "x-stoplight": { "id": "cdt1crdg000001" }, "default": false }, "required_vendors": { "type": "boolean", "x-stoplight": { "id": "cdt1crrv000001" }, "default": false }, "required_internal_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1crrid00001" }, "default": false }, "required_shared_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1crrsd00001" }, "default": false }, "required_equipment": { "type": "boolean", "x-stoplight": { "id": "cdt1crre000001" }, "default": false } }, "additionalProperties": false }, "ComplianceDocumentType-Read": { "title": "ComplianceDocumentType-Read", "x-stoplight": { "id": "cdt1read000001" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "cdt1readname01" }, "description": "Display name of the document type" }, "external_id": { "type": "string", "x-stoplight": { "id": "cdt1readcode01" }, "description": "External identifier for integration with external systems", "nullable": true }, "description": { "type": "string", "x-stoplight": { "id": "cdt1readdesc01" }, "description": "Optional description", "nullable": true }, "field_type": { "type": "string", "x-stoplight": { "id": "cdt1readft0001" }, "enum": [ "none", "string", "number", "date", "boolean" ], "description": "Type of custom value field" }, "has_expiration": { "type": "boolean", "x-stoplight": { "id": "cdt1readhe0001" }, "description": "Whether this type has an expiration date" }, "dispatch_gating": { "type": "boolean", "x-stoplight": { "id": "cdt1readdg0001" }, "description": "Whether expired/missing docs trigger dispatch warnings" }, "required_vendors": { "type": "boolean", "x-stoplight": { "id": "cdt1readrv0001" }, "description": "Whether vendors must have this document" }, "required_internal_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1readrid001" }, "description": "Whether internal company drivers must have this document" }, "required_shared_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1readrsd001" }, "description": "Whether shared/vendor drivers must have this document" }, "required_equipment": { "type": "boolean", "x-stoplight": { "id": "cdt1readre0001" }, "description": "Whether equipment must have this document" } }, "required": [ "name", "field_type", "has_expiration", "dispatch_gating", "required_vendors", "required_internal_drivers", "required_shared_drivers", "required_equipment" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "ComplianceDocumentType-Read-Nested": { "title": "ComplianceDocumentType-Read-Nested", "x-stoplight": { "id": "k7m2xpqr9w4nf" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "v3h8yjzl5t1qb" }, "required": [ "name", "field_type", "has_expiration", "dispatch_gating", "required_vendors", "required_internal_drivers", "required_shared_drivers", "required_equipment" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "r4n6wkf8j2m1x" }, "description": "Display name of the document type" }, "external_id": { "type": "string", "x-stoplight": { "id": "p9c3qvh7e5s2y" }, "description": "External identifier for integration with external systems", "nullable": true }, "field_type": { "type": "string", "x-stoplight": { "id": "w1d5bnm4g8t6z" }, "enum": [ "none", "string", "number", "date", "boolean" ], "description": "Type of custom value field" }, "has_expiration": { "type": "boolean", "x-stoplight": { "id": "a2f7xlj3k9u0c" }, "description": "Whether this type has an expiration date" }, "dispatch_gating": { "type": "boolean", "x-stoplight": { "id": "b6g1yre8n4v5d" }, "description": "Whether expired/missing docs trigger dispatch warnings" }, "required_vendors": { "type": "boolean", "x-stoplight": { "id": "e8h3zsp2q7w6f" }, "description": "Whether vendors must have this document" }, "required_internal_drivers": { "type": "boolean", "x-stoplight": { "id": "f5j9atm1r0x8g" }, "description": "Whether internal company drivers must have this document" }, "required_shared_drivers": { "type": "boolean", "x-stoplight": { "id": "h0k4bun6s3y2i" }, "description": "Whether shared/vendor drivers must have this document" }, "required_equipment": { "type": "boolean", "x-stoplight": { "id": "j7l8cvp5t2z9m" }, "description": "Whether equipment must have this document" } } } ] }, "ComplianceDocumentType-Update": { "title": "ComplianceDocumentType-Update", "x-stoplight": { "id": "cdt1update0001" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "cdt1upname0001" }, "description": "Display name" }, "external_id": { "type": "string", "x-stoplight": { "id": "cdt1upcode0001" }, "description": "External identifier for integration with external systems" }, "description": { "type": "string", "x-stoplight": { "id": "cdt1updesc0001" }, "description": "Optional description" }, "field_type": { "type": "string", "x-stoplight": { "id": "cdt1upft000001" }, "enum": [ "none", "string", "number", "date", "boolean" ] }, "has_expiration": { "type": "boolean", "x-stoplight": { "id": "cdt1uphe000001" } }, "dispatch_gating": { "type": "boolean", "x-stoplight": { "id": "cdt1updg000001" } }, "required_vendors": { "type": "boolean", "x-stoplight": { "id": "cdt1uprv000001" } }, "required_internal_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1uprid00001" } }, "required_shared_drivers": { "type": "boolean", "x-stoplight": { "id": "cdt1uprsd00001" } }, "required_equipment": { "type": "boolean", "x-stoplight": { "id": "cdt1upre000001" } } }, "additionalProperties": false }, "ComplianceIssue": { "title": "ComplianceIssue", "x-stoplight": { "id": "cc1issue00001" }, "type": "object", "properties": { "type": { "type": "string", "x-stoplight": { "id": "cc1isstype0001" } }, "entity": { "type": "string", "x-stoplight": { "id": "cc1issentity01" }, "nullable": true }, "document_type": { "type": "string", "x-stoplight": { "id": "cc1issdoctyp01" } }, "document_type_id": { "type": "string", "format": "uuid", "x-stoplight": { "id": "cc1issdoctid01" } }, "expires_at": { "type": "string", "format": "date-time", "x-stoplight": { "id": "cc1issexpire01" }, "nullable": true } }, "required": [ "type", "document_type", "document_type_id" ], "additionalProperties": false }, "Contact-Create": { "title": "Contact-Create", "x-stoplight": { "id": "dhro09gmoiqgw" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "ehb4vhlggledw" } }, "email": { "type": "string", "x-stoplight": { "id": "kxjggao5fm38r" } }, "phone": { "type": "string", "x-stoplight": { "id": "3dxv517oimpb1" }, "example": "+18885551234", "description": "Contact's E.164 formatted phone number" } }, "additionalProperties": false }, "Contact-Read-Nested": { "title": "Contact-Read-Nested", "x-stoplight": { "id": "3u6d8qhsz5ehn" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "email", "phone" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "sd80y9pbgvkok" }, "nullable": true }, "email": { "type": "string", "x-stoplight": { "id": "883fmt34pdeaj" }, "nullable": true }, "phone": { "type": "string", "x-stoplight": { "id": "wdtqyju4t4u06" }, "example": "+18885551234", "nullable": true } } } ], "description": "" }, "Contact-Update": { "title": "Contact-Update", "x-stoplight": { "id": "p2ny8u55sfpcx" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "wm2na5bv2uvvv" } }, "email": { "x-stoplight": { "id": "mdv25imtbstfh" }, "type": "string" }, "phone": { "type": "string", "x-stoplight": { "id": "rtf4rqlgwt35i" }, "example": "+18885551234" } }, "additionalProperties": false }, "Contact-Update-Destroyable": { "title": "Contact-Update-Destroyable", "x-stoplight": { "id": "v9odqbnxcm0g2" }, "allOf": [ { "$ref": "#/components/schemas/Contact-Update" }, { "$ref": "#/components/schemas/Destroyable" } ] }, "ContactBulkAssign-Create": { "title": "ContactBulkAssign-Create", "x-stoplight": { "id": "3pwniqkij3ood" }, "type": "object", "properties": { "contacts": { "x-stoplight": { "id": "llj1j5ykny1hy" }, "type": "array", "items": { "$ref": "#/components/schemas/Contact-Update-Destroyable" } } }, "additionalProperties": false }, "Currency": { "title": "Currency", "x-stoplight": { "id": "6omugo38dl0jl" }, "enum": [ "CAD", "USD" ], "example": "USD", "default": "USD", "description": "Currency" }, "DailyExport-Read": { "title": "DailyExport-Read", "x-stoplight": { "id": "omxur2zom8vrl" }, "type": "object", "required": [ "day", "created_at", "file_url" ], "properties": { "day": { "type": "string", "x-stoplight": { "id": "4ptbcq6ryqkfo" }, "format": "date" }, "created_at": { "type": "string", "x-stoplight": { "id": "dio0ll8zgt6g7" }, "format": "date-time" }, "file_url": { "type": "string", "x-stoplight": { "id": "38lhuxnqd1xgx" } } }, "additionalProperties": false }, "DateFormat": { "title": "DateFormat", "x-stoplight": { "id": "i3g08ad8vmf6g" }, "enum": [ "MM/DD/YYYY", "DD/MM/YYYY", "YYYY/MM/DD" ], "example": "MM/DD/YYYY", "default": "MM/DD/YYYY" }, "DeliveredQuantity-Read": { "title": "DeliveredQuantity-Read", "x-stoplight": { "id": "trwwil0vsjrtn" }, "type": "object", "required": [ "delivered", "unit_of_measure", "material_name", "total", "ticketed" ], "properties": { "delivered": { "type": "string", "x-stoplight": { "id": "xqo11su8z94my" } }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_name": { "type": "string", "x-stoplight": { "id": "h7jmwwi6jx02h" }, "nullable": true }, "total": { "type": "string", "x-stoplight": { "id": "8ghxe07yz102y" } }, "ticketed": { "type": "boolean", "nullable": true, "x-stoplight": { "id": "hxg8e07yz102y" } } }, "additionalProperties": false }, "Department-Create": { "title": "Department-Create", "x-stoplight": { "id": "e6n0yictgnrsm" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "0goeospbs1mc3" }, "description": "Department name, must be unique for the company " } }, "additionalProperties": false }, "Department-Read": { "title": "Department-Read", "x-stoplight": { "id": "gbl1sm5vgmgsc" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "q2t54kc2rvabe" }, "description": "Department name" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } }, "required": [ "name", "company" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "Department-Read-Nested": { "title": "Department-Read-Nested", "x-stoplight": { "id": "gv9tfg4scr2yx" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "4y3gfdgq1brqf" }, "properties": { "name": { "type": "string", "x-stoplight": { "id": "3718c2tvwwqsn" }, "description": "Department name." } }, "required": [ "name" ] } ] }, "Department-Read-Typeahead": { "title": "Department-Read-Typeahead", "x-stoplight": { "id": "p78wbrthl46mr" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "fy8jozdwbtq4k" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "sh9gkn0s9k4bz" } } } } ] }, "Department-Update": { "title": "Department-Update", "x-stoplight": { "id": "be9uw3b7ztsjm" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "7sx2ja5lhv3cd" }, "description": "Name of the department. Must be unique for a company." } }, "additionalProperties": false }, "Deployment-Read": { "title": "Deployment-Read", "x-stoplight": { "id": "fi7m3unplhdwi" }, "type": "object", "required": [ "service", "state" ], "properties": { "service": { "x-stoplight": { "id": "vpbq586bfss2q" }, "enum": [ "horizon_fe", "horizon_api" ] }, "state": { "x-stoplight": { "id": "48a075z1395mc" }, "enum": [ "start", "success", "failure" ] } }, "additionalProperties": false }, "Destroyable": { "title": "Destroyable", "x-stoplight": { "id": "2uftzhptd2l14" }, "type": "object", "properties": { "id": { "type": "string", "x-stoplight": { "id": "gx1ww996hmzqm" }, "format": "uuid", "description": "Required if `_destroy` is set" }, "_destroy": { "type": "integer", "x-stoplight": { "id": "0xjwztkz4fmcr" }, "description": "If this is provided with value of `1` like so `_destroy: 1` then this model will be deleted. The `id` must be set." } }, "additionalProperties": false }, "DevicePermission": { "title": "DevicePermission", "x-stoplight": { "id": "fog1bzwo59bxy" }, "description": "These are the list of permissions an app user can set", "enum": [ "location_while_using", "location_always", "notifications", "motion_and_fitness", "physical_activity", "ignore_battery_optimizations", "background_refresh" ] }, "DevicePermissionState": { "title": "DevicePermissionState", "x-stoplight": { "id": "3c1p4ft9qi1uj" }, "description": "These are the list of permission states a permission can have", "enum": [ "denied", "granted", "restricted", "limited", "permanently_denied", "provisional" ] }, "DeviceStatus": { "title": "DeviceStatus", "x-stoplight": { "id": "1bzyq4ijbjbtt" }, "example": "offline", "default": "no_signal", "description": "Telematic and other status data about a hardware device.\n\nThe `user_device_permissions` values are not return for telematics hardware.", "allOf": [ { "type": "object", "properties": { "user_device_permissions": { "type": "array", "x-stoplight": { "id": "gn07hocr0lntq" }, "items": { "$ref": "#/components/schemas/UserDevicePermission-Read-Nested" } } } }, { "$ref": "#/components/schemas/GpsStatusable" } ] }, "DeviceToken-Create": { "title": "DeviceToken-Create", "x-stoplight": { "id": "t3cnaxdmixs6n" }, "type": "object", "description": "This is the model for generating User Device Tokens for notifications on mobile", "required": [ "token" ], "properties": { "token": { "type": "string", "x-stoplight": { "id": "qnoqbek07ezyt" }, "description": "The token generated by firebase" } }, "additionalProperties": false }, "DeviceToken-Read": { "title": "DeviceToken-Read", "x-stoplight": { "id": "2krv7k4vp9s55" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "user_id": { "type": "string", "x-stoplight": { "id": "3v3stuh6stl5i" }, "format": "uuid" }, "token": { "type": "string", "x-stoplight": { "id": "clqvzlm8m29yz" } } }, "required": [ "user_id", "token" ] }, { "$ref": "#/components/schemas/Timestamps" } ], "description": "DeviceToken model for reads. " }, "DirectUpload-Create": { "title": "DirectUpload-Create", "x-stoplight": { "id": "gu4eq95ccx5jq" }, "type": "object", "x-internal": true, "required": [ "filename", "byte_size", "checksum", "content_type" ], "properties": { "filename": { "type": "string", "x-stoplight": { "id": "npiq1r1p6z5sz" } }, "byte_size": { "type": "integer", "x-stoplight": { "id": "173ysh5cb9fj9" } }, "checksum": { "type": "string", "x-stoplight": { "id": "u1cilwg6olbvu" } }, "content_type": { "type": "string", "x-stoplight": { "id": "2bz7ycohbo4zz" } }, "metadata": { "type": "object", "x-stoplight": { "id": "7zg8sn25q1paq" } } }, "additionalProperties": false }, "DirectUpload-Read": { "title": "DirectUpload-Read", "x-stoplight": { "id": "ge5fs3tk8yb8k" }, "type": "object", "required": [ "id", "byte_size", "checksum", "content_type", "created_at", "filename", "key", "service_name", "signed_id", "direct_upload" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "lzwkhbbuc30lt" }, "format": "uuid" }, "byte_size": { "type": "integer", "x-stoplight": { "id": "zdq5i2km7dbdd" } }, "checksum": { "type": "string", "x-stoplight": { "id": "pfgyb7ctywy3o" } }, "content_type": { "type": "string", "x-stoplight": { "id": "id6fbesbolbxu" } }, "created_at": { "type": "string", "x-stoplight": { "id": "qkkile7jxkghk" }, "format": "date-time" }, "filename": { "type": "string", "x-stoplight": { "id": "nh2lxjat0biia" } }, "key": { "type": "string", "x-stoplight": { "id": "saakohyy5kvvz" } }, "metadata": { "type": "object", "x-stoplight": { "id": "zlk0ufjqtjaxq" } }, "service_name": { "type": "string", "x-stoplight": { "id": "br0ew9wo8145q" } }, "signed_id": { "type": "string", "x-stoplight": { "id": "zvuflukjwdj16" } }, "direct_upload": { "type": "object", "x-stoplight": { "id": "e4cw0bh9x1t4n" }, "required": [ "url" ], "properties": { "url": { "type": "string", "x-stoplight": { "id": "l0qwu7ya2mng0" }, "format": "uri" }, "headers": { "type": "object", "x-stoplight": { "id": "jgxk00g0qfrub" } } } } }, "additionalProperties": false }, "Discardable": { "title": "Discardable", "x-stoplight": { "id": "46axlb8u5wjay" }, "type": "object", "required": [ "discarded_at" ], "properties": { "discarded_at": { "type": "string", "x-stoplight": { "id": "cy8t6fecoyxbo" }, "format": "date-time", "nullable": true } }, "additionalProperties": false }, "DispatchNumber-Create": { "title": "DispatchNumber-Create", "x-stoplight": { "id": "9f8xoex3arnaw" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "dswmnsebng8ja" } } }, "additionalProperties": false }, "DispatchNumber-Read-Nested": { "title": "DispatchNumber-Read-Nested", "x-stoplight": { "id": "5oe6kw6t82gnr" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } } ] }, "DispatchNumber-Read-Typeahead": { "title": "DispatchNumber-Read-Typeahead", "x-stoplight": { "id": "qcetdkxho2g9s" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "hjd7j5qltq7i0" } } } } ] }, "DispatchNumber-Update": { "title": "DispatchNumber-Update", "x-stoplight": { "id": "pnc0w6nqmqx3m" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "dgxr5h012k8lx" } }, "_destroy": { "type": "integer", "x-stoplight": { "id": "pkzppi16wvdz9" } } }, "additionalProperties": false }, "Driver-Read": { "allOf": [ { "$ref": "#/components/schemas/Driver-Read-Nested" }, { "type": "object", "x-stoplight": { "id": "smbq32b6inc2l" }, "required": [ "external_id", "time_zone", "additional_equipment", "default_additional_equipment", "managed", "labels" ], "properties": { "external_id": { "type": "string", "x-stoplight": { "id": "cj69x6xyjqvql" }, "nullable": true }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "additional_equipment": { "x-stoplight": { "id": "krjs9w5fjf9su" }, "type": "array", "items": { "$ref": "#/components/schemas/Equipment-Read-Nested" } }, "default_additional_equipment": { "type": "array", "x-stoplight": { "id": "2280kkkyt1fb6" }, "items": { "$ref": "#/components/schemas/Equipment-Read-Default-Nested" } }, "managed": { "type": "boolean", "x-stoplight": { "id": "zzzzzz58pns2s" } }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this driver" } } } ], "title": "Driver-Read" }, "Driver-Read-Minimal": { "title": "Driver-Read-Minimal", "x-stoplight": { "id": "f1d1he04n4yjs" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "x918p1q0av9nk" }, "required": [ "first_name", "last_name" ], "properties": { "first_name": { "type": "string", "x-stoplight": { "id": "pvqq6tp23r5eq" } }, "last_name": { "type": "string", "x-stoplight": { "id": "74tvy3qy47xc0" } } } } ] }, "Driver-Read-Nested": { "title": "Driver-Read-Nested", "x-stoplight": { "id": "lcevfprple1sa" }, "allOf": [ { "$ref": "#/components/schemas/Driver-Read-Typeahead" }, { "type": "object", "x-stoplight": { "id": "19sn21xqtmd0w" }, "required": [ "email" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "ekvo9chmdhjkp" }, "nullable": true } } } ] }, "Driver-Read-Show": { "title": "Driver-Read-Show", "x-stoplight": { "id": "crdn7cqotv2t1" }, "allOf": [ { "$ref": "#/components/schemas/Driver-Read" }, { "type": "object", "x-stoplight": { "id": "n20sldp2oxq44" }, "properties": { "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Driver-Nested" } } } ] }, "Driver-Read-Typeahead": { "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "5vacab4kzhkj4" }, "required": [ "first_name", "last_name", "schedule_on", "phone", "managed", "company" ], "properties": { "first_name": { "type": "string", "x-stoplight": { "id": "4gb9hhpizab3h" }, "description": "First name" }, "last_name": { "type": "string", "x-stoplight": { "id": "my6q150nen1kb" }, "description": "Last name" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-User-Nested" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "default_equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "7dq6dvne8bqcr" } }, "company_day_driver_stat": { "$ref": "#/components/schemas/CompanyDayDriverStat-Read" }, "phone": { "type": "string", "x-stoplight": { "id": "y4l44re1zfaa9" }, "description": "User's E.164 formatted phone number", "nullable": true }, "managed": { "type": "boolean", "x-stoplight": { "id": "k8m3xq0sz6wt4" } }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this driver" } } }, { "$ref": "#/components/schemas/GpsStatusable" } ], "title": "Driver-Read-Typeahead" }, "Driver-Time-Logged-Read": { "title": "Driver-Time-Logged-Read", "x-stoplight": { "id": "xbmrfzoz3zddg" }, "type": "object", "properties": { "total_time_logged": { "type": "integer", "x-stoplight": { "id": "x732g1jexvf80" } } }, "additionalProperties": false }, "DriverAssignment-Create": { "title": "DriverAssignment-Create", "x-stoplight": { "id": "ap3ncy5hdt1et" }, "type": "object", "required": [ "driver_id", "job_id" ], "properties": { "driver_id": { "type": "string", "x-stoplight": { "id": "tnq7x8jtke2cm" }, "format": "uuid" }, "job_id": { "type": "string", "x-stoplight": { "id": "gihuh1l7j0ohh" }, "format": "uuid" } }, "additionalProperties": false }, "DriverDay-Read": { "title": "DriverDay-Read", "x-stoplight": { "id": "x3uyxssr62k8m" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "started_shift_at", "ended_shift_at", "jobs_count", "loads_count", "tickets_count", "first_geofence_entry_at", "last_geofence_exit_at", "first_homebase_exit_at", "last_homebase_entry_at", "first_ticket_at", "last_ticket_at", "total_break_minutes", "total_gps_minutes", "total_delivered_quantities", "driver", "company", "driver_day_date", "equipment_external_ids", "shift_adjustment_minutes", "shift_adjustment_type", "total_shift_minutes", "total_on_duty_minutes", "external_id", "driver_day_id", "editable", "times_editable", "adjusted_started_shift_at", "adjusted_ended_shift_at", "delivered_quantities", "travelled_distance_meters" ], "properties": { "started_shift_at": { "type": "string", "x-stoplight": { "id": "jyxnpz12glvic" }, "format": "date-time", "nullable": true }, "ended_shift_at": { "type": "string", "x-stoplight": { "id": "erxxhi8q861f3" }, "format": "date-time", "nullable": true }, "jobs_count": { "type": "integer", "x-stoplight": { "id": "hh1rgudjzyz80" } }, "loads_count": { "type": "integer", "x-stoplight": { "id": "uli2dn8an8w7r" } }, "tickets_count": { "type": "integer", "x-stoplight": { "id": "9px12c8gnfo0v" } }, "first_geofence_entry_at": { "type": "string", "x-stoplight": { "id": "kdvvk1bmxcjcs" }, "format": "date-time", "nullable": true }, "last_geofence_exit_at": { "type": "string", "x-stoplight": { "id": "ljnrxb4f9nf4j" }, "format": "date-time", "nullable": true }, "first_homebase_exit_at": { "type": "string", "x-stoplight": { "id": "fhex01234abcd" }, "format": "date-time", "nullable": true, "description": "The earliest time equipment exited its home base during the driver's on-duty time" }, "last_homebase_entry_at": { "type": "string", "x-stoplight": { "id": "lhen56789efgh" }, "format": "date-time", "nullable": true, "description": "The latest time equipment entered its home base during the driver's on-duty time" }, "first_ticket_at": { "type": "string", "x-stoplight": { "id": "efp3h7z5ymr5v" }, "format": "date-time", "nullable": true }, "last_ticket_at": { "type": "string", "x-stoplight": { "id": "ve7lma3tf2eqh" }, "format": "date-time", "nullable": true }, "total_break_minutes": { "type": "integer", "x-stoplight": { "id": "3uinxutb9eigk" }, "nullable": true }, "total_gps_minutes": { "type": "integer", "x-stoplight": { "id": "53qb3y1wrtmgz" } }, "total_delivered_quantities": { "x-stoplight": { "id": "wa46amxr07q26" }, "type": "array", "items": { "$ref": "#/components/schemas/MaterialDeliveredQuantity" } }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "driver_day_date": { "type": "string", "x-stoplight": { "id": "15n3k7oiut8o8" }, "format": "date" }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "equipment_external_ids": { "type": "array", "x-stoplight": { "id": "7bic77dhx0hqe" }, "items": { "x-stoplight": { "id": "d27mh52vjf5dq" }, "type": "string" } }, "shift_adjustment_minutes": { "type": "integer", "x-stoplight": { "id": "kqqg46ypfm3i2" } }, "shift_adjustment_type": { "$ref": "#/components/schemas/NullableShiftAdjustmentType" }, "total_shift_minutes": { "type": "integer", "x-stoplight": { "id": "opw4karobx252" }, "nullable": true }, "total_on_duty_minutes": { "type": "integer", "x-stoplight": { "id": "p4craugui1zmy" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "p2viy5es0xhab" }, "nullable": true }, "driver_day_id": { "type": "string", "x-stoplight": { "id": "4eo8bb1c0o7ni" } }, "editable": { "type": "boolean", "x-stoplight": { "id": "w5ugpdzu8qo1p" } }, "times_editable": { "type": "boolean", "description": "Whether the driver can edit shift times, captured from the edit_job_times feature flag at creation time" }, "adjusted_started_shift_at": { "type": "string", "x-stoplight": { "id": "xxxnpz12glvic" }, "format": "date-time", "nullable": true }, "adjusted_ended_shift_at": { "type": "string", "x-stoplight": { "id": "xxxxhi8q861f3" }, "format": "date-time", "nullable": true }, "approval_status": { "$ref": "#/components/schemas/Approval-Status" }, "delivered_quantities": { "type": "array", "x-stoplight": { "id": "xa3113eklmosr" }, "items": { "$ref": "#/components/schemas/DeliveredQuantity-Read" } }, "current_driver_state_event": { "$ref": "#/components/schemas/DriverStateEvent-Read" }, "travelled_distance_meters": { "type": "string", "x-stoplight": { "id": "td1a2b3c4d5e6f" }, "nullable": true }, "has_dropoff_signature": { "type": "boolean", "description": "Whether a dropoff signature exists for this driver day" } } }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "$ref": "#/components/schemas/RoleApprovable" } ], "x-internal": true, "description": "NOTE:\n- `total_delivered_quantities` is now `deprecated`. Use `delivered_quantities` instead." }, "DriverDay-Read-Nested": { "title": "DriverDay-Read-Nested", "x-stoplight": { "id": "phwgns0zvtwuy" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "vtxanuwcjt0vy" }, "required": [ "driver_day_id" ], "properties": { "driver_day_id": { "type": "string", "x-stoplight": { "id": "3gdox3ymd2d7l" } } } } ] }, "DriverDay-Read-Typeahead": { "title": "DriverDay-Read-Typeahead", "x-stoplight": { "id": "ddtypahead1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "driver_day_id": { "type": "string", "description": "DriverDay friendly identifier", "x-stoplight": { "id": "ddtypahead2" } } }, "required": [ "driver_day_id" ] } ] }, "DriverDay-Update": { "title": "DriverDay-Update", "x-stoplight": { "id": "ohfzbap8wlrfb" }, "type": "object", "properties": { "shift_adjustment_minutes": { "type": "integer", "x-stoplight": { "id": "zoei9w3cjuwfc" } }, "shift_adjustment_type": { "$ref": "#/components/schemas/NullableShiftAdjustmentType" }, "external_id": { "type": "string", "x-stoplight": { "id": "5kinweh0vzent" }, "nullable": true }, "adjusted_started_shift_at": { "type": "string", "x-stoplight": { "id": "jyxnpz12glxxx" }, "format": "date-time", "nullable": true }, "adjusted_ended_shift_at": { "type": "string", "x-stoplight": { "id": "erxxhi8q86xxx" }, "format": "date-time", "nullable": true } }, "additionalProperties": false }, "DriverSignature-Create": { "$ref": "#/components/schemas/Signature-Create" }, "DriverSignature-Read": { "$ref": "#/components/schemas/Signature-Read", "title": "DriverSignature-Read", "description": "" }, "DriverState": { "title": "DriverState", "x-stoplight": { "id": "ibubibnkuzq3g" }, "enum": [ "on_duty", "off_duty", "break" ], "example": "on_duty", "description": "These are the states of driver to display their availability", "x-internal": true }, "DriverStateEvent-Read": { "title": "DriverStateEvent-Read", "x-stoplight": { "id": "813jz0m2wvdpm" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "user_id": { "type": "string", "format": "uuid", "x-stoplight": { "id": "azx0we0941wlr" } }, "state": { "$ref": "#/components/schemas/DriverState" }, "started_at": { "x-stoplight": { "id": "k97zhsrha4zvo" }, "type": "string", "format": "date-time" }, "ended_at": { "x-stoplight": { "id": "xqde66xx0nitc" }, "type": "string", "format": "date-time", "nullable": true } }, "required": [ "user_id", "state", "started_at" ] }, { "$ref": "#/components/schemas/Timestamps" } ], "description": "Model for driver_state_event", "x-tags": [ "DriverStateEvent" ], "x-internal": true }, "DropoffSignature-Create": { "title": "DropoffSignature-Create", "x-stoplight": { "id": "4g1t03y1rapad" }, "allOf": [ { "$ref": "#/components/schemas/Signature-Create" }, { "type": "object", "x-stoplight": { "id": "ghrw5egmdgym0" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "yub424r3ytw4d" } }, "phone": { "type": "string", "x-stoplight": { "id": "bnwpzbfo5qpt6" } } } } ] }, "DropoffSignature-Read": { "title": "DropoffSignature-Read", "x-stoplight": { "id": "kb8wgmw74nqxa" }, "allOf": [ { "$ref": "#/components/schemas/Signature-Read" }, { "type": "object", "x-stoplight": { "id": "np1uqfvs696bd" }, "required": [ "name", "phone" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "8jipuq2iiy5l7" } }, "phone": { "type": "string", "x-stoplight": { "id": "d4fw5zj727sdf" }, "nullable": true } } } ] }, "EmailSettlement-Create": { "title": "EmailSettlement-Create", "x-stoplight": { "id": "oyvbr7tx2oiyw" }, "type": "object", "required": [ "email", "pdf" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "uegogtap26kvt" }, "format": "email" }, "pdf": { "type": "string", "x-stoplight": { "id": "rragbczl6qr2t" }, "format": "binary" } }, "additionalProperties": false }, "Equipment-Create": { "title": "Equipment-Create", "x-stoplight": { "id": "1krisplhwc7qi" }, "type": "object", "required": [ "name", "equipment_type_id" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "q9aa3fi1h1otg" } }, "license_number": { "type": "string", "x-stoplight": { "id": "pqfafirglts3j" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "rgumh3r14ix11" }, "nullable": true }, "ownership": { "$ref": "#/components/schemas/EquipmentOwnership" }, "state": { "$ref": "#/components/schemas/EquipmentState" }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "o0sxd4jy0ibna" }, "format": "uuid" }, "zone": { "type": "string", "x-stoplight": { "id": "ddumbhlscsm0t" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "q96hnvqad6yiy" }, "nullable": true }, "home_base_id": { "type": "string", "x-stoplight": { "id": "flcb3ahaqt6c9" }, "format": "uuid", "nullable": true }, "label_ids": { "type": "array", "x-stoplight": { "id": "lbl1d5cr8eqp1" }, "description": "Array of Label IDs to assign to this equipment.", "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "Equipment-Read": { "title": "Equipment-Read", "x-stoplight": { "id": "fjrh0hapei5ei" }, "allOf": [ { "$ref": "#/components/schemas/Equipment-Read-Nested" }, { "type": "object", "required": [ "company", "ownership", "state", "labels" ], "properties": { "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "ownership": { "$ref": "#/components/schemas/EquipmentOwnership" }, "state": { "$ref": "#/components/schemas/EquipmentState" }, "home_base": { "$ref": "#/components/schemas/Site-Read-Nested" }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this equipment" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "Equipment-Read-Default-Nested": { "title": "Equipment-Read-Default-Nested", "x-stoplight": { "id": "kojte9y4g6t9v" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "external_id", "equipment_type", "equipment_id" ], "properties": { "name": { "type": "string", "description": "Equipment name" }, "external_id": { "type": "string", "nullable": true }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, "equipment_id": { "type": "string", "x-stoplight": { "id": "v25n5jka8apv0" } } } } ] }, "Equipment-Read-Minimal": { "title": "Equipment-Read-Minimal", "x-stoplight": { "id": "m3uxip3u2g73e" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "external_id" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "8j8x3f9jezxeq" } }, "external_id": { "type": "string", "x-stoplight": { "id": "y33jc1a9rphsf" }, "nullable": true } } } ] }, "Equipment-Read-Nested": { "title": "Equipment-Read-Nested", "x-stoplight": { "id": "7ezenec7ycv5l" }, "allOf": [ { "$ref": "#/components/schemas/Equipment-Read-Typeahead" }, { "type": "object", "required": [ "license_number", "zone", "accounting_id", "equipment_id" ], "properties": { "license_number": { "type": "string", "x-stoplight": { "id": "hw1ooa17wsadq" }, "nullable": true }, "zone": { "type": "string", "x-stoplight": { "id": "81hr4p8yp8btv" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "ere9qhs4cuwhi" }, "nullable": true }, "equipment_id": { "type": "string", "x-stoplight": { "id": "gt7r3iqzx2w0u" } } } } ] }, "Equipment-Read-Typeahead": { "title": "Equipment-Read-Typeahead", "x-stoplight": { "id": "sv94osohm5xhg" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "equipment_type", "external_id", "equipment_id" ], "properties": { "name": { "type": "string", "description": "Equipment name" }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" }, "external_id": { "type": "string", "x-stoplight": { "id": "jrkz95htilck3" }, "nullable": true }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, "equipment_id": { "type": "string", "x-stoplight": { "id": "fkr9fkdtl996f" } } } } ] }, "Equipment-Update": { "title": "Equipment-Update", "x-stoplight": { "id": "6lx00mm4g7920" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "znozv5x3un2hn" } }, "license_number": { "type": "string", "x-stoplight": { "id": "d0ya5jrn2czy7" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "f2f55jpa8mdie" }, "nullable": true }, "ownership": { "$ref": "#/components/schemas/EquipmentOwnership" }, "state": { "$ref": "#/components/schemas/EquipmentState" }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "4kmwtnc7gddqp" }, "format": "uuid" }, "zone": { "type": "string", "x-stoplight": { "id": "8ktxy6rh8u2uv" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "hv61ycgw0tf64" }, "nullable": true }, "home_base_id": { "type": "string", "x-stoplight": { "id": "0zs8bepby7ggm" }, "format": "uuid", "nullable": true }, "label_ids": { "type": "array", "x-stoplight": { "id": "j7n2mkc4up1xe" }, "description": "Array of Label IDs to assign to this Equipment", "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "EquipmentOwnership": { "title": "EquipmentOwnership", "x-stoplight": { "id": "p5e75ayo8y6n5" }, "enum": [ "internal", "external" ], "default": "internal", "example": "internal" }, "EquipmentState": { "title": "EquipmentState", "x-stoplight": { "id": "eh1fgavft82kx" }, "enum": [ "active", "inactive" ], "default": "active", "example": "active" }, "EquipmentStateEvent": { "title": "EquipmentStateEvent", "x-stoplight": { "id": "1a1ulz2srbdfc" }, "enum": [ "activate", "deactivate" ] }, "EquipmentType-Create": { "title": "EquipmentType-Create", "x-stoplight": { "id": "a8n3muqeklf15" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "nf5b9iy6b0ve0" } }, "external_id": { "type": "string", "x-stoplight": { "id": "jtt0dgtonxogr" }, "nullable": true }, "gross_capacity": { "type": "number", "x-stoplight": { "id": "65y5x4v0o1sjb" }, "nullable": true }, "gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "accounting_id": { "type": "string", "x-stoplight": { "id": "c89poagtxhk7z" }, "nullable": true }, "additional_gross_capacities": { "type": "array", "x-stoplight": { "id": "zll76adj5zhh8" }, "items": { "$ref": "#/components/schemas/GrossCapacity" } }, "company_id": { "type": "string", "x-stoplight": { "id": "vi6xr68lbj7ln" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "EquipmentType-Read": { "title": "EquipmentType-Read", "x-stoplight": { "id": "h6dbej397slby" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "system", "external_id", "gross_capacity", "source", "accounting_id", "additional_gross_capacities" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "b31qsofo59k4f" } }, "system": { "type": "boolean", "x-stoplight": { "id": "m1po5dcxo2e5n" } }, "external_id": { "type": "string", "x-stoplight": { "id": "ojqq5vhdl5xsf" }, "nullable": true }, "gross_capacity": { "type": "string", "x-stoplight": { "id": "86j559tl8ttid" }, "nullable": true }, "gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "source": { "$ref": "#/components/schemas/TicketSource" }, "accounting_id": { "type": "string", "x-stoplight": { "id": "hrklzgg4dfg59" }, "nullable": true }, "additional_gross_capacities": { "type": "array", "items": { "$ref": "#/components/schemas/GrossCapacity" } } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "EquipmentType-Read-Nested": { "title": "EquipmentType-Read-Nested", "x-stoplight": { "id": "em46i5kysysdh" }, "type": "object", "required": [ "id", "name", "system", "external_id", "accounting_id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "835oy22o6h24z" }, "format": "uuid" }, "name": { "type": "string", "x-stoplight": { "id": "tnszefd7lypln" } }, "system": { "type": "boolean", "x-stoplight": { "id": "vimoqz5e8x6gx" } }, "external_id": { "type": "string", "x-stoplight": { "id": "ttaijg77qmbgk" }, "nullable": true }, "accounting_id": { "type": "string", "x-stoplight": { "id": "s4rscgptv68x3" }, "nullable": true } }, "additionalProperties": false }, "EquipmentType-Read-Typeahead": { "title": "EquipmentType-Read-Typeahead", "x-stoplight": { "id": "e6i4vca40gozl" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "c78zqsegfn4u4" } } }, "required": [ "name" ] } ] }, "EquipmentType-Update": { "title": "EquipmentType-Update", "x-stoplight": { "id": "5kvvzv0wgvjbt" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "ddokdnuaefpc5" } }, "external_id": { "type": "string", "x-stoplight": { "id": "xzygl5jjbjm5z" }, "nullable": true }, "gross_capacity": { "type": "number", "x-stoplight": { "id": "td05udqzh5dts" }, "nullable": true }, "gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "accounting_id": { "type": "string", "x-stoplight": { "id": "u014zmk5zu7sl" }, "nullable": true }, "additional_gross_capacities": { "type": "array", "x-stoplight": { "id": "vf8bdqly5punq" }, "items": { "$ref": "#/components/schemas/GrossCapacity" } } }, "additionalProperties": false }, "Error": { "title": "Error", "x-stoplight": { "id": "3g57kkik3l464" }, "type": "object", "description": "An Error.", "required": [ "code" ], "properties": { "code": { "type": "string", "x-stoplight": { "id": "7o9x1t8v0bgfo" } } }, "additionalProperties": false }, "Error-Response": { "title": "Error-Response", "x-stoplight": { "id": "52cydhphee3qe" }, "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/Error" } }, "additionalProperties": false }, "FileAttachableType": { "title": "FileAttachableType", "x-stoplight": { "id": "iabhoo1t2x4x8" }, "enum": [ "DriverDay", "Job", "Load", "Order", "Project", "Settlement", "Ticket" ] }, "FileAttachment-Create": { "title": "FileAttachment-Create", "x-stoplight": { "id": "6ov5mmeta4q9b" }, "type": "object", "required": [ "file" ], "properties": { "file": { "x-stoplight": { "id": "vhz4kd26m4atp" }, "anyOf": [ { "x-stoplight": { "id": "nax3vntqjrgyh" }, "format": "binary" }, { "x-stoplight": { "id": "zeyj90b4r3ds5" } } ], "type": "string" }, "category": { "$ref": "#/components/schemas/FileAttachmentCategory" }, "description": { "type": "string", "x-stoplight": { "id": "u5wjqpawbht5v" } } }, "additionalProperties": false }, "FileAttachment-Read": { "title": "FileAttachment-Read", "x-stoplight": { "id": "71buuls4yp0kr" }, "allOf": [ { "type": "object", "required": [ "category", "description", "file_attachable_id", "file_attachable_type", "file_url", "mime_type", "preview_url", "preview_mime_type", "uploaded_by", "file_name", "editable", "deletable" ], "properties": { "category": { "$ref": "#/components/schemas/FileAttachmentCategory" }, "description": { "type": "string", "x-stoplight": { "id": "tews9xplys3k7" }, "nullable": true }, "file_attachable_id": { "type": "string", "x-stoplight": { "id": "f5skb1dhphjd2" }, "format": "uuid" }, "file_attachable_type": { "$ref": "#/components/schemas/FileAttachableType" }, "file_url": { "type": "string", "x-stoplight": { "id": "sx7sp0pkep7jl" }, "format": "uri" }, "mime_type": { "type": "string", "x-stoplight": { "id": "vxj0ktghbiic6" } }, "preview_url": { "type": "string", "x-stoplight": { "id": "aa7aa0pkep7jl" }, "format": "uri", "description": "URL of the preview image. Clients should fall back to file_url if this is null.", "nullable": true }, "preview_mime_type": { "type": "string", "x-stoplight": { "id": "aaj0aaghbiic6" }, "description": "mime-type of the preview. clients should fall back to mime_type if this is null.", "nullable": true }, "uploaded_by": { "$ref": "#/components/schemas/Principal-Read-Nested" }, "file_name": { "type": "string", "x-stoplight": { "id": "p56co3cqi23xo" } }, "editable": { "type": "boolean", "x-stoplight": { "id": "sfbexk1hpc12a" } }, "deletable": { "type": "boolean", "x-stoplight": { "id": "e3gtfckh2zwk3" } } } }, { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" } ] }, "FileAttachment-Update": { "title": "FileAttachment-Update", "x-stoplight": { "id": "rmdydg9b6ebmh" }, "type": "object", "properties": { "category": { "$ref": "#/components/schemas/FileAttachmentCategory" }, "description": { "type": "string", "x-stoplight": { "id": "q4rqqwo2lrpkv" }, "nullable": true } }, "additionalProperties": false }, "FileAttachmentCategory": { "title": "FileAttachmentCategory", "x-stoplight": { "id": "baiohh0t8x4x2" }, "enum": [ "Inspection Report", "Site Map", "Scale Ticket (External)", "Scale Ticket (Internal)", "Timesheet", "Other" ], "default": "Other" }, "Foreman-Read": { "title": "Foreman-Read", "x-stoplight": { "id": "dlggce9n4miju" }, "allOf": [ { "$ref": "#/components/schemas/Foreman-Read-Nested" }, { "type": "object", "x-stoplight": { "id": "aur5ass0lfrk8" }, "required": [ "external_id", "time_zone", "managed", "labels" ], "properties": { "external_id": { "type": "string", "x-stoplight": { "id": "k0x1iqwweh62q" }, "nullable": true }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "managed": { "type": "boolean", "x-stoplight": { "id": "2badqtvuy3vby" } }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this foreman" } } } ] }, "Foreman-Read-Nested": { "title": "Foreman-Read-Nested", "x-stoplight": { "id": "f9iqzaesw4aij" }, "allOf": [ { "$ref": "#/components/schemas/Foreman-Read-Typeahead" }, { "type": "object", "x-stoplight": { "id": "m5idk3cd24zti" }, "required": [ "email", "company" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "ft77ezeftemb1" }, "nullable": true }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } }, { "$ref": "#/components/schemas/Discardable" } ] }, "Foreman-Read-Show": { "title": "Foreman-Read-Show", "x-stoplight": { "id": "jss11n7eh34lo" }, "allOf": [ { "$ref": "#/components/schemas/Foreman-Read" }, { "type": "object", "x-stoplight": { "id": "jyqx3u1iuq9x7" }, "properties": { "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Foreman-Nested" } } } ] }, "Foreman-Read-Typeahead": { "title": "Foreman-Read-Typeahead", "x-stoplight": { "id": "kdwiblw3n3qtm" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "mhsvzlxjbapan" }, "required": [ "first_name", "last_name", "phone" ], "properties": { "first_name": { "type": "string", "x-stoplight": { "id": "8fst58e2tam8v" }, "description": "First name" }, "last_name": { "type": "string", "x-stoplight": { "id": "av8z4dxam69hi" }, "description": "Last name" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, "phone": { "type": "string", "x-stoplight": { "id": "7b5vdi0y2qt5m" }, "description": "User's E.164 formatted phone number", "nullable": true } } } ] }, "FuelPrice-Create": { "title": "FuelPrice-Create", "x-stoplight": { "id": "pykob9emn260a" }, "type": "object", "required": [ "date", "price" ], "properties": { "date": { "type": "string", "x-stoplight": { "id": "05ak4lkj1wrau" }, "format": "date" }, "price": { "type": "number", "x-stoplight": { "id": "3y21sppsb67f8" } } }, "additionalProperties": false }, "FuelPrice-Read": { "title": "FuelPrice-Read", "x-stoplight": { "id": "ynx4ubsv2knje" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "o08ke84wb6bnm" }, "required": [ "date", "price" ], "properties": { "date": { "type": "string", "x-stoplight": { "id": "ytbhduf1axc2d" }, "format": "date" }, "price": { "type": "string", "x-stoplight": { "id": "zcrrius16gvav" } } } } ] }, "FuelPrice-Update": { "title": "FuelPrice-Update", "x-stoplight": { "id": "mpj5kio2ts4q7" }, "type": "object", "properties": { "date": { "type": "string", "x-stoplight": { "id": "rsjrltbk9exa0" } }, "price": { "type": "number", "x-stoplight": { "id": "ffu7ki07t1h08" } } }, "additionalProperties": false }, "FuelPriceIndex-Create": { "title": "FuelPriceIndex-Create", "x-stoplight": { "id": "bx2dcqc8pabka" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "0nbbobxnefm75" } } }, "additionalProperties": false }, "FuelPriceIndex-Read": { "title": "FuelPriceIndex-Read", "x-stoplight": { "id": "9q9bvvi0f977s" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "eyybrb6bmt2yt" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "5gbynft50wi90" } } } } ] }, "FuelPriceIndex-Read-Nested": { "title": "FuelPriceIndex-Read-Nested", "x-stoplight": { "id": "75z95xmkmafzu" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "gt6hyd6yv56qg" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "mnpmw9znthk98" } } } } ] }, "FuelPriceIndex-Read-Typeahead": { "title": "FuelPriceIndex-Typeahead", "x-stoplight": { "id": "uuokb9twnidv2" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "qybhimj3u03ty" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "kju9qtd39dsrv" } } } } ] }, "FuelPriceIndex-Update": { "title": "FuelPriceIndex-Update", "x-stoplight": { "id": "excovpp86o6k7" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "wpck2maua6k55" } } }, "additionalProperties": false }, "FuelSurchargeSchedule-Create": { "title": "FuelSurchargeSchedule-Create", "x-stoplight": { "id": "n6il53t5wo7wa" }, "type": "object", "required": [ "name", "fuel_price_index_id", "surcharge_type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "uhq664n2olcyv" } }, "fuel_price_index_id": { "type": "string", "x-stoplight": { "id": "30tssu05k3j1a" }, "format": "uuid" }, "surcharge_type": { "$ref": "#/components/schemas/FuelSurchargeScheduleType" } }, "additionalProperties": false }, "FuelSurchargeSchedule-Read": { "title": "FuelSurchargeSchedule-Read", "x-stoplight": { "id": "81byeas3bbklu" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "i66e7uew8m6pl" }, "required": [ "name", "fuel_price_index", "surcharge_type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "w2khek3m07je7" } }, "fuel_price_index": { "$ref": "#/components/schemas/FuelPriceIndex-Read-Nested" }, "surcharge_type": { "$ref": "#/components/schemas/FuelSurchargeScheduleType" } } } ] }, "FuelSurchargeSchedule-Read-Nested": { "title": "FuelSurchargeSchedule-Read-Nested", "x-stoplight": { "id": "cfxi1bfv03rdl" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "ug5goi9re1abe" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "2izdii9s4bcmr" } } } } ] }, "FuelSurchargeSchedule-Read-Typeahead": { "title": "FuelSurchargeSchedule-Read-Typeahead", "x-stoplight": { "id": "0he4xx9e2z3vn" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "w8t1qlz5d7k88" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "pk7vc6u73nl7o" } } } } ] }, "FuelSurchargeSchedule-Update": { "title": "FuelSurchargeSchedule-Update", "x-stoplight": { "id": "dzj3lw89pjrps" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "u31x6wwbsmznt" } }, "fuel_price_index_id": { "type": "string", "x-stoplight": { "id": "a74jl4gty4h62" }, "format": "uuid" }, "surcharge_type": { "$ref": "#/components/schemas/FuelSurchargeScheduleType" } }, "additionalProperties": false }, "FuelSurchargeSchedulePrice-Create": { "title": "FuelSurchargeSchedulePrice-Create", "x-stoplight": { "id": "gz18zuchccnol" }, "type": "object", "required": [ "price", "bill_surcharge" ], "properties": { "price": { "type": "number", "x-stoplight": { "id": "pgxnd135m0h24" } }, "bill_surcharge_percentage": { "type": "number", "x-stoplight": { "id": "wtzy52b9ukdnu" }, "deprecated": true }, "bill_surcharge": { "type": "number", "x-stoplight": { "id": "1ro4kf3cu0hxy" } } }, "additionalProperties": false }, "FuelSurchargeSchedulePrice-Read": { "title": "FuelSurchargeSchedulePrice-Read", "x-stoplight": { "id": "e403rrvyjweta" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "ds6t4d4fklbm8" }, "required": [ "price", "bill_surcharge" ], "properties": { "price": { "type": "string", "x-stoplight": { "id": "cy6fbk5hu1f2k" } }, "bill_surcharge_percentage": { "type": "string", "x-stoplight": { "id": "8pt0kypfoatvg" }, "deprecated": true }, "bill_surcharge": { "type": "string", "x-stoplight": { "id": "gaxj1uqzjh56w" } } } } ] }, "FuelSurchargeSchedulePrice-Update": { "title": "FuelSurchargeSchedulePrice-Update", "x-stoplight": { "id": "4y30ln4olyimq" }, "type": "object", "properties": { "price": { "type": "number", "x-stoplight": { "id": "0lb482me1iv8b" } }, "bill_surcharge_percentage": { "type": "number", "x-stoplight": { "id": "zb98i2h7vnw0d" }, "deprecated": true }, "bill_surcharge": { "type": "number", "x-stoplight": { "id": "0xz5e4s5kg2w9" } } }, "additionalProperties": false }, "FuelSurchargeScheduleType": { "title": "FuelSurchargeScheduleType", "x-stoplight": { "id": "w280lnuzi5auy" }, "enum": [ "percentage", "per_unit" ] }, "Geofence-Data": { "title": "Geofence-Data", "x-stoplight": { "id": "ay73k76oae8gm" }, "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "x-stoplight": { "id": "m9n8p7q6r5s4t" }, "description": "NextBillionGeofence ID" }, "geofence": { "type": "object", "x-stoplight": { "id": "bo67u046r1ibk" }, "required": [ "name", "type" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "nm2o97jli2zqm" }, "format": "uuid", "description": "NextBillion Geofence ID" }, "name": { "type": "string", "x-stoplight": { "id": "x5sp8wq8d2ack" } }, "type": { "type": "string", "x-stoplight": { "id": "d91rv1gbtfkm0" }, "description": "`circle` or `polygon`" }, "geojson": { "type": "object", "x-stoplight": { "id": "vk7dx7ipdbuxa" }, "required": [ "type", "coordinates" ], "properties": { "type": { "type": "string", "x-stoplight": { "id": "65qatpxdox3e9" }, "description": "type should be `Polygon`" }, "coordinates": { "type": "array", "x-stoplight": { "id": "3an8g587wblcs" }, "description": "This should be an enclosed polygon.\n\nExample format:\n[[[-118.226140484,34.048200454],[-118.22616052,34.046872766],[-118.226198738,34.04952736],[-118.226140484,34.048200454]]]", "items": { "x-stoplight": { "id": "2kltvjxl5xks6" }, "type": "array", "items": { "x-stoplight": { "id": "k93dt39dghru4" }, "type": "array", "items": {} } } } } }, "circle_center": { "type": "object", "x-stoplight": { "id": "6xr3h683f7cl9" }, "required": [ "lat", "lon" ], "properties": { "lat": { "type": "number", "x-stoplight": { "id": "y70xc1ptapv1g" } }, "lon": { "type": "number", "x-stoplight": { "id": "uy3twrpcueq9m" } } } }, "circle_radius": { "type": "number", "x-stoplight": { "id": "qrnq301sqfl3d" } }, "tag": { "x-stoplight": { "id": "debfy3x1l48zc" }, "enum": [ "pickup", "loading", "drop_off", "unloading", "check_in", "scaling", "ticketing" ], "deprecated": true } } }, "moving_geofence": { "type": "boolean", "x-stoplight": { "id": "y15533dbr62js" }, "default": false }, "tag": { "$ref": "#/components/schemas/GeofenceTag" }, "geofence_type": { "$ref": "#/components/schemas/NullableGeofenceType" } }, "additionalProperties": false }, "GeofenceTag": { "title": "GeofenceTag", "x-stoplight": { "id": "anytkmb3ydi6c" }, "enum": [ "scaling", "site", "loading", "unloading", "check_in", "ticketing" ] }, "GeofenceTrigger-CalculateForJob": { "title": "GeofenceTrigger-CalculateForJob", "x-stoplight": { "id": "k8m3n9p2q4r5s" }, "type": "object", "description": "When present, geofences override the job's default geofences (from its sites) for :naive and :accuracy_strict strategies.", "properties": { "strategy": { "type": "string", "x-stoplight": { "id": "t7u8v9w0x1y2z" }, "enum": [ "historical", "naive", "accuracy_strict" ], "default": "historical", "nullable": true }, "delay_seconds": { "type": "integer", "x-stoplight": { "id": "a3b4c5d6e7f8g" }, "description": "Only valid for :naive and :accuracy_strict strategies", "nullable": true }, "geofences": { "type": "array", "x-stoplight": { "id": "p4q5r6s7t8u9v" }, "description": "Inline geofence definitions to use instead of the job's default geofences. Only used for :naive and :accuracy_strict strategies.", "items": { "$ref": "#/components/schemas/NextBillionGeofence-Create" }, "nullable": true } }, "additionalProperties": false }, "GeofenceTrigger-Create": { "title": "GeofenceTrigger-Create", "x-stoplight": { "id": "eno1vsjpxuisc" }, "type": "object", "required": [ "start_at", "end_at", "geofences" ], "properties": { "start_at": { "type": "string", "x-stoplight": { "id": "3ydgzv1jer1xl" }, "format": "date-time" }, "end_at": { "type": "string", "x-stoplight": { "id": "a5l3vmiykl1wm" }, "format": "date-time" }, "geofences": { "type": "array", "x-stoplight": { "id": "nx7ajzteskf3d" }, "items": { "$ref": "#/components/schemas/NextBillionGeofence-Create" } } }, "additionalProperties": false }, "GeofenceTrigger-LocationHistory-Read-Nested": { "title": "GeofenceTrigger-LocationHistory-Read-Nested", "x-stoplight": { "id": "f5bejqkavpkj1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "lat", "lon", "occurred_at" ], "properties": { "driver": { "$ref": "#/components/schemas/Driver-Read-Minimal" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Minimal" }, "order": { "$ref": "#/components/schemas/Order-Read-Minimal" }, "job": { "$ref": "#/components/schemas/Job-Read-Minimal" }, "lat": { "type": "string", "x-stoplight": { "id": "e7el87y9ml6ae" } }, "lon": { "type": "string", "x-stoplight": { "id": "d2gnq6p76fkr6" } }, "occurred_at": { "type": "string", "x-stoplight": { "id": "oj1vsapa4j117" }, "format": "date-time" } } } ] }, "GeofenceTrigger-Read": { "title": "GeofenceTrigger-Read", "x-stoplight": { "id": "cyjkjb1roiwj8" }, "type": "object", "required": [ "geofence_trigger_type", "triggered_location", "geofence" ], "properties": { "geofence_trigger_type": { "$ref": "#/components/schemas/GeofenceTriggerType" }, "triggered_location": { "$ref": "#/components/schemas/GeofenceTrigger-LocationHistory-Read-Nested" }, "geofence": { "$ref": "#/components/schemas/Geofence-Data" } }, "additionalProperties": false }, "GeofenceTriggerType": { "title": "GeofenceTriggerType", "x-stoplight": { "id": "vmzafgjn6h2y7" }, "enum": [ "enter", "exit" ] }, "GeofenceType": { "title": "GeofenceType", "x-stoplight": { "id": "geahowr9r8ly1" }, "nullable": true, "enum": [ "moving", "circle", "polygon" ], "readOnly": true }, "GpsLocation-Create": { "title": "GpsLocation-Create", "x-stoplight": { "id": "uv0ey7n8bhvnb" }, "type": "object", "description": "This model represents a set of data describing a GPS location", "x-internal": true, "required": [ "occurred_at", "lat", "lon", "job_id" ], "properties": { "occurred_at": { "type": "string", "x-stoplight": { "id": "he217bu8y5t1s" }, "format": "date-time" }, "lat": { "type": "number", "x-stoplight": { "id": "n0y8xwpswjjem" }, "maximum": 90, "minimum": -90, "format": "float", "example": 43.6532, "description": "The current latitude as a decimal" }, "lon": { "type": "number", "x-stoplight": { "id": "v907j90jv2v9f" }, "description": "The current longitude as a decimal", "format": "float", "example": -79.3832, "minimum": -180, "maximum": 180 }, "job_id": { "type": "string", "x-stoplight": { "id": "paqxfgr8pbwd6" }, "example": "c07736a0-69e1-41a9-8d67-60d10be30deb", "description": "The UUID of the current Job", "nullable": true }, "accuracy": { "type": "number" }, "speed_meters_per_second": { "type": "number", "x-stoplight": { "id": "ubba2e0g033nk" } }, "bearing_degrees": { "type": "number", "x-stoplight": { "id": "conm2m09vtfas" } } }, "additionalProperties": false }, "GpsStatus": { "title": "GpsStatus", "x-stoplight": { "id": "3b02180lfd6ve" }, "description": "GPS Ping status for a record", "type": "object", "required": [ "status", "last_ping_at" ], "properties": { "status": { "x-stoplight": { "id": "7f6aqydupq3ac" }, "enum": [ "online", "offline", "idle", "no_signal" ] }, "last_ping_at": { "type": "string", "x-stoplight": { "id": "1ikh7blmxdqcz" }, "format": "date-time", "nullable": true } }, "additionalProperties": false }, "GpsStatusable": { "title": "GpsStatusable", "x-stoplight": { "id": "o6oprcupw6ep7" }, "type": "object", "required": [ "gps_status" ], "properties": { "gps_status": { "$ref": "#/components/schemas/GpsStatus" } }, "additionalProperties": false }, "GrossCapacity": { "title": "GrossCapacity", "x-stoplight": { "id": "shjax0sglmf7h" }, "type": "object", "x-internal": true, "required": [ "capacity", "unit_of_measure" ], "properties": { "capacity": { "type": "string", "x-stoplight": { "id": "danmldgefgpnd" } }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" } }, "additionalProperties": false }, "HealthCheck-Read": { "title": "HealthCheck-Read", "x-stoplight": { "id": "tqnnr1w49hyyk" }, "type": "object", "description": "Health check results", "x-internal": true, "required": [ "data_migrations", "db", "db_ro", "geo_db", "geo_db_ro", "migrations", "geo_migrations", "redis", "sidekiq_redis" ], "properties": { "data_migrations": { "type": "boolean", "x-stoplight": { "id": "z53o03znp1y5z" }, "description": "Have all data migrations run?" }, "db": { "type": "boolean", "x-stoplight": { "id": "qd6mepb0ex1q3" }, "description": "Can we connect to the primary writer database?" }, "db_ro": { "type": "boolean", "x-stoplight": { "id": "88i0z5lzwpw76" }, "description": "Can we connect to the primary reader database?" }, "geo_db": { "type": "boolean", "x-stoplight": { "id": "dq6mepb0ex1q3" }, "description": "Can we connect to the writer geo database?" }, "geo_db_ro": { "type": "boolean", "x-stoplight": { "id": "i0z5lzwpw7688" }, "description": "Can we connect to the reader geo database?" }, "migrations": { "type": "boolean", "x-stoplight": { "id": "8gnbpka1lbf9q" }, "description": "Have all primary db migrations run?" }, "geo_migrations": { "type": "boolean", "x-stoplight": { "id": "q9fbl1akpbng8" }, "description": "Have all geo db migrations run?" }, "redis": { "type": "boolean", "x-stoplight": { "id": "bcn7yaxqgzhcf" }, "description": "Can we connect to the Redis instance?" }, "sidekiq_redis": { "type": "boolean", "x-stoplight": { "id": "idx85wwz6ty6a" }, "description": "Can we connect to the Redis instance used by Sidekiq?" } }, "additionalProperties": false }, "IamPermission-Read-Nested": { "title": "IamPermission-Read-Nested", "x-stoplight": { "id": "mtvjsbhl2oce0" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "kawn9mxmqnqfa" } } }, "additionalProperties": false }, "IamRole-Read": { "title": "Iam-Role-Read", "x-stoplight": { "id": "lcehgsiah06ig" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "y88deabn57ybh" } }, "company_id": { "type": "string", "x-stoplight": { "id": "hu0c42oi6id9r" } }, "system": { "type": "boolean", "x-stoplight": { "id": "bekv2hlf6te85" }, "default": true }, "description": { "type": "string", "x-stoplight": { "id": "3m02z5qm8l54c" }, "nullable": true } }, "required": [ "name", "company_id", "system", "description" ] }, { "$ref": "#/components/schemas/Timestamps" }, { "$ref": "#/components/schemas/Printable" } ], "description": "Retrieve IamRoles" }, "IamRole-Read-Nested": { "title": "IamRole-Read-Nested", "x-stoplight": { "id": "g6dypn6gqemnu" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "s3z8bgs1s0rbd" } } }, "required": [ "name" ] } ] }, "Identifier": { "title": "Identifier", "x-stoplight": { "id": "gnd39lue5v7ol" }, "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "2e38hjk4zd58m" }, "format": "uuid" } }, "additionalProperties": false }, "Impersonation-Read-Minimal": { "title": "Impersonation-Read-Minimal", "x-stoplight": { "id": "1h5th7jnqtxix" }, "type": "object", "required": [ "impersonator", "impersonated" ], "properties": { "impersonator": { "$ref": "#/components/schemas/User-Read-Minimal" }, "impersonated": { "$ref": "#/components/schemas/User-Read-Minimal" } } }, "InaccessibleJobChannel-Read": { "title": "InaccessibleJobChannel-Read", "x-stoplight": { "id": "c8txme32ocsxb" }, "type": "object", "x-internal": true, "required": [ "data" ], "properties": { "data": { "type": "object", "x-stoplight": { "id": "4s1w1ivlk9r9w" }, "required": [ "job_id" ], "properties": { "job_id": { "type": "string", "x-stoplight": { "id": "uslx1tqmab0df" }, "format": "uuid" } } } }, "additionalProperties": false }, "Invoice-Job-Read-Nested": { "title": "Invoice-Job-Read-Nested", "x-stoplight": { "id": "rq1csqrap8fr" }, "allOf": [ { "$ref": "#/components/schemas/Job-Read-Nested" }, { "type": "object", "properties": { "driver": { "$ref": "#/components/schemas/User-Read-Minimal" }, "vendor_job_assignment": { "x-stoplight": { "id": "k8m3nv2qwp7x9" }, "$ref": "#/components/schemas/JobAssignment-Read-Nested" } } } ] }, "Invoice-Read": { "title": "Invoice-Read", "x-stoplight": { "id": "csikpud8r9hsg" }, "allOf": [ { "$ref": "#/components/schemas/Invoice-Read-Nested" }, { "type": "object", "x-stoplight": { "id": "cot4qnovnghxc" }, "required": [ "invoice_line_items_total_quantity", "pay_start_time", "pay_end_time", "truck_id", "invoiceable", "editable", "order_order_ids", "project_names", "equipment_type_names", "material_names", "pickup_site_names", "dropoff_site_names", "job_job_ids", "equipment_external_ids", "total_loads_count", "commission_rate_value", "commission_rate_type", "tickets_count", "material_rate_itemized", "material_rate_sell_price", "material_rate_unit_of_measure" ], "properties": { "order": { "$ref": "#/components/schemas/Order-Read-Nested" }, "project": { "$ref": "#/components/schemas/Project-Read-Nested" }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "pickup_site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "dropoff_site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "driver_rate": { "$ref": "#/components/schemas/Rate-Read-Nested" }, "job": { "$ref": "#/components/schemas/Invoice-Job-Read-Nested" }, "rate": { "$ref": "#/components/schemas/Rate-Read-Nested" }, "job_summary": { "$ref": "#/components/schemas/JobSummary-Read" }, "invoice_line_items_total_quantity": { "type": "string", "x-stoplight": { "id": "g5fe0i6f9ur72" } }, "pay_start_time": { "type": "string", "x-stoplight": { "id": "vnpssmfwm7rh5" }, "format": "date-time", "nullable": true }, "pay_end_time": { "type": "string", "x-stoplight": { "id": "gi5uwobsz1o7y" }, "format": "date-time", "nullable": true }, "truck_id": { "type": "string", "x-stoplight": { "id": "48ac1gan2y7n8" }, "nullable": true }, "settlement": { "$ref": "#/components/schemas/Settlement-Read-Nested" }, "invoiceable": { "$ref": "#/components/schemas/Invoiceable-Read-Nested" }, "editable": { "type": "boolean", "x-stoplight": { "id": "mehc4obpxldp7" } }, "order_order_ids": { "type": "array", "x-stoplight": { "id": "pvbs14dlr3ws8" }, "items": { "x-stoplight": { "id": "gt7x7a4hazy9q" }, "type": "string" } }, "project_names": { "type": "array", "x-stoplight": { "id": "6b5rk4pyujy21" }, "items": { "x-stoplight": { "id": "75li08zponwmm" }, "type": "string" } }, "equipment_type_names": { "type": "array", "x-stoplight": { "id": "tdp9w9lbqg47q" }, "items": { "x-stoplight": { "id": "6qdnb4pet2ani" }, "type": "string" } }, "material_names": { "type": "array", "x-stoplight": { "id": "wjuhyipewks34" }, "items": { "x-stoplight": { "id": "qyx2p9qdybpq0" }, "type": "string" } }, "pickup_site_names": { "type": "array", "x-stoplight": { "id": "kbw6vso7fuuwm" }, "items": { "x-stoplight": { "id": "5scggaotipnwn" }, "type": "string" } }, "dropoff_site_names": { "type": "array", "x-stoplight": { "id": "wda9siwr77apn" }, "items": { "x-stoplight": { "id": "5nodchowot7gd" }, "type": "string" } }, "job_job_ids": { "type": "array", "x-stoplight": { "id": "2eksxt6arwx4x" }, "items": { "x-stoplight": { "id": "2h7nsaw81ddqo" }, "type": "string" } }, "equipment_external_ids": { "type": "array", "x-stoplight": { "id": "acqpb2s7iru31" }, "items": { "x-stoplight": { "id": "pk334r9n4f64b" }, "type": "string" } }, "total_loads_count": { "type": "integer", "x-stoplight": { "id": "oq02fqplfgwoh" } }, "commission_rate_value": { "type": "string", "x-stoplight": { "id": "opds4p8lruga9" }, "description": "This is the applied value when the `rate_type` is commission-based.", "nullable": true }, "commission_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "tickets_count": { "type": "integer", "x-stoplight": { "id": "3wmhol6o88omq" } }, "material_rate_itemized": { "type": "boolean", "x-stoplight": { "id": "7z4y82mefvpn6" } }, "material_rate_sell_price": { "type": "string", "x-stoplight": { "id": "li8afdj885dik" }, "nullable": true }, "material_rate_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" } } }, { "$ref": "#/components/schemas/Timestamps" } ], "description": "Deprecation notes:\n- `job` is deprecated in favor of `invoiceable`.\n- `order` is deprecated in favor of `order_order_ids`\n- `project` is deprecated in favor of `project_names`\n- `equipment` is depreacted in favor of `equipment_type_names`\n- `material` is deprecated in favor of `material_names`\n- `pickup_site` is deprecated in favor of `pickup_site_names`\n- `dropoff_site` is deprecated in favor of `dropoff_site_names`\n- `truck_id` is deprecated in favor of `equipment_external_ids`\n" }, "Invoice-Read-Nested": { "title": "Invoice-Read-Nested", "x-stoplight": { "id": "0525dchkpowb4" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "rate_value", "rate_type", "total_amount", "add_on_charges_total_amount", "add_on_charges_count", "invoice_line_items_total_amount", "invoice_id", "state_events", "state", "approved", "approvable", "unapprovable", "billing_approved_at", "tax_pretax_amount", "tax_total_amount", "tax_rate", "tax_description" ], "properties": { "rate_value": { "type": "string", "x-stoplight": { "id": "0wfmhvpihc7j6" }, "nullable": true }, "rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "total_amount": { "type": "string", "x-stoplight": { "id": "23xlnfsn2ptyr" } }, "add_on_charges_total_amount": { "type": "string", "x-stoplight": { "id": "mkzwn7og9nbjz" } }, "add_on_charges_count": { "type": "integer", "x-stoplight": { "id": "avp0fywku8t5l" } }, "invoice_line_items_total_amount": { "type": "string", "x-stoplight": { "id": "j9ndl5bftvae6" } }, "invoice_id": { "type": "string", "x-stoplight": { "id": "dl998g3qajtn5" } }, "state_events": { "type": "array", "x-stoplight": { "id": "mgi3t11cazoxb" }, "items": { "$ref": "#/components/schemas/InvoiceStateEvent" } }, "state": { "$ref": "#/components/schemas/InvoiceState" }, "approved": { "type": "boolean", "x-stoplight": { "id": "l6wcqkh500hax" } }, "approvable": { "type": "boolean", "x-stoplight": { "id": "2amn5g39apfvm" } }, "unapprovable": { "type": "boolean", "x-stoplight": { "id": "e9udldzfmf7kg" } }, "billing_approved_at": { "type": "string", "x-stoplight": { "id": "bdvp0dbzp234t" }, "format": "date-time", "nullable": true }, "tax_pretax_amount": { "type": "string", "nullable": true, "description": "Pre-tax amount of the invoice" }, "tax_total_amount": { "type": "string", "nullable": true, "description": "Total tax amount applied to the invoice" }, "tax_rate": { "type": "string", "nullable": true, "description": "Tax rate percentage applied to the invoice" }, "tax_description": { "type": "string", "nullable": true, "description": "Description of what was taxed" } } } ] }, "Invoice-Update": { "title": "Invoice-Update", "x-stoplight": { "id": "iczefh3dwzi9z" }, "type": "object", "properties": { "rate_id": { "type": "string", "x-stoplight": { "id": "497k59qqxopps" }, "format": "uuid", "nullable": true }, "rate_value": { "type": "number", "x-stoplight": { "id": "t0k1lqv968zqx" }, "nullable": true }, "rate_type": { "$ref": "#/components/schemas/NullableRateType" } }, "additionalProperties": false }, "InvoiceCategoryFilter": { "title": "InvoiceCategoryFilter", "x-stoplight": { "id": "b7byt08bnzzv7" }, "enum": [ "payables", "receivables", "vendor_payables", "owner_operator_payables", "internal_payables", "connection_receivables", "account_receivables" ], "example": "payables" }, "InvoiceLineItem-Read": { "title": "InvoiceLineItem-Read", "x-stoplight": { "id": "lbb9n9hfx009r" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "quantity", "total_amount", "revenue_rate_value", "revenue_cost_rate_type", "billing_adjustment_minutes", "pay_start_time", "pay_end_time", "invoice_id", "name", "delivered_quantity", "line_item_type", "rate", "rate_type", "material_rate_unit_of_measure" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "vja2bsq172org" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "fwmhuuc6afo05" } }, "revenue_rate_value": { "type": "string", "x-stoplight": { "id": "w8kyneeororyn" }, "description": "The revenue rate or sell price of the invoice line item" }, "revenue_cost_rate_type": { "$ref": "#/components/schemas/AddOnRateType" }, "billing_adjustment_minutes": { "type": "integer", "x-stoplight": { "id": "7kzoo1b5fjcua" } }, "pay_start_time": { "type": "string", "x-stoplight": { "id": "5hk8kdv3tf7fu" }, "format": "date-time", "nullable": true }, "pay_end_time": { "type": "string", "x-stoplight": { "id": "frlpnr1dsx6xk" }, "format": "date-time", "nullable": true }, "invoice_id": { "type": "string", "x-stoplight": { "id": "cxgoc5hzxs0hm" }, "format": "uuid" }, "load": { "$ref": "#/components/schemas/Load-Read-Nested" }, "name": { "type": "string", "x-stoplight": { "id": "p4gxwco1xm5f4" }, "nullable": true }, "delivered_quantity": { "type": "string", "x-stoplight": { "id": "n36bkwjaot8f6" } }, "line_item_type": { "$ref": "#/components/schemas/InvoiceLineItemType" }, "rate": { "type": "string", "x-stoplight": { "id": "17aohzilbnz8d" }, "deprecated": true, "description": "Deprecated in favor of `revenue_rate_value`." }, "rate_type": { "type": "string", "x-stoplight": { "id": "h454x8xipq8gm" }, "deprecated": true, "description": "Deprecated in favor of `revenue_cost_rate_type`." }, "material_rate_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" } } } ] }, "InvoiceLineItem-Read-Generated": { "title": "InvoiceLineItem-Read-Generated", "x-stoplight": { "id": "oi6xodq6h2g0x" }, "type": "object", "x-internal": true, "required": [ "quantity", "delivered_quantity", "rate", "rate_type", "total_amount", "pay_start_time", "pay_end_time", "invoice_id", "name", "line_item_type" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "v1ewx0tm9mbq1" } }, "delivered_quantity": { "type": "string", "x-stoplight": { "id": "2l55holcsio85" } }, "rate": { "type": "string", "x-stoplight": { "id": "7x4itpvkhp1mj" } }, "rate_type": { "$ref": "#/components/schemas/RateType" }, "total_amount": { "type": "string", "x-stoplight": { "id": "dhenpl6eyi2h6" } }, "pay_start_time": { "type": "string", "x-stoplight": { "id": "3u2nmiaxy8nov" }, "format": "date-time", "nullable": true }, "pay_end_time": { "type": "string", "x-stoplight": { "id": "tf570leo8xrqi" }, "format": "date-time", "nullable": true }, "invoice_id": { "type": "string", "x-stoplight": { "id": "kfggtxandaa90" }, "format": "uuid" }, "name": { "type": "string", "x-stoplight": { "id": "rf66wutpde5q9" }, "nullable": true }, "load_id": { "type": "string", "x-stoplight": { "id": "9ity0xphx2q9o" }, "format": "uuid", "nullable": true }, "line_item_type": { "$ref": "#/components/schemas/InvoiceLineItemType" } }, "additionalProperties": false }, "InvoiceLineItem-Update": { "title": "InvoiceLineItem-Update", "x-stoplight": { "id": "bqeqs6grf9mkb" }, "allOf": [ { "$ref": "#/components/schemas/Destroyable" }, { "type": "object", "properties": { "quantity": { "type": "number", "x-stoplight": { "id": "7blob4b6rlg8z" } }, "rate": { "type": "number", "x-stoplight": { "id": "erb5hyci036n8" } }, "pay_start_time": { "type": "string", "x-stoplight": { "id": "kyf9icu2pmkx9" }, "format": "date-time", "nullable": true }, "pay_end_time": { "type": "string", "x-stoplight": { "id": "vsmc30j8j8t2n" }, "format": "date-time", "nullable": true }, "billing_adjustment_minutes": { "type": "integer", "x-stoplight": { "id": "o792d7cilq8g7" } }, "load_id": { "type": "string", "x-stoplight": { "id": "yc4s45yy1dpx0" }, "format": "uuid" } } } ] }, "InvoiceLineItemType": { "title": "InvoiceLineItemType", "x-stoplight": { "id": "clkyxnscmds4j" }, "enum": [ "InvoiceLineItem", "MaterialRateLineItem", "FreightRateLineItem" ], "default": "InvoiceLineItem" }, "InvoiceState": { "title": "InvoiceState", "x-stoplight": { "id": "w8dz9ur8termc" }, "enum": [ "created", "in_progress", "pending", "approved", "paid", "exported", "voided", "customer_pending", "customer_approved", "customer_paid" ], "example": "created", "default": "created" }, "InvoiceStateEvent": { "title": "InvoiceStateEvent", "x-stoplight": { "id": "1a2ulz2srbdfc" }, "enum": [ "approve", "customer_pay", "export", "pay", "send_invoice", "unapprove", "void" ] }, "Invoiceable-Read-Nested": { "title": "Invoiceable-Read-Nested", "x-stoplight": { "id": "24cpelap9yh3h" }, "anyOf": [ { "$ref": "#/components/schemas/Invoice-Job-Read-Nested" }, { "$ref": "#/components/schemas/DriverDay-Read-Nested" } ] }, "InvoiceableType": { "title": "InvoiceableType", "x-stoplight": { "id": "82wolambj0as2" }, "enum": [ "Job", "DriverDay" ], "example": "Job" }, "Job-AssignAdditionalEquipment": { "title": "Job-AssignAdditionalEquipment", "x-stoplight": { "id": "11lrma4qj612o" }, "type": "object", "properties": { "additional_equipment_ids": { "type": "array", "minItems": 0, "items": { "type": "string", "format": "uuid" } } }, "x-internal": true, "additionalProperties": false }, "Job-AssignEquipment": { "title": "Job-AssignEquipment", "x-stoplight": { "id": "o0x2g7zv9i16o" }, "type": "object", "properties": { "equipment_id": { "type": "string", "nullable": true } }, "x-internal": true, "additionalProperties": false }, "Job-Bulk-Update": { "title": "Job-Bulk-Update", "x-stoplight": { "id": "nnjtokwcme5ku" }, "type": "object", "required": [ "job_ids", "data" ], "properties": { "job_ids": { "type": "array", "x-stoplight": { "id": "4vrf1qqhp1fkd" }, "items": { "x-stoplight": { "id": "69olomv22fnru" }, "type": "string", "format": "uuid" } }, "data": { "type": "object", "x-stoplight": { "id": "oijj2htdfmr0w" }, "properties": { "notes": { "type": "string", "x-stoplight": { "id": "8fdbywjj9rpp5" }, "nullable": true }, "job_start_at": { "type": "string", "x-stoplight": { "id": "s9dpcap2nsdyf" }, "format": "date-time" }, "requested_loads_count": { "type": "integer", "x-stoplight": { "id": "pst2nkbxfncnj" }, "minimum": 1, "maximum": 25, "deprecated": true, "description": "Deprecated in favor of `quantity` and `unit_of_measure`. When `unit_of_measure` is `Load`, then `quantity` is the number of loads, otherwise it is `1`." }, "requested_equipment_type_name": { "type": "string", "x-stoplight": { "id": "avf2t453nzc7s" }, "nullable": true }, "load": { "$ref": "#/components/schemas/Load-Bulk-Update" }, "material_id": { "type": "string", "x-stoplight": { "id": "4z4q6if3fyfr7" }, "format": "uuid", "nullable": true }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "dy88of9umhk3n" }, "nullable": true }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "fel777aickanf" }, "items": { "x-stoplight": { "id": "w060vr7l2q1cc" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "ael777aickanf" }, "items": { "x-stoplight": { "id": "a060vr7l2q1cc" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "ael666aickanf" }, "items": { "x-stoplight": { "id": "b070vr7l2q1cc" }, "type": "string", "format": "uuid" } }, "waypoints": { "type": "array", "x-stoplight": { "id": "l64t37zmobu4z" }, "items": { "$ref": "#/components/schemas/Waypoint-Create" } }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "kddo8lphev52v" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "y9w37xiec2fkg" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "cagd8b56p9hyd" } }, "quantity": { "type": "number", "x-stoplight": { "id": "qqk7byc0rknf2" }, "nullable": true } } } }, "additionalProperties": false }, "Job-Invoicing-Read": { "title": "Job-Invoicing-Read", "x-stoplight": { "id": "jbtfc4vqzrx3g" }, "allOf": [ { "$ref": "#/components/schemas/Job-Read" }, { "type": "object", "x-stoplight": { "id": "dlqnacd7504t5" }, "properties": { "receivable_invoice": { "$ref": "#/components/schemas/Invoice-Read-Nested" }, "payable_invoice": { "$ref": "#/components/schemas/Invoice-Read-Nested" } } } ] }, "Job-Load-Approval-Read": { "title": "Job-Load-Approval-Read", "x-stoplight": { "id": "933cfrf450fz5" }, "description": "This model will be used by mobile client for approvals screen for loads approval, job section", "allOf": [ { "type": "object", "required": [ "job_id", "loads_count" ], "properties": { "job_id": { "type": "string", "x-stoplight": { "id": "4hijfdkssv4pc" } }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "loads_count": { "type": "integer", "x-stoplight": { "id": "fqoq78a7essyu" } } } }, { "$ref": "#/components/schemas/Identifier" } ] }, "Job-LocationHistory-Read": { "title": "Job-LocationHistory-Read", "x-stoplight": { "id": "yqm5zp7g5j36l" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "lat", "load_id", "load_state", "lon", "occurred_at", "offline_mode", "speed_meters_per_second" ], "properties": { "lat": { "type": "string", "x-stoplight": { "id": "ups5us4k346z3" } }, "load_id": { "type": "string", "x-stoplight": { "id": "jwz9jl4ehz2e5" }, "format": "uuid", "nullable": true }, "load_state": { "$ref": "#/components/schemas/NullableLoadState" }, "lon": { "type": "string", "x-stoplight": { "id": "w3p41tcwovbyw" } }, "occurred_at": { "type": "string", "x-stoplight": { "id": "cn9p4shg2sly2" }, "format": "date-time" }, "offline_mode": { "type": "boolean", "x-stoplight": { "id": "k8m2nwp5xq7r1" }, "description": "Whether this location was recorded while the device was in offline mode" }, "speed_meters_per_second": { "type": "string", "x-stoplight": { "id": "wgxe890y6vltv" }, "nullable": true } } } ] }, "Job-Read": { "title": "Job-Read", "x-stoplight": { "id": "fk1whoyjcw1dx" }, "allOf": [ { "$ref": "#/components/schemas/Job-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "p33029njhin7c" }, "required": [ "notes", "quantity", "load_unit_of_measure", "order", "service", "waypoints", "company", "priority", "state", "billable_hours", "billable_hours_overridden", "additional_equipment", "editable", "copyable", "state_changed_at", "load_cycle_avg", "state_events", "foremen", "collaborators", "salespeople", "paused_at", "completed_loads_count", "requested_equipment_type_name", "requested_equipment_type_accounting_id", "requested_loads_count", "equipment_type_gross_capacity", "deletable", "recurring_loads", "equipment_type_gross_capacity_unit_of_measure", "tickets_count", "job_time", "approved_at", "driver_require_all_permissions", "times_editable" ], "properties": { "notes": { "type": "string", "x-stoplight": { "id": "phsxh65xug2th" }, "nullable": true }, "quantity": { "type": "string", "x-stoplight": { "id": "l8tsq23xqo4jj" }, "nullable": true }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "order": { "$ref": "#/components/schemas/Order-Read-Nested" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "service": { "$ref": "#/components/schemas/Service-Read-Nested" }, "waypoints": { "type": "array", "x-stoplight": { "id": "2ifgrsz42xjil" }, "items": { "$ref": "#/components/schemas/Waypoint-Read-Nested" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "sales_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "priority": { "type": "integer", "x-stoplight": { "id": "bns47vwaiwvuc" }, "minimum": 0 }, "project": { "$ref": "#/components/schemas/Project-Read-Nested" }, "state": { "$ref": "#/components/schemas/JobState" }, "billable_hours": { "type": "string", "x-stoplight": { "id": "sslxwnjds71t1" } }, "billable_hours_overridden": { "type": "boolean", "x-stoplight": { "id": "40omp8yjtdkjc" } }, "additional_equipment": { "type": "array", "x-stoplight": { "id": "171atci0dqxnb" }, "minItems": 0, "items": { "$ref": "#/components/schemas/Equipment-Read-Nested" } }, "editable": { "type": "boolean", "x-stoplight": { "id": "mnr866etesd5v" }, "readOnly": true }, "copyable": { "type": "boolean", "x-stoplight": { "id": "mbb866etesd2v" }, "readOnly": true }, "state_changed_at": { "type": "string", "x-stoplight": { "id": "65al2lnrd07iw" }, "format": "date-time", "nullable": true }, "load_cycle_avg": { "type": "integer", "x-stoplight": { "id": "k667w729b2c88" }, "description": "Average `LoadCycle` time in minutes of all `Loads` under this `Job`" }, "state_events": { "type": "array", "x-stoplight": { "id": "mhf5t00cazoxb" }, "items": { "$ref": "#/components/schemas/JobStateEvent" } }, "vendor_job_assignment": { "$ref": "#/components/schemas/JobAssignment-Read-Nested" }, "customer_job_assignment": { "$ref": "#/components/schemas/JobAssignment-Read-Nested" }, "foremen": { "type": "array", "x-stoplight": { "id": "pfd34vhu4veq9" }, "items": { "$ref": "#/components/schemas/Foreman-Read-Nested" } }, "collaborators": { "type": "array", "x-stoplight": { "id": "afd34vhu4veq9" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "salespeople": { "type": "array", "x-stoplight": { "id": "bfd34vhu4veq9" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "service_class": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" }, "hauler_rate_type": { "type": "string", "nullable": true }, "driver_rate": { "x-stoplight": { "id": "2oyybnpp809cm" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "paused_at": { "type": "string", "x-stoplight": { "id": "5nom5q6l1h1ex" }, "nullable": true }, "driver_rate_value": { "type": "string", "x-stoplight": { "id": "7py18hlqsxb0r" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "completed_loads_count": { "type": "integer", "x-stoplight": { "id": "y624d4j6uk6y0" } }, "phase": { "$ref": "#/components/schemas/Phase-Read" }, "requested_equipment_type_name": { "type": "string", "x-stoplight": { "id": "a9ptxp6x3enwn" }, "nullable": true }, "requested_equipment_type_accounting_id": { "type": "string", "x-stoplight": { "id": "a9qtxp7x3fnwn" }, "nullable": true }, "requested_loads_count": { "type": "integer", "x-stoplight": { "id": "cagzjsbid0xh9" }, "nullable": true }, "equipment_type_gross_capacity": { "type": "string", "x-stoplight": { "id": "tzo8dx447mzlr" }, "nullable": true }, "deletable": { "type": "boolean", "x-stoplight": { "id": "bnyc7ov7acgp1" } }, "job_summary": { "$ref": "#/components/schemas/JobSummary-Read" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "00aap8yjtdkzz" } }, "approval_status": { "$ref": "#/components/schemas/Approval-Status" }, "driver_commission_rate_value": { "type": "string", "x-stoplight": { "id": "dffb7rsfmox6m" }, "description": "This is the applied value when the `driver_rate_type` is commission-based.", "nullable": true }, "driver_commission_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "tickets_count": { "type": "integer", "x-stoplight": { "id": "d5zxeggcmo29t" } }, "job_time": { "type": "integer", "x-stoplight": { "id": "rc788udtsd9v5" }, "nullable": true }, "approved_at": { "type": "string", "x-stoplight": { "id": "66al3lnsd07iw" }, "format": "date-time", "nullable": true }, "driver_require_all_permissions": { "type": "boolean", "x-stoplight": { "id": "smprzf8aeome7" }, "description": "The `Job`'s `Company`'s feature flag setting for `driver_require_all_permissions` at creation time. Defaults to `false`." }, "times_editable": { "type": "boolean", "description": "The `Job`'s `Company`'s feature flag setting for `edit_job_times` at creation time. Defaults to `false`." } } }, { "type": "object", "$ref": "#/components/schemas/RoleApprovable" }, { "$ref": "#/components/schemas/MaterialRateAssignmentable" }, { "$ref": "#/components/schemas/GpsStatusable" } ] }, "Job-Read-Minimal": { "title": "Job-Read-Minimal", "x-stoplight": { "id": "phqsqzej6mcm3" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "ic6xdggfjavde" }, "required": [ "job_id" ], "properties": { "job_id": { "type": "string", "x-stoplight": { "id": "pcseir7z97s0x" } } } } ] }, "Job-Read-Nested": { "title": "Job-Read-Nested", "x-stoplight": { "id": "qxb3a764a1hxf" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "job_id", "loads_count", "job_start_at", "unit_of_measure" ], "properties": { "job_id": { "type": "string", "x-stoplight": { "id": "692lxpafrrxpl" } }, "loads_count": { "type": "integer", "x-stoplight": { "id": "1fh2mqq1z7l8k" }, "description": "Count of `Loads` under this `Job`" }, "job_start_at": { "type": "string", "x-stoplight": { "id": "w4o47yoyesm9u" }, "format": "date-time" }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" } } } ] }, "Job-Read-Typeahead": { "title": "Job-Read-Typeahead", "x-stoplight": { "id": "mpjpwtpyc0pi1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "job_id": { "type": "string", "description": "Account name", "x-stoplight": { "id": "bl32v5q2dd1c9" } } }, "required": [ "job_id" ] } ] }, "Job-Update": { "title": "Job-Update", "x-stoplight": { "id": "7pgu7obbcmmal" }, "type": "object", "properties": { "job_start_at": { "type": "string", "x-stoplight": { "id": "9honxf37kab3m" }, "format": "date-time" }, "notes": { "type": "string", "x-stoplight": { "id": "j1g08m0l4svr8" }, "nullable": true }, "quantity": { "type": "number", "x-stoplight": { "id": "cy88a4semz4yb" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_id": { "x-stoplight": { "id": "p86w6pq4wlsk1" }, "type": "string", "nullable": true }, "material_id": { "x-stoplight": { "id": "rr4ncjvlovjw5" }, "type": "string", "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "0bv1s5bvwicc0" }, "items": { "$ref": "#/components/schemas/Waypoint-Update-Destroyable" } }, "sales_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "driver_id": { "type": "string", "x-stoplight": { "id": "jadmvq8ammhyp" }, "nullable": true }, "priority": { "type": "integer", "x-stoplight": { "id": "6btti38mbfay9" } }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "9hnt0jgdevrhw" }, "format": "uuid", "nullable": true }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "l0lsr0r06gx5n" }, "format": "uuid", "nullable": true }, "billable_hours": { "type": "number", "x-stoplight": { "id": "hbf3w63lzkwpg" } }, "additional_equipment_ids": { "type": "array", "x-stoplight": { "id": "q9mdqgfv3ym3h" }, "minItems": 0, "items": { "x-stoplight": { "id": "3oauddfa0i0k0" }, "type": "string", "format": "uuid" } }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "38gzkcegzs98b" }, "minItems": 0, "items": { "x-stoplight": { "id": "12fh56ct6i3do" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "a8gzkcegzs98b" }, "minItems": 0, "items": { "x-stoplight": { "id": "a2fh56ct6i3do" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "b8gzkcegzs99c" }, "minItems": 0, "items": { "x-stoplight": { "id": "b2fh56ct6i3eo" }, "type": "string", "format": "uuid" } }, "service_class_id": { "type": "string", "x-stoplight": { "id": "tuqzg44a7iyrz" }, "format": "uuid", "nullable": true }, "hauler_rate_type": { "type": "string", "nullable": true }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "yk8b39a12fuj4" }, "nullable": true }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "xx22exf2mwn29" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "lmxbocvhb2yja" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "ognfpa181evso" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "phase_id": { "type": "string", "x-stoplight": { "id": "rd18vcmzyug4p" }, "nullable": true }, "requested_loads_count": { "type": "integer", "x-stoplight": { "id": "6gi27c5w5c2s3" }, "minimum": 1, "maximum": 25, "deprecated": true, "description": "Deprecated in favor of `quantity` and `unit_of_measure`. When `unit_of_measure` is `Load`, then `quantity` is the number of loads, otherwise it is `1`." }, "requested_equipment_type_name": { "type": "string", "x-stoplight": { "id": "ef4wd2le70qgw" }, "nullable": true }, "requested_equipment_type_accounting_id": { "type": "string", "x-stoplight": { "id": "ef4wd2le80qgw" }, "nullable": true }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "tsyyom1lf1u19" }, "nullable": true }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "33aap8yjtdkww" } }, "material_rate_assignment": { "$ref": "#/components/schemas/MaterialRateAssignment-Update" }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "job_time": { "type": "integer", "x-stoplight": { "id": "dtsd9v5rc788u" }, "nullable": true }, "compliance_override": { "type": "boolean", "x-stoplight": { "id": "c9m2p4xk7rj1a" }, "description": "When true, logs a compliance override for the job assignment" } }, "additionalProperties": false }, "JobAssignment-Create": { "title": "JobAssignment-Create", "x-stoplight": { "id": "dzrdddmk5aqtn" }, "type": "object", "required": [ "vendor_account_id" ], "properties": { "vendor_account_id": { "type": "string", "x-stoplight": { "id": "5vc34ur5xwjq1" }, "format": "uuid" }, "rate_id": { "type": "string", "x-stoplight": { "id": "8bwdtciczb3wg" }, "format": "uuid", "nullable": true }, "rate_value": { "type": "number", "x-stoplight": { "id": "4pfejb42j9yaa" }, "nullable": true }, "rate_type": { "$ref": "#/components/schemas/NullableRateType" } }, "additionalProperties": false }, "JobAssignment-LatestLocation-Read-Nested": { "title": "JobAssignment-LatestLocation-Read-Nested", "x-stoplight": { "id": "j6i2gjnatp1s4" }, "type": "object", "properties": { "customer_account": { "$ref": "#/components/schemas/Account-LatestLocation-Read-Nested" }, "vendor_account": { "$ref": "#/components/schemas/Account-LatestLocation-Read-Nested" } }, "additionalProperties": false }, "JobAssignment-Read": { "title": "JobAssignment-Read", "x-stoplight": { "id": "4jmwvyq0awdou" }, "allOf": [ { "$ref": "#/components/schemas/JobAssignment-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "0j1wd0lei72vn" }, "required": [ "job" ], "properties": { "job": { "type": "object", "x-stoplight": { "id": "ftfboc8jt86y2" }, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "gocyr7pas4uan" }, "format": "uuid" } } } } } ] }, "JobAssignment-Read-Nested": { "title": "JobAssignment-Read-Nested", "x-stoplight": { "id": "mg7965bt1bm8u" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "7cm7nl6s8xho7" }, "required": [ "rate_value", "rate_type", "commission_rate_value", "commission_rate_type" ], "properties": { "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "rate": { "x-stoplight": { "id": "dbq76i8yjcmwt" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "rate_value": { "type": "string", "x-stoplight": { "id": "1vstlgt31c0wg" }, "nullable": true }, "rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "commission_rate_value": { "type": "string", "x-stoplight": { "id": "kl1p5p4ii7nyy" }, "description": "This is the applied value when the `rate_type` is commission-based.", "nullable": true }, "commission_rate_type": { "$ref": "#/components/schemas/NullableRateType" } } } ] }, "JobAssignment-Update": { "title": "JobAssignment-Update", "x-stoplight": { "id": "7epsskvpe1c5a" }, "type": "object", "properties": { "rate_id": { "type": "string", "x-stoplight": { "id": "tngvpkqg1qyi1" }, "format": "uuid", "nullable": true }, "rate_value": { "type": "number", "x-stoplight": { "id": "8v68k20du0k1b" }, "nullable": true }, "rate_type": { "$ref": "#/components/schemas/NullableRateType" } }, "additionalProperties": false }, "JobEvent-Read": { "title": "JobEvent-Read", "x-stoplight": { "id": "h80os065siwam" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "dn8tvq80epohu" }, "required": [ "lat", "lon", "state", "created_at", "occurred_at", "event_name", "load_id", "event_source" ], "properties": { "lat": { "type": "string", "x-stoplight": { "id": "ytqw1vq0z0ky8" }, "nullable": true }, "lon": { "type": "string", "x-stoplight": { "id": "ihaf2njqbh2z4" }, "nullable": true }, "state": { "$ref": "#/components/schemas/JobState" }, "created_at": { "type": "string", "x-stoplight": { "id": "cks4qm6pi3n9j" }, "format": "date-time" }, "occurred_at": { "type": "string", "x-stoplight": { "id": "t4ydbv175lyny" }, "format": "date-time" }, "event_name": { "$ref": "#/components/schemas/JobEventName" }, "load_id": { "type": "string", "x-stoplight": { "id": "2swvreb0o0ub2" }, "format": "uuid", "nullable": true, "readOnly": true }, "created_by": { "$ref": "#/components/schemas/Principal-Read-Nested" }, "event_source": { "$ref": "#/components/schemas/JobEventSource" }, "payload": { "type": "object", "x-stoplight": { "id": "pstpn7wwugjo3" }, "properties": { "reject_reason": { "type": "string", "x-stoplight": { "id": "p7ap3rqw5ojgh" }, "nullable": true }, "driver_id": { "type": "string", "x-stoplight": { "id": "8u5ztjl34tl22" }, "format": "uuid", "nullable": true }, "vendor_id": { "type": "string", "x-stoplight": { "id": "0o0neuk9gckbl" }, "format": "uuid", "nullable": true }, "label": { "type": "string", "x-stoplight": { "id": "fmd6emklcgsr6" }, "nullable": true, "description": "The label of the attribute that was changed.\n\nFor `JobAttributeChanged` events, this value will be translated per the `Accept-Language` header." }, "from_value": { "type": "string", "x-stoplight": { "id": "fmd8emklcgsr8" }, "nullable": true }, "to_value": { "type": "string", "x-stoplight": { "id": "fmd7emklcgsr7" }, "nullable": true }, "value": { "type": "string", "x-stoplight": { "id": "fmd6emklcgsr2" }, "nullable": true }, "warnings": { "type": "array", "x-stoplight": { "id": "k8rn2vwpq1m4a" }, "nullable": true, "description": "Compliance warnings that were overridden. Present on `ComplianceOverride` events.", "items": { "type": "object", "x-stoplight": { "id": "j7qm3uxtl2n5b" }, "properties": { "type": { "type": "string", "x-stoplight": { "id": "h6pl2twsk3o6c" } }, "document_type": { "type": "string", "x-stoplight": { "id": "g5ok1svri4p7d" } }, "document_type_id": { "type": "string", "x-stoplight": { "id": "f4nj0ruqh5q8e" }, "format": "uuid" }, "expires_at": { "type": "string", "x-stoplight": { "id": "e3mi9qtpg6r9f" }, "format": "date-time", "nullable": true }, "entity": { "type": "string", "x-stoplight": { "id": "d2lh8psof7s0g" } } } } }, "blocking": { "type": "array", "x-stoplight": { "id": "c1kg7ornea1h" }, "nullable": true, "description": "Compliance blocking issues that were overridden. Present on `ComplianceOverride` events.", "items": { "type": "object", "x-stoplight": { "id": "b0jf6nqmdt2i" }, "properties": { "type": { "type": "string", "x-stoplight": { "id": "a9ie5mplcs3j" } }, "document_type": { "type": "string", "x-stoplight": { "id": "z8hd4lokbr4k" } }, "document_type_id": { "type": "string", "x-stoplight": { "id": "y7gc3knjaq5l" }, "format": "uuid" }, "expires_at": { "type": "string", "x-stoplight": { "id": "x6fb2jmizp6m" }, "format": "date-time", "nullable": true }, "entity": { "type": "string", "x-stoplight": { "id": "w5ea1ilhyo7n" } } } } }, "overridden_by": { "type": "string", "x-stoplight": { "id": "v4d90hkgxn8o" }, "format": "uuid", "nullable": true, "description": "The user ID of the person who overrode the compliance check. Present on `ComplianceOverride` events." }, "overridden_at": { "type": "string", "x-stoplight": { "id": "u3c89gjfwm9p" }, "format": "date-time", "nullable": true, "description": "When the compliance override occurred. Present on `ComplianceOverride` events." } } } } } ] }, "JobEvent-Update": { "title": "JobEvent-Update", "x-stoplight": { "id": "ke65ywc6dsm33" }, "type": "object", "properties": { "id": { "type": "string", "x-stoplight": { "id": "uh701d353resy" }, "format": "uuid" }, "occurred_at": { "type": "string", "x-stoplight": { "id": "p7n6xose0lymd" }, "format": "date-time" } }, "additionalProperties": false }, "JobEventName": { "title": "JobEventName", "x-stoplight": { "id": "dyiohh0t8x7l8" }, "enum": [ "JobCreated", "JobUpdated", "JobAssigned", "JobUnassigned", "JobSent", "JobAccepted", "JobDeclined", "WaypointPending", "WaypointArrived", "WaypointAction", "JobCanceled", "JobCompleted", "JobEnded", "JobInReview", "JobFlagged", "JobSignedOff", "JobPaid", "JobRemovedSignedOff", "JobRemovedFlagged", "JobPaused", "JobResumed", "LoadCompleted", "LoadCanceled", "LoadUpdated", "GeofenceEntered", "GeofenceExited", "OrderCompleted", "OrderCanceled", "ShiftEnded", "NotificationSent", "ToPickup", "ToDropoff", "AtPickup", "AtDropoff", "Loaded", "Unloaded", "JobRequested", "JobLoading", "JobUnloading", "JobDriverChanged", "JobEquipmentChanged", "JobMaterialChanged", "JobAttributeChanged", "TicketChaseInitiated", "TicketsUploadedByAgent", "ComplianceOverride", "LoadAiReviewed" ] }, "JobEventSource": { "title": "JobEventSource", "x-stoplight": { "id": "97nr8yoreazxi" }, "enum": [ "web", "webhook", "automation", "ticket_match", "geofence" ], "description": "Job Event Source Type" }, "JobInvoicingUpdateChannel-Read": { "title": "JobInvoicingUpdateChannel-Read", "x-stoplight": { "id": "ptbwpyecgx7bt" }, "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/Job-Invoicing-Read" } }, "additionalProperties": false }, "JobLoadActivity-Broadcast": { "title": "JobLoadActivity-Broadcast", "x-stoplight": { "id": "h9tm2sb0on96c" }, "type": "object", "required": [ "data", "action" ], "properties": { "data": { "x-stoplight": { "id": "14axvnvq95qjy" }, "anyOf": [ { "$ref": "#/components/schemas/Load-Read" }, { "x-stoplight": { "id": "ml1zer2rf8y04" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] } ] }, "action": { "x-stoplight": { "id": "5le45804jbh3l" }, "enum": [ "create", "update", "delete" ] } }, "additionalProperties": false }, "JobState": { "title": "JobState", "x-stoplight": { "id": "qyb8p2t7h0pnn" }, "enum": [ "created", "assigned", "accepted", "rejected", "to_pickup", "arrived_pickup", "loaded", "to_dropoff", "arrived_dropoff", "unloaded", "completed", "canceled", "ended", "sent", "in_review", "flagged", "signed_off", "paid", "load_completed" ], "example": "created", "default": "created", "readOnly": true }, "JobStateEvent": { "title": "JobStateEvent", "x-stoplight": { "id": "1a3ulz2srbdfc" }, "enum": [ "accept", "arrive", "assign", "cancel", "complete", "complete_load", "end", "enroute", "flag", "load_material", "pay", "reject", "remove_flag", "remove_signoff", "request", "review", "sign_off", "unassign", "unload_material" ] }, "JobSummary-Read": { "title": "JobSummary-Read", "x-stoplight": { "id": "ejiwcf15ja1c8" }, "type": "object", "required": [ "has_gps_data", "logging_started_at", "logging_ended_at", "completed_loads_count", "break_time_minutes", "work_time_minutes", "approved_work_time_minutes", "first_geofence_entry_at", "last_geofence_exit_at", "job_phase_name", "job_phase_code", "foreman_external_id", "delivered_quantities", "adjusted_logging_started_at", "adjusted_logging_ended_at", "editable", "loads_with_tickets_count", "pre_clamp_logging_ended_at", "travelled_distance_meters", "first_sent_at", "sent_to_driver_at", "driver_accepted_at", "driver_declined_at", "first_accepted_at", "first_declined_at", "first_canceled_at", "pickup_geofence_entry_count", "dropoff_geofence_entry_count" ], "properties": { "has_gps_data": { "type": "boolean", "x-stoplight": { "id": "dgva6rsrz0vu1" } }, "logging_started_at": { "type": "string", "x-stoplight": { "id": "tc4hi8okbshj9" }, "format": "date-time", "nullable": true }, "logging_ended_at": { "type": "string", "x-stoplight": { "id": "4zir4ztfsw4dn" }, "format": "date-time", "nullable": true, "description": "The effective end time for logging. If clamping occurred (time between last activity and job end exceeded 120 minutes), this will be the clamped time (last activity time). The original value will be in pre_clamp_logging_ended_at." }, "completed_loads_count": { "type": "integer", "x-stoplight": { "id": "rg25kq0t5f0r1" }, "minimum": 0 }, "break_time_minutes": { "type": "integer", "x-stoplight": { "id": "f4qypqki2mjhq" }, "exclusiveMinimum": false, "minimum": 0 }, "work_time_minutes": { "type": "integer", "x-stoplight": { "id": "88ilx1un65s44" }, "minimum": 0 }, "approved_work_time_minutes": { "type": "integer", "x-stoplight": { "id": "6tshrxgraj12f" }, "nullable": true }, "first_geofence_entry_at": { "type": "string", "x-stoplight": { "id": "14ppafk4hkc9q" }, "format": "date-time", "nullable": true }, "last_geofence_exit_at": { "type": "string", "x-stoplight": { "id": "uti6t2fcazedd" }, "format": "date-time", "nullable": true }, "job_phase_name": { "type": "string", "x-stoplight": { "id": "ka1g1qprw136q" }, "nullable": true }, "job_phase_code": { "type": "string", "x-stoplight": { "id": "4mc97lx598wxk" }, "nullable": true }, "foreman_external_id": { "type": "string", "x-stoplight": { "id": "z31ikmks6ps4s" }, "nullable": true }, "delivered_quantities": { "type": "array", "x-stoplight": { "id": "gnvbyj46n5rkw" }, "items": { "$ref": "#/components/schemas/DeliveredQuantity-Read" } }, "adjusted_logging_started_at": { "type": "string", "x-stoplight": { "id": "bbcfmvpk7hci8" }, "format": "date-time", "nullable": true }, "adjusted_logging_ended_at": { "type": "string", "x-stoplight": { "id": "bag4ffzlbputs" }, "format": "date-time", "nullable": true }, "editable": { "type": "boolean", "x-stoplight": { "id": "stupblzff4gab" }, "readOnly": true }, "loads_with_tickets_count": { "type": "integer", "x-stoplight": { "id": "d1chn0k33894t" } }, "pre_clamp_logging_ended_at": { "type": "string", "x-stoplight": { "id": "aq9ycutx6v5hn" }, "format": "date-time", "nullable": true, "description": "Original logging_ended_at value before clamping was applied. Only set when clamping occurred (i.e., when the time between last activity and job end exceeded 120 minutes)." }, "travelled_distance_meters": { "type": "string", "x-stoplight": { "id": "td3l2m3n4o5p6" }, "nullable": true }, "first_sent_at": { "type": "string", "x-stoplight": { "id": "fs1a2b3c4d5e6" }, "format": "date-time", "nullable": true, "description": "Earliest JobSent event timestamp" }, "sent_to_driver_at": { "type": "string", "x-stoplight": { "id": "st2d3e4f5g6h7" }, "format": "date-time", "nullable": true, "description": "Latest JobSent event timestamp when driver is assigned" }, "driver_accepted_at": { "type": "string", "x-stoplight": { "id": "da3e4f5g6h7i8" }, "format": "date-time", "nullable": true, "description": "Latest JobAccepted event timestamp where driver created it" }, "driver_declined_at": { "type": "string", "x-stoplight": { "id": "dd4f5g6h7i8j9" }, "format": "date-time", "nullable": true, "description": "Latest JobDeclined event timestamp where driver created it" }, "first_accepted_at": { "type": "string", "x-stoplight": { "id": "fa5g6h7i8j9k0" }, "format": "date-time", "nullable": true, "description": "Earliest JobAccepted event timestamp" }, "first_declined_at": { "type": "string", "x-stoplight": { "id": "fd6h7i8j9k0l1" }, "format": "date-time", "nullable": true, "description": "Earliest JobDeclined event timestamp" }, "first_canceled_at": { "type": "string", "x-stoplight": { "id": "fc7i8j9k0l1m2" }, "format": "date-time", "nullable": true, "description": "Earliest JobCanceled event timestamp" }, "pickup_geofence_entry_count": { "type": "integer", "x-stoplight": { "id": "pg8j9k0l1m2n3" }, "minimum": 0, "description": "Total count of site-tagged geofence entry events at pickup location" }, "dropoff_geofence_entry_count": { "type": "integer", "x-stoplight": { "id": "dg9k0l1m2n3o4" }, "minimum": 0, "description": "Total count of site-tagged geofence entry events at dropoff location" }, "gps_active_period_minutes": { "type": "integer", "x-stoplight": { "id": "gps1a2b3c4d5e6" }, "nullable": true, "minimum": 0, "description": "Active work time in minutes excluding pauses and breaks" }, "gps_total_pings": { "type": "integer", "x-stoplight": { "id": "gps2b3c4d5e6f7" }, "nullable": true, "minimum": 0, "description": "Total GPS location pings recorded during the job" }, "gps_offline_pings": { "type": "integer", "x-stoplight": { "id": "gps3c4d5e6f7g8" }, "nullable": true, "minimum": 0, "description": "Count of GPS pings recorded in offline mode (batch uploaded)" }, "gps_expected_pings": { "type": "integer", "x-stoplight": { "id": "gps4d5e6f7g8h9" }, "nullable": true, "minimum": 0, "description": "Expected GPS pings based on active period and ping frequency" }, "gps_confidence_level": { "type": "string", "x-stoplight": { "id": "gps5e6f7g8h9i0" }, "nullable": true, "enum": [ "high", "medium", "low" ], "description": "GPS tracking confidence level based on coverage and gap analysis" } }, "additionalProperties": false }, "JobSummary-Update": { "title": "JobSummary-Update", "x-stoplight": { "id": "3r4fsg3a0alzr" }, "type": "object", "properties": { "adjusted_logging_started_at": { "type": "string", "x-stoplight": { "id": "qoe58miwjdbvt" }, "format": "date-time", "nullable": true }, "adjusted_logging_ended_at": { "type": "string", "x-stoplight": { "id": "i1ge0ww2arrw4" }, "format": "date-time", "nullable": true }, "approved_work_time_minutes": { "type": "integer", "x-stoplight": { "id": "up7lzq4othpmp" }, "nullable": true } }, "additionalProperties": false }, "JobTimeline-Read": { "title": "JobTimeline-Read", "x-stoplight": { "id": "3zdy8kz21fnnz" }, "type": "object", "required": [ "created_at", "created_by", "object_changes" ], "properties": { "created_at": { "type": "string", "x-stoplight": { "id": "n2bj99ylabr3m" }, "format": "date-time" }, "created_by": { "$ref": "#/components/schemas/Principal-Read-Nested" }, "object_changes": { "type": "object", "x-stoplight": { "id": "nmlqowz801duy" } } }, "additionalProperties": false }, "KMLFile-Create": { "title": "KMLFile-Create", "x-stoplight": { "id": "v8fizunl8c4zg" }, "type": "object", "required": [ "file" ], "properties": { "file": { "x-stoplight": { "id": "fjzner83vvd4z" }, "anyOf": [ { "x-stoplight": { "id": "2vnsvq1cyr2en" }, "format": "binary" }, { "x-stoplight": { "id": "b8scg1fk08oed" } } ], "type": "string" }, "name": { "type": "string", "x-stoplight": { "id": "fh11vr7g2ltt7" } } }, "additionalProperties": false }, "KMLFile-Read": { "title": "KMLFile-Read", "x-stoplight": { "id": "uzbz90mhgt8a7" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "io5tk9zl5lv3q" }, "required": [ "name", "file_url", "file_name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "wcb6a9yegwnu8" }, "nullable": true }, "file_url": { "type": "string", "x-stoplight": { "id": "mx2ckixd8m2ps" } }, "file_name": { "type": "string", "x-stoplight": { "id": "6wngh6szemo44" } } } }, { "$ref": "#/components/schemas/Timestamps" } ], "x-internal": true }, "KMLFile-Update": { "title": "KMLFile-Update", "x-stoplight": { "id": "7fz259ifcoo0c" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "50w95tkilhwpb" }, "nullable": true } }, "x-internal": true, "additionalProperties": false }, "Label-Create": { "title": "Label-Create", "x-stoplight": { "id": "lbl1create0001" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "lbl1name000001" }, "description": "Label name, must be unique for the company" }, "color": { "type": "string", "x-stoplight": { "id": "lbl1color00001" }, "description": "Hex color code for the label (e.g., '#FF5733'). Defaults to '#6B7280' if not provided.", "pattern": "^#[0-9A-Fa-f]{6}$", "default": "#6B7280" } }, "additionalProperties": false }, "Label-Read": { "title": "Label-Read", "x-stoplight": { "id": "lbl1read000001" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "lbl1readname01" }, "description": "Label name" }, "color": { "type": "string", "x-stoplight": { "id": "lbl1readcolor1" }, "description": "Hex color code for the label", "pattern": "^#[0-9A-Fa-f]{6}$" } }, "required": [ "name", "color" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "Label-Read-Nested": { "title": "Label-Read-Nested", "x-stoplight": { "id": "lbl1readnest01" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "lbl1nestnm0001" }, "description": "Label name" }, "color": { "type": "string", "x-stoplight": { "id": "lbl1nestcol001" }, "description": "Hex color code for the label", "pattern": "^#[0-9A-Fa-f]{6}$" } }, "required": [ "name", "color" ] } ] }, "Label-Update": { "title": "Label-Update", "x-stoplight": { "id": "lbl1update0001" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "lbl1updname001" }, "description": "Label name. Must be unique for a company." }, "color": { "type": "string", "x-stoplight": { "id": "lbl1updcolor01" }, "description": "Hex color code for the label (e.g., '#FF5733')", "pattern": "^#[0-9A-Fa-f]{6}$" } }, "additionalProperties": false }, "Language": { "title": "Language", "x-stoplight": { "id": "1m5jdnwipywby" }, "description": "Supported ISO 639-1 Language Codes", "enum": [ "en", "es", "fr" ], "example": "en", "default": "en" }, "LineItemType-Read": { "title": "LineItemType-Read", "x-stoplight": { "id": "h5j7l9n1p3r5t" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "q7s9u1w3y5a7c" }, "description": "The name of the line item type (e.g., FreightRateLineItem, MaterialRateLineItem)" } }, "required": [ "name" ] } ] }, "LiveSiteChannel-Read": { "title": "LiveSiteChannel-Read", "x-stoplight": { "id": "j8i0b9h32m9fw" }, "type": "object", "required": [ "site", "waypoint_type" ], "properties": { "site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "waypoint_type": { "$ref": "#/components/schemas/WaypointType" } }, "additionalProperties": false }, "Load-Approval-Read": { "title": "Load-Approval-Read", "x-stoplight": { "id": "fe0o7xspns6wh" }, "description": "This model will be used by mobile client for approvals screen.", "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "load_id", "ordinality", "quantity", "state", "foremen", "unit_of_measure" ], "properties": { "load_id": { "type": "string", "x-stoplight": { "id": "335o6uguk5yqj" } }, "ordinality": { "type": "integer", "x-stoplight": { "id": "05rr0kjrl6bl5" } }, "quantity": { "type": "string", "x-stoplight": { "id": "vcyllp9hxavpu" } }, "state": { "$ref": "#/components/schemas/LoadState" }, "foremen": { "type": "array", "x-stoplight": { "id": "f6cnly3433nk4" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "job": { "$ref": "#/components/schemas/Job-Load-Approval-Read" }, "ticket": { "$ref": "#/components/schemas/Ticket-Load-Approval-Read" } } } ] }, "Load-Bulk-Update": { "title": "Load-Bulk-Update", "x-stoplight": { "id": "ev2z46a0jpk58" }, "type": "object", "properties": { "quantity": { "type": "number", "x-stoplight": { "id": "atqlrjh0t3mmr" } } }, "additionalProperties": false }, "Load-Create": { "title": "Load-Create", "x-stoplight": { "id": "rg2gf9p237akg" }, "type": "object", "x-tags": [ "Loads" ], "properties": { "quantity": { "type": "number", "deprecated": true, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "phase_id": { "type": "string", "x-stoplight": { "id": "3t58lbscqn004" }, "format": "uuid", "deprecated": true, "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "k6c26tj955xei" }, "format": "uuid", "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "p47pr83e2gbb9" }, "items": { "$ref": "#/components/schemas/Waypoint-Create" } }, "notes": { "type": "string", "x-stoplight": { "id": "5exwcm4v2lcr4" }, "nullable": true }, "material_rate_assignment": { "$ref": "#/components/schemas/MaterialRateAssignment-Update" } }, "description": "Deprecation notes:\n- `quantity` is deprecated and will be default based on the `Job#attributes_for_load`\n- `unit_of_measure` is deprecated and will be default based on the `Job#attributes_for_load`\n- `phase_id` is deprecated and will be default based on the `Job#attributes_for_load`", "additionalProperties": false }, "Load-LoadSummary-Read": { "title": "Load-LoadSummary-Read", "x-stoplight": { "id": "bpd7bhh6daa34" }, "allOf": [ { "$ref": "#/components/schemas/Load-Read" }, { "type": "object", "x-stoplight": { "id": "vh2cd1y6d638j" }, "properties": { "load_summary": { "$ref": "#/components/schemas/LoadSummary-Read-Nested" } } } ] }, "Load-Read": { "title": "Load-Read", "x-stoplight": { "id": "bc1mwlgcjbftc" }, "allOf": [ { "$ref": "#/components/schemas/Load-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "job_id", "state", "waypoints", "notes", "approved_at" ], "properties": { "foremen": { "type": "array", "x-stoplight": { "id": "8rry07il0s1gx" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "job_id": { "type": "string" }, "state": { "$ref": "#/components/schemas/LoadState" }, "phase": { "$ref": "#/components/schemas/Phase-Read" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "waypoints": { "type": "array", "x-stoplight": { "id": "qvkaurm9getzl" }, "items": { "$ref": "#/components/schemas/Waypoint-Read-Nested" } }, "notes": { "type": "string", "x-stoplight": { "id": "r4c2vl4mcwxe5" }, "nullable": true }, "approved_at": { "type": "string", "x-stoplight": { "id": "67al3lns17iw" }, "format": "date-time", "nullable": true }, "approval_status": { "$ref": "#/components/schemas/Approval-Status" }, "ai_review": { "$ref": "#/components/schemas/AiReview-Read-Nested" } } }, { "type": "object", "$ref": "#/components/schemas/RoleApprovable" }, { "$ref": "#/components/schemas/MaterialRateAssignmentable" } ] }, "Load-Read-Nested": { "title": "Load-Read-Nested", "x-stoplight": { "id": "zpc98ohudvz2m" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "4rcl2v4mcwxe5" }, "required": [ "quantity", "unit_of_measure", "load_id", "ordinality" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "3crm24cakhqhf" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_id": { "type": "string", "x-stoplight": { "id": "xwweeqwdfh9pg" } }, "ordinality": { "type": "integer", "x-stoplight": { "id": "4xdv8c9e9p4o8" } }, "ticket": { "$ref": "#/components/schemas/Ticket-Read-Nested" } } } ] }, "Load-Read-Typeahead": { "title": "Load-Read-Typeahead", "x-stoplight": { "id": "loadtypahead1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "load_id": { "type": "string", "description": "Load friendly identifier", "x-stoplight": { "id": "loadtypahead2" } } }, "required": [ "load_id" ] } ] }, "Load-Signatures-Read": { "title": "Load-Signatures-Read", "x-stoplight": { "id": "f5fqecfmj2wir" }, "type": "object", "properties": { "driver": { "$ref": "#/components/schemas/DriverSignature-Read" }, "dropoff": { "$ref": "#/components/schemas/DropoffSignature-Read" } }, "additionalProperties": false }, "Load-Update": { "title": "Load-Update", "x-stoplight": { "id": "v0ymr8d638f4n" }, "type": "object", "description": "This model will be used by Load patch to update a load", "properties": { "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "quantity": { "type": "string", "nullable": true }, "phase_id": { "type": "string", "x-stoplight": { "id": "z0st3hc3h204k" }, "format": "uuid", "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "i0weff06qlj7a" }, "format": "uuid", "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "3ui75uzk8psng" }, "items": { "$ref": "#/components/schemas/Waypoint-Update-Destroyable" } }, "material_rate_assignment": { "$ref": "#/components/schemas/MaterialRateAssignment-Update" }, "notes": { "type": "string", "x-stoplight": { "id": "2n1vh7vjotewt" }, "nullable": true } }, "additionalProperties": false }, "LoadCycle-Read": { "title": "LoadCycle-Read", "x-stoplight": { "id": "f7ms55f4p3g6y" }, "type": "object", "required": [ "from_load_id", "to_load_id", "time_minutes" ], "properties": { "from_load_id": { "type": "string", "x-stoplight": { "id": "q5hc43zfc3phu" }, "format": "uuid", "description": "ID of the `Load` which starts our `LoadCycle`" }, "to_load_id": { "type": "string", "x-stoplight": { "id": "y4t3x6s8xfedc" }, "format": "uuid", "description": "ID of the `Load` which ends our `LoadCycle`" }, "time_minutes": { "type": "integer", "x-stoplight": { "id": "lkmeu10eenb45" } } }, "additionalProperties": false }, "LoadState": { "title": "LoadState", "x-stoplight": { "id": "4gkn8rmkg2f8b" }, "enum": [ "created", "to_pickup", "arrived_pickup", "loaded", "to_dropoff", "arrived_dropoff", "unloaded", "completed", "canceled", "paused" ], "example": "created", "default": "created", "readOnly": true }, "LoadStateEvent": { "title": "LoadStateEvent", "x-stoplight": { "id": "1a4ulz2srbdfc" }, "enum": [ "arrive", "cancel", "complete", "enroute", "load_material", "pause", "unload_material" ] }, "LoadSummary-Read": { "title": "LoadSummary-Read", "x-stoplight": { "id": "dtdqwthqqnted" }, "allOf": [ { "$ref": "#/components/schemas/LoadSummary-Read-Nested" }, { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" } ] }, "LoadSummary-Read-Nested": { "title": "LoadSummary-Read-Nested", "x-stoplight": { "id": "uoiw3xfqelvn0" }, "type": "object", "required": [ "arrived_pickup_at", "pickup_time_minutes", "arrived_dropoff_at", "dropoff_time_minutes", "load_completed_at", "loaded_at", "unloaded_at", "gps_minutes", "has_gps_data", "editable", "travelled_distance_meters" ], "properties": { "arrived_pickup_at": { "type": "string", "x-stoplight": { "id": "mdew1ud6cbyhw" }, "format": "date-time", "nullable": true }, "pickup_time_minutes": { "type": "integer", "x-stoplight": { "id": "uc6b5zboqwf0h" } }, "arrived_dropoff_at": { "type": "string", "x-stoplight": { "id": "esomolv4kx3xw" }, "format": "date-time", "nullable": true }, "dropoff_time_minutes": { "type": "integer", "x-stoplight": { "id": "chyvwwwbvxomq" } }, "load_completed_at": { "type": "string", "x-stoplight": { "id": "aaavwwwbvxomq" }, "format": "date-time", "nullable": true }, "loaded_at": { "type": "string", "x-stoplight": { "id": "oqpdvyv4jzgwh" }, "format": "date-time", "nullable": true }, "unloaded_at": { "type": "string", "x-stoplight": { "id": "9efdgjzklr53v" }, "format": "date-time", "nullable": true }, "gps_minutes": { "type": "integer", "x-stoplight": { "id": "qe0o5rkv58ph0" }, "minimum": 0 }, "has_gps_data": { "type": "boolean", "x-stoplight": { "id": "dgva6rsrz0vu1" } }, "editable": { "type": "boolean", "x-stoplight": { "id": "278ccz8ncalvb" }, "readOnly": true }, "travelled_distance_meters": { "type": "string", "x-stoplight": { "id": "td4q7r8s9t0u1" }, "nullable": true } }, "additionalProperties": false }, "LoadSummary-Update": { "title": "LoadSummary-Update", "x-stoplight": { "id": "92p6rdbokbubi" }, "type": "object", "properties": { "arrived_pickup_at": { "type": "string", "format": "date-time", "nullable": true }, "arrived_dropoff_at": { "type": "string", "format": "date-time", "nullable": true }, "loaded_at": { "type": "string", "format": "date-time", "nullable": true }, "unloaded_at": { "type": "string", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "LocationHistory-Read": { "title": "LocationHistory-Read", "x-stoplight": { "id": "6dhv6eb82ixwn" }, "allOf": [ { "$ref": "#/components/schemas/Job-LocationHistory-Read" }, { "type": "object", "x-stoplight": { "id": "lphxa1j9uuwvr" }, "required": [ "accuracy", "bearing_degrees", "created_at", "device_id", "job_id", "order_id", "dispatch_number", "driver", "equipment", "radii", "vendor_job_assignment" ], "properties": { "accuracy": { "type": "string", "x-stoplight": { "id": "ess8witgiga6b" }, "nullable": true }, "bearing_degrees": { "type": "string", "x-stoplight": { "id": "bcn2bwest00ts" }, "nullable": true }, "created_at": { "type": "string", "x-stoplight": { "id": "aipuviagacckz" }, "format": "date-time" }, "device_id": { "type": "string", "x-stoplight": { "id": "zqowgiso69esn" } }, "job_id": { "type": "string", "x-stoplight": { "id": "mirvdsgmrf3tj" }, "format": "uuid", "nullable": true }, "order_id": { "type": "string", "x-stoplight": { "id": "1ylj8u9l5e4ji" }, "format": "uuid", "nullable": true }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Read-Nested" }, "driver": { "$ref": "#/components/schemas/User-Read-Nested" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "radii": { "type": "array", "x-stoplight": { "id": "zhtcg3suwxd7m" }, "items": { "$ref": "#/components/schemas/Radii-Read-Nested" } }, "vendor_job_assignment": { "$ref": "#/components/schemas/JobAssignment-LatestLocation-Read-Nested" } } } ] }, "M2MClient-Read-Nested": { "title": "M2MClient-Read-Nested", "x-stoplight": { "id": "hf6su2qgixxmz" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "company" ], "properties": { "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } } ] }, "MagicLink-Create": { "title": "MagicLink-Create", "x-stoplight": { "id": "7i37tmjq2wchl" }, "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "msyjm44adghyn" }, "format": "email" } }, "additionalProperties": false }, "MagicLink-Login": { "title": "MagicLink-Login", "x-stoplight": { "id": "4xe6ekm3oekn4" }, "type": "object", "required": [ "magic_links_token" ], "properties": { "magic_links_token": { "type": "string", "x-stoplight": { "id": "2rf3hmpkuzlwl" } } }, "additionalProperties": false }, "Material-Create": { "title": "Material-Create", "x-stoplight": { "id": "6picifuuj3fqg" }, "type": "object", "description": "The model for creating Materials", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "2ehiqmkv42lqu" }, "description": "Name of the `Material` to be created." }, "material_type_id": { "type": "string", "x-stoplight": { "id": "1x76pf7jqilp5" }, "format": "uuid", "description": "This is the id for `MaterialType`. If not provided, it will default to a `MaterialType` of `Other` " }, "external_id": { "type": "string", "x-stoplight": { "id": "kqklkbp3i54q0" }, "nullable": true }, "state": { "$ref": "#/components/schemas/MaterialState" } }, "additionalProperties": false }, "Material-Read": { "title": "Material-Read", "x-stoplight": { "id": "zykrikmo6ku9d" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "qdq705bx4imz5" }, "properties": { "name": { "type": "string", "x-stoplight": { "id": "ulmm18mglklba" } }, "system": { "type": "boolean", "x-stoplight": { "id": "0vn6xeslme5b2" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "material_type": { "$ref": "#/components/schemas/MaterialType-Read-Nested" }, "state": { "$ref": "#/components/schemas/MaterialState" }, "external_id": { "type": "string", "x-stoplight": { "id": "dr0e9kppho1yy" }, "nullable": true } }, "required": [ "name", "system", "company", "material_type", "state", "external_id" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "Material-Read-Nested": { "title": "Material-Read-Nested", "x-stoplight": { "id": "5hvekq1lnr9ku" }, "type": "object", "required": [ "id", "name", "external_id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "c6nool5iljv3l" }, "format": "uuid" }, "name": { "type": "string", "x-stoplight": { "id": "bsd3m2c74jis8" } }, "external_id": { "type": "string", "description": "Material external_id", "x-stoplight": { "id": "ab0l0yvuz5u6d" }, "nullable": true } }, "additionalProperties": false }, "Material-Read-Typeahead": { "title": "Material-Read-Typeahead", "x-stoplight": { "id": "30glh3las0ydb" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "external_id" ], "properties": { "name": { "type": "string", "description": "Material name" }, "external_id": { "type": "string", "description": "Material external_id", "x-stoplight": { "id": "ml0l0yvuz5u6d" }, "nullable": true } } } ] }, "Material-Update": { "title": "Material-Update", "x-stoplight": { "id": "n895nez95yq3o" }, "type": "object", "description": "The model for updating Materials", "properties": { "name": { "type": "string", "description": "Name of the `Material`." }, "material_type_id": { "x-stoplight": { "id": "esz3iuitl0yg2" }, "type": "string", "format": "uuid", "description": "ID of `MaterialType`" }, "external_id": { "type": "string", "x-stoplight": { "id": "2ky5fn1mftpam" }, "nullable": true }, "state": { "$ref": "#/components/schemas/MaterialState" } }, "additionalProperties": false }, "MaterialDeliveredQuantity": { "title": "MaterialDeliveredQuantity", "x-stoplight": { "id": "x8zbak180ua1x" }, "type": "object", "x-internal": true, "required": [ "material_id" ], "properties": { "material_id": { "type": "string", "x-stoplight": { "id": "eww32a0dqwhel" }, "format": "uuid" }, "unit_quantities": { "type": "array", "x-stoplight": { "id": "yergzsohqrwmd" }, "items": { "$ref": "#/components/schemas/QuantityUnit" } } }, "additionalProperties": false }, "MaterialRate-Create": { "title": "MaterialRate-Create", "x-stoplight": { "id": "lkwrvhtgd86bk" }, "type": "object", "required": [ "material_id", "unit_of_measure" ], "properties": { "material_id": { "type": "string", "x-stoplight": { "id": "gky0fz3oc9sg2" }, "format": "uuid" }, "project_id": { "type": "string", "x-stoplight": { "id": "6enxjo15yfscn" }, "format": "uuid", "nullable": true }, "site_id": { "type": "string", "x-stoplight": { "id": "q7jlxcjtr6f3x" }, "format": "uuid", "nullable": true }, "customer_account_id": { "type": "string", "x-stoplight": { "id": "yfrfnmb89oo5j" }, "format": "uuid", "nullable": true }, "buy_price": { "type": "number", "x-stoplight": { "id": "zi0uh93jp6p3q" }, "nullable": true }, "sell_price": { "type": "number", "x-stoplight": { "id": "zjq8i1vnall2w" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" } }, "additionalProperties": false }, "MaterialRate-Read": { "title": "MaterialRate-Read", "x-stoplight": { "id": "dovckk0ttfvcr" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "buy_price", "sell_price", "unit_of_measure", "material", "company" ], "properties": { "buy_price": { "type": "string", "x-stoplight": { "id": "2qho4z34qhk0l" }, "nullable": true }, "sell_price": { "type": "string", "x-stoplight": { "id": "l3zcrql2c3o8j" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "project": { "$ref": "#/components/schemas/Project-Read-Nested" }, "site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "MaterialRate-Read-Typeahead": { "title": "MaterialRate-Read-Typeahead", "x-stoplight": { "id": "n7ssu2zszdqgx" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "sell_price", "buy_price", "unit_of_measure" ], "properties": { "sell_price": { "type": "string", "x-stoplight": { "id": "dskmpvrizqinj" }, "nullable": true }, "buy_price": { "type": "string", "x-stoplight": { "id": "w107s2wjkvowa" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "site": { "$ref": "#/components/schemas/Site-Read-Typeahead" }, "material": { "$ref": "#/components/schemas/Material-Read-Typeahead" }, "project": { "$ref": "#/components/schemas/Project-Read-Typeahead" }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Typeahead" } } } ] }, "MaterialRate-Update": { "title": "MaterialRate-Update", "x-stoplight": { "id": "aaarbf73fk08u" }, "type": "object", "properties": { "buy_price": { "type": "number", "x-stoplight": { "id": "v9ety9mg8t0n8" }, "nullable": true }, "sell_price": { "type": "number", "x-stoplight": { "id": "jk22mt51ok81n" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "customer_account_id": { "type": "string", "x-stoplight": { "id": "p7ue6apygy477" }, "format": "uuid", "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "a3bypah81y42k" }, "format": "uuid", "nullable": true }, "project_id": { "type": "string", "x-stoplight": { "id": "526f16y3if9hs" }, "format": "uuid", "nullable": true }, "site_id": { "type": "string", "x-stoplight": { "id": "fotoy9rnvsrae" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "MaterialRateAssignment-Read-Nested": { "title": "MaterialRateAssignment-Read-Nested", "x-stoplight": { "id": "iddmbrcip2me5" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "sell_price", "buy_price", "unit_of_measure" ], "properties": { "sell_price": { "type": "string", "x-stoplight": { "id": "i2ac5k345i0bx" }, "nullable": true }, "buy_price": { "type": "string", "x-stoplight": { "id": "66qhs855s4pne" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "site": { "$ref": "#/components/schemas/Site-Read-Nested" } } } ] }, "MaterialRateAssignment-Update": { "title": "MaterialRateAssignment-Update", "x-stoplight": { "id": "r5upqq4wfyxwu" }, "type": "object", "properties": { "sell_price": { "type": "number", "x-stoplight": { "id": "7kiapccrr6e48" }, "nullable": true }, "buy_price": { "type": "number", "x-stoplight": { "id": "qp93icq41x7yo" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "site_id": { "type": "string", "x-stoplight": { "id": "zggnghj7lj6hp" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "MaterialRateAssignmentable": { "title": "MaterialRateAssignmentable", "x-stoplight": { "id": "hb9gpvhsr3aj4" }, "type": "object", "properties": { "material_rate_assignment": { "$ref": "#/components/schemas/MaterialRateAssignment-Read-Nested" } }, "additionalProperties": false }, "MaterialState": { "title": "MaterialState", "x-stoplight": { "id": "li8t934rfnen9" }, "enum": [ "active", "inactive" ], "default": "active", "description": "Material States" }, "MaterialStateEvent": { "title": "MaterialStateEvent", "x-stoplight": { "id": "1a5ulz2srbdfc" }, "enum": [ "activate", "deactivate" ] }, "MaterialType-Read": { "type": "object", "x-stoplight": { "id": "puv3xcstbwvh3" }, "required": [ "id", "name", "system", "source", "external_id" ], "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "system": { "type": "boolean" }, "source": { "$ref": "#/components/schemas/TicketSource" }, "external_id": { "type": "string", "x-stoplight": { "id": "3vzhucq5m4hoo" }, "nullable": true } }, "additionalProperties": false }, "MaterialType-Read-Nested": { "type": "object", "x-stoplight": { "id": "eb0713e9ab180" }, "required": [ "id", "name", "system" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "ttpt631g6p07c" }, "format": "uuid" }, "name": { "type": "string", "x-stoplight": { "id": "lwt1eafxok791" } }, "system": { "type": "boolean", "x-stoplight": { "id": "1z3wyp0ckkusa" } } }, "additionalProperties": false }, "MobileContext-Read": { "title": "MobileContext-Read", "x-stoplight": { "id": "uqex0xkxbrkmi" }, "type": "object", "description": "Read model for MobileContext", "x-internal": true, "required": [ "minimum_supported_version" ], "properties": { "minimum_supported_version": { "type": "integer", "x-stoplight": { "id": "mpdt6xld98sfi" }, "description": "minimum supported version of the mobile app" } }, "additionalProperties": false }, "MobileDeviceLocation-Create": { "title": "MobileDeviceLocation-Create", "x-stoplight": { "id": "ssxdz0alpz84e" }, "type": "object", "description": "Record a Mobile Device's current location", "x-internal": true, "required": [ "device_id", "location" ], "properties": { "device_id": { "type": "string", "x-stoplight": { "id": "xqs1vbf5jojw2" } }, "location": { "$ref": "#/components/schemas/GpsLocation-Create" } }, "additionalProperties": false }, "MobileDeviceLocations-Create": { "title": "MobileDeviceLocations-Create", "x-stoplight": { "id": "o29fucu0y1tie" }, "type": "object", "description": "Record a history of Mobile Device prior locations", "x-internal": true, "required": [ "device_id", "locations" ], "properties": { "device_id": { "type": "string" }, "locations": { "x-stoplight": { "id": "jubzfkpptjvxa" }, "type": "array", "items": { "$ref": "#/components/schemas/GpsLocation-Create" } } }, "additionalProperties": false }, "ModelError": { "title": "ModelError", "x-stoplight": { "id": "nhp6714o4j1qt" }, "description": "A Model-specific error", "allOf": [ { "$ref": "#/components/schemas/Error" }, { "type": "object", "required": [ "errors" ], "properties": { "errors": { "type": "array", "x-stoplight": { "id": "m4ul9vcq2deh6" }, "items": { "$ref": "#/components/schemas/ModelError-Item" } } } } ] }, "ModelError-Item": { "title": "ModelError-Item", "x-stoplight": { "id": "b93chwval2t8d" }, "type": "object", "required": [ "model", "field", "message" ], "properties": { "model": { "type": "string", "x-stoplight": { "id": "30myfyjkno8ao" }, "description": "The Model associated with this Error" }, "field": { "type": "string", "x-stoplight": { "id": "8gl4ed3uxhdws" }, "description": "The field associated with this Error" }, "message": { "type": "string", "x-stoplight": { "id": "bmgbrtmw17qsj" }, "description": "The Error message" } }, "additionalProperties": false }, "ModelError-Response": { "title": "ModelError-Response", "x-stoplight": { "id": "payf9ndh3l6np" }, "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/ModelError" } }, "additionalProperties": false }, "MovingSite-Create": { "title": "MovingSite-Create", "x-stoplight": { "id": "pvplwuazt5c5k" }, "type": "object", "required": [ "equipment_id" ], "properties": { "equipment_id": { "type": "string", "x-stoplight": { "id": "v20yjls9jl546" }, "format": "uuid" }, "polling_interval_seconds": { "type": "integer", "x-stoplight": { "id": "0nthm1r0wvy4h" } } }, "additionalProperties": false }, "MovingSite-Read": { "title": "MovingSite-Read", "x-stoplight": { "id": "yaf7dbodbspna" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "tf4brd0yshw5e" }, "required": [ "equipment_id", "site_id", "polling_interval_seconds" ], "properties": { "equipment_id": { "type": "string", "x-stoplight": { "id": "bucjeefefqu2t" }, "format": "uuid" }, "site_id": { "type": "string", "x-stoplight": { "id": "nxcmrn80s2rqj" }, "format": "uuid" }, "polling_interval_seconds": { "type": "integer", "x-stoplight": { "id": "72glfhxls2dqw" } } } } ] }, "MovingSite-Update-Destroyable": { "title": "MovingSite-Update-Destroyable", "x-stoplight": { "id": "bgj4d7e1o9nah" }, "allOf": [ { "type": "object", "properties": { "equipment_id": { "type": "string", "x-stoplight": { "id": "45ebzcj4axwrw" }, "format": "uuid" }, "polling_interval_seconds": { "type": "integer", "x-stoplight": { "id": "jw6hggxdn53m9" } } } }, { "$ref": "#/components/schemas/Destroyable" } ] }, "MovingSiteStateEvent": { "title": "MovingSiteStateEvent", "x-stoplight": { "id": "165ulz2srbdfc" }, "enum": [ "activate", "deactivate" ] }, "NextBillionAssetLocations-LatestLocation-Read": { "title": "NextBillionAssetLocations-LatestLocation-Read", "x-stoplight": { "id": "kxf2ke7m44u5j" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/NextBillionAssetLocations-Read" }, { "type": "object", "x-stoplight": { "id": "640j3b5ol4fi7" }, "properties": { "driver": { "$ref": "#/components/schemas/User-Read-Nested" }, "vendor_job_assignment": { "$ref": "#/components/schemas/JobAssignment-LatestLocation-Read-Nested" }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Read-Nested" } } } ] }, "NextBillionAssetLocations-Read": { "title": "NextBillionAssetLocations-Read", "x-stoplight": { "id": "r4fxi0lyzdk7c" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "okxxnjle06x4t" }, "required": [ "lat", "lon", "accuracy", "device_id", "load_id", "job_id", "order_id", "created_at", "load_state", "radii", "speed_meters_per_second", "bearing_degrees", "occurred_at" ], "properties": { "lat": { "type": "string", "x-stoplight": { "id": "sz4r3je8tjtug" } }, "lon": { "type": "string", "x-stoplight": { "id": "oxv4dux129o9u" } }, "accuracy": { "type": "string", "x-stoplight": { "id": "yfet2yt7hix1r" }, "nullable": true }, "device_id": { "type": "string", "x-stoplight": { "id": "twigr07p456el" }, "nullable": true }, "load_id": { "type": "string", "x-stoplight": { "id": "x2nr61wujagbl" }, "format": "uuid", "nullable": true }, "job_id": { "type": "string", "x-stoplight": { "id": "eh8h8ewvux24d" }, "format": "uuid", "nullable": true }, "order_id": { "type": "string", "x-stoplight": { "id": "es98zgal04r4z" }, "nullable": true }, "created_at": { "type": "string", "x-stoplight": { "id": "mfxcvbjb4hpah" }, "format": "date-time", "deprecated": true }, "load_state": { "$ref": "#/components/schemas/NullableLoadState" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "radii": { "x-stoplight": { "id": "qgdg5f6qq8vw9" }, "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Radii-Read-Nested" } }, "speed_meters_per_second": { "type": "string", "x-stoplight": { "id": "p42zd3kzlilwf" }, "nullable": true }, "bearing_degrees": { "type": "string", "x-stoplight": { "id": "os6j4w8qfqg4h" }, "nullable": true }, "occurred_at": { "type": "string", "x-stoplight": { "id": "1gdxcj1n7b4ug" }, "format": "date-time" } } } ] }, "NextBillionGeofence-Create": { "$ref": "#/components/schemas/Geofence-Data", "x-stoplight": { "id": "8b9d859e5388e" } }, "NextBillionGeofence-Read": { "title": "NextBillionGeofence-Read", "x-stoplight": { "id": "60y0z4bb3pu6m" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Geofence-Data" } ] }, "NextBillionGeofence-Update": { "title": "Geofence-Update", "x-stoplight": { "id": "vt2z5btwhm5of" }, "allOf": [ { "$ref": "#/components/schemas/Geofence-Data" }, { "$ref": "#/components/schemas/Destroyable" } ] }, "NextBillionLatLon-Create": { "title": "NextBillionLatLon-Create", "x-stoplight": { "id": "0l9khm7nez9p0" }, "type": "object", "required": [ "lat", "lon" ], "properties": { "lat": { "type": "number", "x-stoplight": { "id": "oby9f7hjjh2k7" } }, "lon": { "type": "number", "x-stoplight": { "id": "hp5b0w5gtsyrb" } } }, "additionalProperties": false }, "NotificationMethod": { "title": "NotificationMethod", "x-stoplight": { "id": "uucxsvoxknxrj" }, "enum": [ "push", "sms" ], "example": "push" }, "NotificationName": { "title": "NotificationName", "x-stoplight": { "id": "icve6awd7g8wn" }, "enum": [ "pending_job_reminder", "new_job_request", "start_job_reminder", "no_location_alert", "job_unassigned", "end_shift_reminder", "order_pending_request", "order_accepted", "order_rejected", "order_canceled", "job_canceled", "job_completed", "load_completed", "job_state_changed" ], "example": "pending_job_reminder" }, "NullableAccountType": { "title": "NullableAccountType", "x-stoplight": { "id": "62smrzi6tzz39" }, "allOf": [ { "$ref": "#/components/schemas/AccountType" } ], "nullable": true, "type": "string" }, "NullableAddOnApplicableType": { "title": "NullableAddOnApplicableType", "x-stoplight": { "id": "iy7f8dnx4g1zp" }, "allOf": [ { "$ref": "#/components/schemas/AddOnApplicableType" } ], "nullable": true, "type": "string" }, "NullableAddOnRateType": { "title": "NullableAddOnRateType", "x-stoplight": { "id": "i6n5x2lt9lohr" }, "allOf": [ { "$ref": "#/components/schemas/AddOnRateType" } ], "nullable": true, "type": "string" }, "NullableAddOnRequestableType": { "title": "NullableAddOnRequestableType", "x-stoplight": { "id": "jlbtlz8rtw77s" }, "allOf": [ { "$ref": "#/components/schemas/AddOnRequestableType" } ], "nullable": true, "type": "string" }, "NullableAgaveItemizableType": { "title": "NullableAgaveItemizableType", "x-stoplight": { "id": "zl9obcee7qvmi" }, "allOf": [ { "$ref": "#/components/schemas/AgaveItemizableType" } ], "nullable": true, "type": "string" }, "NullableAgaveLedgerAccountType": { "title": "NullableAgaveLedgerAccountType", "x-stoplight": { "id": "d2of30zah7p6r" }, "allOf": [ { "$ref": "#/components/schemas/AgaveLedgerAccountType" } ], "nullable": true, "type": "string" }, "NullableAutoAddOnAssignmentSourceType": { "title": "NullableAutoAddOnAssignmentSourceType", "x-stoplight": { "id": "iuykjw9ua72oe" }, "allOf": [ { "$ref": "#/components/schemas/AutoAddOnAssignmentSourceType" } ], "nullable": true, "type": "string" }, "NullableGeofenceType": { "title": "NullableGeofenceType", "x-stoplight": { "id": "ii94t82oqh5xo" }, "allOf": [ { "$ref": "#/components/schemas/GeofenceType" } ], "nullable": true, "type": "string" }, "NullableJobState": { "title": "NullableJobState", "x-stoplight": { "id": "dyq5roqzd4yam" }, "allOf": [ { "$ref": "#/components/schemas/JobState" } ], "nullable": true, "type": "string" }, "NullableLoadState": { "title": "NullableLoadState", "x-stoplight": { "id": "s21krgz0gt3pa" }, "allOf": [ { "$ref": "#/components/schemas/LoadState" } ], "nullable": true, "type": "string" }, "NullableOrderUnitOfMeasure": { "title": "NullableOrderUnitOfMeasure", "x-stoplight": { "id": "rtlna368z495u" }, "allOf": [ { "$ref": "#/components/schemas/OrderUnitOfMeasure" } ], "type": "string", "nullable": true }, "NullableRateType": { "title": "NullableRateType", "x-stoplight": { "id": "rajiobym5ovlp" }, "allOf": [ { "$ref": "#/components/schemas/RateType" } ], "nullable": true, "type": "string" }, "NullableRequestedQuantityType": { "title": "NullableRequestedQuantityType", "x-stoplight": { "id": "gd7d2u7zxxj9b" }, "allOf": [ { "$ref": "#/components/schemas/RequestedQuantityType" } ], "nullable": true, "type": "string" }, "NullableShiftAdjustmentType": { "title": "NullableShiftAdjustmentType", "x-stoplight": { "id": "c1sp89eu3bgoa" }, "allOf": [ { "$ref": "#/components/schemas/ShiftAdjustmentType" } ], "nullable": true, "type": "string" }, "NullableWaypointType": { "title": "NullableWaypointType", "x-stoplight": { "id": "11abrzi6tzz39" }, "allOf": [ { "$ref": "#/components/schemas/WaypointType" } ], "nullable": true, "type": "string" }, "OmniReport-Create": { "title": "OmniReport-Create", "x-stoplight": { "id": "1pd87c360aj87" }, "type": "object", "required": [ "name", "dashboard_id", "report_category_id" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "q46k4wj11ephk" } }, "dashboard_id": { "type": "string", "x-stoplight": { "id": "dvtmkyxz2ed1o" } }, "report_category_id": { "type": "string", "x-stoplight": { "id": "am4622rnu2x6p" }, "format": "uuid" }, "system": { "type": "boolean", "x-stoplight": { "id": "ry8ocfi2elgyt" } } }, "x-internal": true, "additionalProperties": false }, "OmniReport-Read": { "title": "OmniReport-Read", "x-stoplight": { "id": "av3k6gjltpapb" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "19wcinghh91lt" }, "required": [ "name", "dashboard_id", "system" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "f2ovmcott6v5k" } }, "dashboard_id": { "type": "string", "x-stoplight": { "id": "by70pqu4qydb1" } }, "system": { "type": "boolean", "x-stoplight": { "id": "a9nrnf6mpydga" } }, "report_category": { "$ref": "#/components/schemas/ReportCategory-Read" } } } ], "x-internal": true }, "OmniReport-Update": { "title": "OmniReport-Update", "x-stoplight": { "id": "0b09vp2lful8q" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "kdcqqkihqvdvv" } }, "dashboard_id": { "type": "string", "x-stoplight": { "id": "hquuxyxju5olx" } }, "report_category_id": { "type": "string", "x-stoplight": { "id": "l9xw0qz6ni5lc" }, "format": "uuid" } }, "x-internal": true, "additionalProperties": false }, "OmniReportLink-Read": { "title": "OmniReportLink-Read", "x-stoplight": { "id": "iusjdijojq679" }, "type": "object", "required": [ "dashboard_url" ], "properties": { "dashboard_url": { "type": "string", "x-stoplight": { "id": "selsmml5eqvc9" } } }, "additionalProperties": false }, "Order-Copy": { "title": "Order-Copy", "x-stoplight": { "id": "62bvdzijcx9jq" }, "type": "object", "properties": { "include_assignee": { "type": "boolean", "x-stoplight": { "id": "sqzgzmtykiv3s" } }, "date": { "type": "string", "x-stoplight": { "id": "dwp7ju2yfi6js" }, "format": "date" }, "truck_count": { "type": "integer", "x-stoplight": { "id": "yxnqq56k7wfuj" }, "minimum": 1, "maximum": 200 } }, "additionalProperties": false }, "Order-Create": { "title": "Order-Create", "x-stoplight": { "id": "smuo7uzzpe7nq" }, "type": "object", "description": "Notes:\n\n- `phase` has been deprecated in favor of `phases` where `\"primary\" == true`\n- Only one associated Phase can be the primary", "required": [ "load_at", "truck_count", "truck_delay", "account_id", "service_id", "waypoints" ], "properties": { "load_at": { "type": "string", "x-stoplight": { "id": "kyvgopvby06w8" }, "format": "date-time", "description": "Load Start Date & Time." }, "notes": { "type": "string", "x-stoplight": { "id": "euiwhhybg6l0a" }, "nullable": true }, "internal_notes": { "type": "string", "x-stoplight": { "id": "vsques5t6mpfs" }, "nullable": true }, "quantity": { "type": "number", "x-stoplight": { "id": "kdc6qbb7ctyu8" }, "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "t9cvetbec1gbe" }, "minimum": 1, "maximum": 200 }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "4bqp4rrzzrh7q" }, "minimum": 1, "maximum": 25, "description": "When a value is omitted, the system will set `loads_per_truck` to `1` when the `job_unit_of_measure` is `Load` else it is set to `job_quantity`." }, "truck_delay": { "type": "integer", "x-stoplight": { "id": "my703q5a3e80z" } }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "account_id": { "type": "string", "x-stoplight": { "id": "itzfgucvv0wwo" } }, "equipment_id": { "type": "string", "x-stoplight": { "id": "zbptc3exj5u5q" }, "deprecated": true, "format": "uuid", "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "mcwisfm59i9ag" }, "format": "uuid", "nullable": true }, "service_id": { "type": "string", "x-stoplight": { "id": "zxv2jwypnwnw4" }, "format": "uuid" }, "project_id": { "type": "string", "x-stoplight": { "id": "ye27pudf1dygs" }, "description": "If `project_id` is provided, the `Order`'s associated `Account` will be the same as the `Project`'s `Account`", "format": "uuid", "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "oca5206jxx0cn" }, "items": { "$ref": "#/components/schemas/Waypoint-Create" } }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "uemxzfyxrjt1s" }, "format": "uuid", "nullable": true }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "io2jrvdemgmdc" }, "format": "uuid", "nullable": true }, "driver_id": { "type": "string", "x-stoplight": { "id": "m8ok5eh1wxyqu" }, "format": "uuid", "description": "The `driver` that the created jobs will be assigned to.\nIf this is defined the value for `vendor_id` wil be ignored." }, "vendor_id": { "type": "string", "x-stoplight": { "id": "o5frfxjrq87gr" }, "format": "uuid", "description": "The `vendor` that the created jobs will be assigned to." }, "company_id": { "type": "string", "x-stoplight": { "id": "bz4i6bhuuto04" }, "format": "uuid", "description": "The `Company` who owns this `Order`." }, "phase": { "$ref": "#/components/schemas/Phase-Create" }, "sales_contact": { "$ref": "#/components/schemas/Contact-Create" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Create" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Create" }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "xjywvkf0r0c5m" }, "items": { "x-stoplight": { "id": "24xiouhw3883d" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "ajywvkf0r0c5m" }, "items": { "x-stoplight": { "id": "a4xiouhw3883d" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "bkywvkf0r1d6m" }, "items": { "x-stoplight": { "id": "b4xiouhw3883e" }, "type": "string", "format": "uuid" } }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Create" }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "rxolq91tl3mdh" }, "format": "uuid" }, "department_id": { "type": "string", "x-stoplight": { "id": "56mcwzoszvm8n" }, "format": "uuid", "nullable": true }, "name": { "type": "string", "x-stoplight": { "id": "mmpbw30mutng5" }, "nullable": true }, "po_job_number": { "type": "string", "x-stoplight": { "id": "tvat5scgf6pig" }, "nullable": true }, "zone": { "type": "string", "x-stoplight": { "id": "wva6durg5p2bz" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "jjq4g5u6a15b1" }, "nullable": true }, "service_class_id": { "type": "string", "x-stoplight": { "id": "v19l62gg25pxx" }, "format": "uuid", "nullable": true }, "hauler_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "job_notes": { "type": "string", "x-stoplight": { "id": "prjz0jpmeh182" }, "nullable": true }, "job_time": { "type": "integer", "x-stoplight": { "id": "u887cr5v9dstd" }, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "f1stad30zv6rj" }, "nullable": true }, "job_quantity": { "type": "number", "x-stoplight": { "id": "p6d5gmje11yci" }, "nullable": true }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Create" }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "bp55lo33xjxdj" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "ck4smxqqpeltp" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "job_start_at": { "type": "string", "x-stoplight": { "id": "wg4ivmp2ohc0s" }, "format": "date-time", "nullable": true }, "trucks_per_delay": { "type": "integer", "x-stoplight": { "id": "kjxseftm1hn12" }, "minimum": 1 }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "nzut0ctg0pqyk" }, "format": "uuid", "nullable": true }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "pqcc0q9dbj86e" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "requester_id": { "type": "string", "x-stoplight": { "id": "vj9ybck2uva7o" }, "format": "uuid", "nullable": true }, "phases": { "type": "array", "x-stoplight": { "id": "9c2w0f54m1hmg" }, "items": { "$ref": "#/components/schemas/Phase-Create" } }, "state": { "x-stoplight": { "id": "l2apucbgaaowf" }, "enum": [ "created", "pending_request", "hold" ], "default": "created", "example": "created", "description": "Initial `state` for the `Order`." }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "v2un4abnnb69d" }, "nullable": true }, "pickup_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "751b3hvweidbw" }, "nullable": true }, "dropoff_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "if5e6z1p7lxvh" }, "nullable": true }, "pickup_to_dropoff_time_minutes": { "type": "integer", "x-stoplight": { "id": "5ba91iqa6j3bi" }, "nullable": true }, "pickup_to_dropoff_distance_meters": { "type": "number", "x-stoplight": { "id": "rezv052i3qqua" }, "nullable": true }, "expected_total_loads": { "type": "integer", "x-stoplight": { "id": "vnjvap4p5hvo8" }, "nullable": true }, "cycle_time_minutes": { "type": "integer", "x-stoplight": { "id": "pr3sa7ett2z8o" }, "nullable": true }, "requested_quantity_type": { "$ref": "#/components/schemas/NullableRequestedQuantityType" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "11aap8yjtdkyy" } }, "material_rate_site_id": { "type": "string", "x-stoplight": { "id": "i59a6s7u5cjb2" }, "format": "uuid", "nullable": true }, "material_rate_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_rate_sell_price": { "type": "number", "x-stoplight": { "id": "tqto8rajdn0ot" }, "nullable": true }, "material_rate_buy_price": { "type": "number", "x-stoplight": { "id": "avu24hfgqpu7g" }, "nullable": true }, "material_rate_itemized": { "type": "boolean", "x-stoplight": { "id": "3whr98sr8h3iz" } }, "geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "cw3ockhy3a0u6" }, "nullable": true }, "job_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "dgl6wl1yj3q7s" }, "nullable": true }, "chase_missing_tickets": { "type": "boolean", "x-stoplight": { "id": "fikev5wel66fi" }, "description": "Enable ticket chasing for jobs in this order" }, "default_digital_ticket_view": { "type": "boolean", "default": false, "x-stoplight": { "id": "ddtv1ordcreate" }, "description": "Use the default digital ticket view for jobs in this order" }, "tax_rate": { "x-stoplight": { "id": "v8x0b2d4g6i9k" }, "type": "number", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "l1n3p5r7u9w1z" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "b3d5f7h9k1m3p" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "r5t7v9y1a3c5e" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } }, "additionalProperties": false }, "Order-Estimate-Create": { "title": "Order-Estimate-Create", "x-stoplight": { "id": "sspcuc3u5u1hf" }, "type": "object", "required": [ "equipment_capacity", "job_duration_minutes", "cycle_time_minutes" ], "properties": { "total_loads": { "type": "integer", "x-stoplight": { "id": "arrqgc0c66dsy" }, "description": "Required if you want calculations based on total `loads` counts" }, "truck_quantity": { "type": "integer", "x-stoplight": { "id": "e11qgghyhx73m" }, "description": "Required if you want calculations based on `truck` count" }, "total_units": { "type": "integer", "x-stoplight": { "id": "kso8sll5108la" }, "description": "Required if you want calculations based on total `units` of `material`" }, "equipment_capacity": { "type": "number", "x-stoplight": { "id": "c8328g8hbm7zo" } }, "job_duration_minutes": { "type": "integer", "x-stoplight": { "id": "tu5peh10ny58q" } }, "cycle_time_minutes": { "type": "integer", "x-stoplight": { "id": "bmyzghq0gzhnd" } } }, "additionalProperties": false }, "Order-Estimate-Read": { "title": "Order-Estimate-Read", "x-stoplight": { "id": "1bbtil49yhz30" }, "type": "object", "properties": { "truck_quantity": { "type": "integer", "x-stoplight": { "id": "7no7io874k78b" } }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "3qhw8okjs1srt" } }, "total_loads": { "type": "integer", "x-stoplight": { "id": "jcz26mrtsruxy" } }, "delivered_per_truck": { "type": "integer", "x-stoplight": { "id": "ursn5nr1jy0ff" } }, "total_units": { "type": "integer", "x-stoplight": { "id": "1yr3hkf4ow4zg" } }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "5lxppabz9vlx0" } } }, "additionalProperties": false }, "Order-Intake": { "title": "Order-Intake", "x-stoplight": { "id": "jae8smnmeg8qw" }, "type": "object", "required": [ "user_prompt", "openai_model" ], "properties": { "user_prompt": { "type": "string", "x-stoplight": { "id": "ks4ozgu9zsq94" } }, "openai_model": { "type": "string", "x-stoplight": { "id": "mdfks47wkbh9u" } } }, "description": "Model for generating an Order-Intake-Create response from a user prompt", "x-internal": true, "additionalProperties": false }, "Order-Intake-Create": { "title": "Order-Intake-Create", "x-stoplight": { "id": "rogz4n0pegz20" }, "type": "object", "properties": { "order": { "type": "object", "x-stoplight": { "id": "er03i3625ln5n" }, "properties": { "load_at": { "type": "string", "x-stoplight": { "id": "vjncd0ua82wfi" }, "format": "date-time" }, "truck_count": { "type": "integer", "x-stoplight": { "id": "szkwt3z2dfo5k" }, "minimum": 1, "maximum": 200 }, "truck_delay": { "type": "number", "x-stoplight": { "id": "hchi703t2x69x" } }, "quantity": { "type": "number", "x-stoplight": { "id": "sbfoad8lg9qna" } }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "0ake2g4pzddll" }, "minimum": 1, "maximum": 25 }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "86uw5g6il508g" } }, "expected_total_loads": { "type": "integer", "x-stoplight": { "id": "pky6h6qaovukg" } }, "notes": { "type": "string", "x-stoplight": { "id": "9t57u247srpp3" } }, "service_id": { "type": "string", "x-stoplight": { "id": "6hfyoera5xthm" } } } }, "metadata": { "type": "object", "x-stoplight": { "id": "fawk8yg5ykv3m" }, "properties": { "hints": { "type": "object", "x-stoplight": { "id": "lgnv4c2t5izkd" }, "additionalProperties": { "x-stoplight": { "id": "l2u1c4x95avkn" }, "type": "string" } } } } }, "description": "Model for an order intake response (partial of Order-Create component)", "x-internal": true, "additionalProperties": false }, "Order-Read": { "title": "Order-Read", "x-stoplight": { "id": "jmv590d522eua" }, "allOf": [ { "$ref": "#/components/schemas/Order-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "pcjv95msr87kv" }, "required": [ "load_at", "truck_count", "truck_delay", "unit_of_measure", "load_unit_of_measure", "service", "quantity", "waypoints", "company", "copyable", "equipment_type", "load_cycle_avg", "action_required", "foremen", "collaborators", "salespeople", "external_id", "hauler_rate_type", "job_notes", "units_per_hour", "job_quantity", "sending_accounts", "job_start_at", "trucks_per_delay", "loads_pickup_time_minutes_avg", "loads_dropoff_time_minutes_avg", "phases", "equipment_type_gross_capacity", "pickup_onsite_minutes", "dropoff_onsite_minutes", "pickup_to_dropoff_time_minutes", "pickup_to_dropoff_distance_meters", "expected_total_loads", "cycle_time_minutes", "loads_per_truck", "state_events", "recurring_loads", "material_rate_unit_of_measure", "material_rate_sell_price", "material_rate_buy_price", "material_rate_itemized" ], "properties": { "load_at": { "type": "string", "x-stoplight": { "id": "cfgdlmaimwruf" }, "format": "date-time" }, "truck_count": { "type": "integer", "x-stoplight": { "id": "5itw7qkj0h36q" } }, "truck_delay": { "type": "integer", "x-stoplight": { "id": "7mu1078uuykcv" } }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "project": { "$ref": "#/components/schemas/Project-Read-Nested" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "service": { "$ref": "#/components/schemas/Service-Read-Nested" }, "quantity": { "type": "string", "x-stoplight": { "id": "wqi7tbq6ee992" }, "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "p6uf5unccv5p5" }, "items": { "$ref": "#/components/schemas/Waypoint-Read-Nested" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "customer_rate": { "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "vendor_rate": { "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "phase": { "$ref": "#/components/schemas/Phase-Read" }, "sales_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "copyable": { "type": "boolean", "x-stoplight": { "id": "112ccz8nbaldd" }, "readOnly": true }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" }, "department": { "$ref": "#/components/schemas/Department-Read-Nested" }, "service_class": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" }, "load_cycle_avg": { "type": "integer", "x-stoplight": { "id": "f91zu37ro2h29" }, "description": "Average `LoadCycle` time in minutes of all `Jobs` under this `Order`" }, "action_required": { "type": "boolean", "x-stoplight": { "id": "m3fnqql5rv8dn" }, "readOnly": true }, "foremen": { "type": "array", "x-stoplight": { "id": "gxcb2wwxwjns0" }, "items": { "$ref": "#/components/schemas/Foreman-Read-Nested" } }, "collaborators": { "type": "array", "x-stoplight": { "id": "axcb2wwxwjns0" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "salespeople": { "type": "array", "x-stoplight": { "id": "bxcb2wwxwjns1" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "external_id": { "type": "string", "x-stoplight": { "id": "nq68gwcold5m0" }, "nullable": true }, "hauler_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "job_notes": { "type": "string", "x-stoplight": { "id": "5ud3uivlvck9s" }, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "50xlsxxquw52c" }, "nullable": true }, "job_quantity": { "type": "string", "x-stoplight": { "id": "wg6j6f6reg9sl" }, "nullable": true }, "sending_accounts": { "x-stoplight": { "id": "7g22gl9la8zqk" }, "type": "array", "items": { "$ref": "#/components/schemas/Account-Read-Nested" } }, "customer_rate_value": { "type": "string", "x-stoplight": { "id": "fjnm5q0a451u2" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "string", "x-stoplight": { "id": "ov7z3kib1n181" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "job_start_at": { "type": "string", "x-stoplight": { "id": "l6zkxq2vx1ilc" }, "format": "date-time", "nullable": true }, "trucks_per_delay": { "type": "integer", "x-stoplight": { "id": "qcsjic2q8xbxf" } }, "driver_rate": { "x-stoplight": { "id": "weiq22zl1hj3c" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "driver_rate_value": { "type": "string", "x-stoplight": { "id": "swa485xjh0u0x" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "loads_pickup_time_minutes_avg": { "type": "integer", "x-stoplight": { "id": "4v62yhd8vk6rp" } }, "loads_dropoff_time_minutes_avg": { "type": "integer" }, "requester": { "$ref": "#/components/schemas/User-Read-Nested" }, "phases": { "type": "array", "x-stoplight": { "id": "jetui2m1z24p1" }, "items": { "$ref": "#/components/schemas/Phase-Read" } }, "equipment_type_gross_capacity": { "type": "string", "x-stoplight": { "id": "cab0do1pqqdfw" }, "nullable": true }, "order_summary": { "$ref": "#/components/schemas/OrderSummary-Read-Nested" }, "pickup_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "jz3bmzumvh4cv" }, "nullable": true }, "dropoff_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "njcs074ca70l3" }, "nullable": true }, "pickup_to_dropoff_time_minutes": { "type": "integer", "x-stoplight": { "id": "fk8zr8noi9mve" }, "nullable": true }, "pickup_to_dropoff_distance_meters": { "type": "string", "x-stoplight": { "id": "rqlam03fzkyi2" }, "nullable": true }, "expected_total_loads": { "type": "integer", "x-stoplight": { "id": "r32kdx5x2dsbi" }, "nullable": true }, "cycle_time_minutes": { "type": "integer", "x-stoplight": { "id": "uno5hxxo499px" }, "nullable": true }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "04m81fkv3xeny" }, "nullable": true }, "requested_quantity_type": { "$ref": "#/components/schemas/NullableRequestedQuantityType" }, "state_events": { "x-stoplight": { "id": "s9szr43ue76yf" }, "type": "array", "items": { "$ref": "#/components/schemas/OrderStateEvent" } }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "99aap8yjtaazz" } }, "material_rate_site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "material_rate_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_rate_sell_price": { "type": "string", "x-stoplight": { "id": "012o2fvbi5ioy" }, "nullable": true }, "material_rate_buy_price": { "type": "string", "x-stoplight": { "id": "qresdcwux74fk" }, "nullable": true }, "material_rate_itemized": { "type": "boolean", "x-stoplight": { "id": "035yjaw0wxryy" } }, "reject_reason": { "type": "string", "x-stoplight": { "id": "3cukow1kj37o6" }, "description": "The user-provided reason for rejecting the Order", "maxLength": 100, "minLength": 1, "nullable": true }, "rejected_by": { "type": "string", "x-stoplight": { "id": "j9c5o8qaktej1" }, "description": "The name of the rejecter", "nullable": true }, "rejected_at": { "type": "string", "x-stoplight": { "id": "y2omyxm2ntwsq" }, "format": "date-time", "description": "The timestamp when this Order was rejected", "nullable": true }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "tax_rate": { "x-stoplight": { "id": "g7j9l1n3q5s8u" }, "type": "string", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "w0y2a4c6f8h1k" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "m3p5r7t9v1x3z" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "b5d7g9i1l3n5q" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } } } ], "description": "Notes:\n\n- `phase` has been deprecated in favor of `phases` where `\"primary\" == true`" }, "Order-Read-Minimal": { "title": "Order-Read-Minimal", "x-stoplight": { "id": "wpgfl9nff3zhz" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "crmvgzs6hb81e" }, "required": [ "order_id" ], "properties": { "order_id": { "type": "string", "x-stoplight": { "id": "7ac5dtqqp7juv" } } } } ] }, "Order-Read-Nested": { "title": "Order-Read-Nested", "x-stoplight": { "id": "r53ko3b3esvvf" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "e0ahzgn4xwxu1" }, "required": [ "account", "job_time", "equipment_type", "name", "po_job_number", "zone", "notes", "charge_to_account", "state", "editable", "geofence_delay_seconds" ], "properties": { "order_id": { "type": "string", "x-stoplight": { "id": "rum48z3rdg42f" } }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Read-Nested" }, "account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "job_time": { "type": "integer", "x-stoplight": { "id": "4h34cu14jafd2" }, "nullable": true }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" }, "name": { "type": "string", "x-stoplight": { "id": "dobl4n9be89ew" }, "nullable": true }, "po_job_number": { "type": "string", "x-stoplight": { "id": "kv5zezw4bcj3q" }, "nullable": true }, "zone": { "type": "string", "x-stoplight": { "id": "p32eix6l65ka4" }, "nullable": true }, "notes": { "type": "string", "x-stoplight": { "id": "rq1csqrap8fr" }, "nullable": true }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "qsgspqzxb3fgo" }, "nullable": true }, "state": { "$ref": "#/components/schemas/OrderState" }, "editable": { "type": "boolean", "x-stoplight": { "id": "118ydqcue5lua" }, "readOnly": true }, "geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "9jtzn85f51ol4" }, "nullable": true }, "default_digital_ticket_view": { "type": "boolean", "default": false, "x-stoplight": { "id": "ddtv6ordnested" }, "description": "Use the default digital ticket view for jobs in this order" } } } ] }, "Order-Read-Typeahead": { "title": "Order-Read-Typeahead", "x-stoplight": { "id": "ordrtypahead1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "order_id": { "type": "string", "description": "Order friendly identifier", "x-stoplight": { "id": "ordrtypahead2" } } }, "required": [ "order_id" ] } ] }, "Order-Update": { "title": "Order-Update", "x-stoplight": { "id": "lsoxh2kl8k37n" }, "type": "object", "description": "Notes:\n\n- `phase` has been deprecated in favor of `phases` where `\"primary\" == true`\n- Only one associated Phase can be the primary", "properties": { "load_at": { "type": "string", "x-stoplight": { "id": "6k8yem0vgts04" }, "format": "date-time", "description": "Load Start Date & Time." }, "notes": { "type": "string", "x-stoplight": { "id": "c18qdvfhblneo" }, "nullable": true }, "order_notes": { "type": "string", "x-stoplight": { "id": "idrlaqi53msc7" }, "nullable": true }, "quantity": { "type": "number", "x-stoplight": { "id": "ntbw4w5rmc8ok" }, "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "ury9prc633e43" }, "minimum": 1, "maximum": 200 }, "truck_delay": { "type": "integer", "x-stoplight": { "id": "2f653634eoo7k" } }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_id": { "type": "string", "x-stoplight": { "id": "fv5jg1n07vn4c" }, "format": "uuid", "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "ipimuuavkrwpm" }, "format": "uuid", "nullable": true }, "service_id": { "type": "string", "x-stoplight": { "id": "c5palzxpstoan" }, "format": "uuid" }, "project_id": { "type": "string", "x-stoplight": { "id": "rvl2qf5x6lnsv" }, "format": "uuid", "description": "`project_id` can only be changed to a `Project` with the same `account_id` as the `Order`", "nullable": true }, "waypoints": { "x-stoplight": { "id": "pleiiaujt6s2x" }, "type": "array", "items": { "$ref": "#/components/schemas/Waypoint-Update-Destroyable" } }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "940ttl9ywnm3d" }, "format": "uuid", "nullable": true }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "005awfkvl7z4b" }, "format": "uuid", "nullable": true }, "phase": { "$ref": "#/components/schemas/Phase-Update" }, "sales_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "1g6ettyv9i6xm" }, "items": { "x-stoplight": { "id": "l1naou30bol1h" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "dg6ettyv9i6xm" }, "items": { "x-stoplight": { "id": "d1naou30bol1h" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "egywvkf0r0c5m" }, "items": { "x-stoplight": { "id": "e4xiouhw3883d" }, "type": "string", "format": "uuid" } }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "department_id": { "type": "string", "x-stoplight": { "id": "iwi9a0ccp3hqv" }, "format": "uuid", "nullable": true }, "name": { "type": "string", "x-stoplight": { "id": "3zsukpdamj6im" }, "nullable": true }, "po_job_number": { "type": "string", "x-stoplight": { "id": "9fvf51hpxsbek" }, "nullable": true }, "zone": { "type": "string", "x-stoplight": { "id": "c1dhjjh8re08v" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "4lkwxza7m34cf" }, "nullable": true }, "service_class_id": { "type": "string", "x-stoplight": { "id": "c1i3b4rxkl27m" }, "format": "uuid", "nullable": true }, "hauler_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "job_notes": { "type": "string", "x-stoplight": { "id": "91h0y0mdrmwku" }, "nullable": true }, "job_time": { "type": "integer", "x-stoplight": { "id": "xi8wbhu057cjp" }, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "gkfda4fqvb1u6" }, "nullable": true }, "job_quantity": { "type": "number", "x-stoplight": { "id": "vl8si0hzaq7rt" }, "nullable": true }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Update" }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "ar2au0zddmqvh" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "gjctyp63xplnk" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "trucks_per_delay": { "type": "integer", "x-stoplight": { "id": "uyorqf34f86ag" }, "minimum": 1 }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "ifr8c61hhc40d" }, "format": "uuid", "nullable": true }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "fyzo8sfdo7ha8" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "requester_id": { "type": "string", "x-stoplight": { "id": "sz8qn252zf01o" }, "format": "uuid", "nullable": true }, "phases": { "type": "array", "x-stoplight": { "id": "mmnjgjs8v2hcx" }, "items": { "$ref": "#/components/schemas/Phase-Update" } }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "yce54o3o3d0lu" }, "nullable": true }, "pickup_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "p3ftp63lrd6r0" }, "nullable": true }, "dropoff_onsite_minutes": { "type": "integer", "x-stoplight": { "id": "v1pfligq15vot" }, "nullable": true }, "pickup_to_dropoff_time_minutes": { "type": "integer", "x-stoplight": { "id": "clv1s51pf3lpx" }, "nullable": true }, "pickup_to_dropoff_distance_meters": { "type": "number", "x-stoplight": { "id": "l6dwbjcheex05" }, "nullable": true }, "expected_total_loads": { "type": "integer", "x-stoplight": { "id": "63p5bd0te0ef3" }, "nullable": true }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "7w3hflkr5ciny" }, "minimum": 1, "maximum": 25, "nullable": true, "description": "When a value is omitted, the system will set `loads_per_truck` to `1` when the `job_unit_of_measure` is `Load` else it is set to `job_quantity`." }, "requested_quantity_type": { "$ref": "#/components/schemas/NullableRequestedQuantityType" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "22aap8yjtdkxx" } }, "material_rate_site_id": { "type": "string", "x-stoplight": { "id": "vp8jzp9xc64tg" }, "format": "uuid", "nullable": true }, "material_rate_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_rate_sell_price": { "type": "number", "x-stoplight": { "id": "6i5chb58yg8os" }, "nullable": true }, "material_rate_buy_price": { "type": "number", "x-stoplight": { "id": "isoj74jb9v5d4" }, "nullable": true }, "material_rate_itemized": { "type": "boolean", "x-stoplight": { "id": "nejdr3owhut04" } }, "geofence_delay_seconds": { "type": "integer", "x-stoplight": { "id": "mhm3xtjhtz8r8" }, "nullable": true }, "job_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "50dglxocht23t" }, "format": "uuid" }, "internal_notes": { "type": "string", "x-stoplight": { "id": "r6mfahrunm0rz" }, "nullable": true }, "job_start_at": { "type": "string", "x-stoplight": { "id": "ws1o8ae9z46em" }, "format": "date-time", "nullable": true }, "cycle_time_minutes": { "type": "integer", "x-stoplight": { "id": "u7sbficyy85t9" }, "nullable": true }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "s7zpmiyxx1b7i" }, "nullable": true }, "chase_missing_tickets": { "type": "boolean", "x-stoplight": { "id": "yn8r4qka3p9vw" }, "description": "Enable ticket chasing for jobs in this order" }, "tax_rate": { "x-stoplight": { "id": "s7u9w1z3b5e7g" }, "type": "number", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "i9l1n3q5t7v0x" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "z2b4d6g8j0l2o" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "p4r6t8w0y2a4c" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } }, "additionalProperties": false }, "OrderIntakeChannel-Failure-Read": { "title": "OrderIntakeChannel-Failure-Read", "x-stoplight": { "id": "ls8uam34v3e2a" }, "x-internal": true, "type": "object", "properties": { "message": { "type": "string", "x-stoplight": { "id": "xvt11t8bbbg1z" } } }, "additionalProperties": false }, "OrderIntakeChannel-Processing-Read": { "title": "OrderIntakeChannel-Processing-Read", "x-stoplight": { "id": "0tntmp8qcmdim" }, "x-internal": true, "type": "object", "properties": { "message": { "type": "string", "x-stoplight": { "id": "67czery2zhn3g" } } }, "additionalProperties": false }, "OrderIntakeChannel-Read": { "title": "OrderIntakeChannel-Read", "x-stoplight": { "id": "l43kagrgt3a1e" }, "x-internal": true, "allOf": [ { "type": "object", "properties": { "identifier": { "type": "object", "x-stoplight": { "id": "beneqijd823f0" }, "properties": { "id": { "type": "string", "x-stoplight": { "id": "qiqnoib0v3ojj" }, "format": "uuid" } } }, "status": { "x-stoplight": { "id": "dmjx0y4tiwnh3" }, "enum": [ "success", "error", "processing" ] } } }, { "x-stoplight": { "id": "c9kudvb5lw8fw" }, "oneOf": [ { "$ref": "#/components/schemas/OrderIntakeChannel-Failure-Read" }, { "$ref": "#/components/schemas/OrderIntakeChannel-Processing-Read" }, { "$ref": "#/components/schemas/OrderIntakeChannel-Success-Read" } ] } ] }, "OrderIntakeChannel-Success-Read": { "title": "OrderIntakeChannel-Success-Read", "x-stoplight": { "id": "kg7hodqcnz39a" }, "x-internal": true, "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order-Intake-Create" } }, "additionalProperties": false }, "OrderState": { "title": "OrderState", "x-stoplight": { "id": "vns4k5u34s0dg" }, "enum": [ "created", "pending_request", "accepted", "rejected", "in_progress", "completed", "canceled", "hold", "weather_hold" ], "example": "created", "default": "created" }, "OrderStateEvent": { "title": "OrderStateEvent", "x-stoplight": { "id": "1a7ulz2srbdfc" }, "enum": [ "accept", "cancel", "complete", "hold", "reject", "request", "start", "weather_hold" ] }, "OrderSummary-Read-Nested": { "title": "OrderSummary-Read-Nested", "x-stoplight": { "id": "txk79mvoytxze" }, "type": "object", "description": "Additional descriptions\n- `material_gross_unit_of_measure`: The associated unit_of_measure of the `material_gross_delivered_quantity `", "required": [ "accepted_jobs_count", "assigned_jobs_count", "delivered_loads_count", "jobs_count", "loads_count", "sent_jobs_count", "started_jobs_count", "file_attachments_count", "delivered_quantities", "actionable_jobs_count", "approved_loads_count", "approved_payables", "total_payables", "approved_receivables", "total_receivables", "calculated_loads_count", "material_gross_delivered_quantity", "material_gross_ticketed_delivered_quantity", "material_gross_unit_of_measure", "material_gross_requested_quantity", "total_tickets_count", "total_tickets_quantity", "first_load_unloaded_at", "first_ticket_at", "travelled_distance_meters" ], "properties": { "accepted_jobs_count": { "type": "integer", "x-stoplight": { "id": "dmknjnjl1qjcm" } }, "assigned_jobs_count": { "type": "integer", "x-stoplight": { "id": "7n6ecsq78qnxy" } }, "delivered_loads_count": { "type": "integer", "x-stoplight": { "id": "igjm71yhrncpz" } }, "jobs_count": { "type": "integer", "x-stoplight": { "id": "i11zevor4qj3u" } }, "loads_count": { "type": "integer", "x-stoplight": { "id": "4itzje6kdoyvr" } }, "sent_jobs_count": { "type": "integer", "x-stoplight": { "id": "5ljk304jmvxxv" } }, "started_jobs_count": { "type": "integer", "x-stoplight": { "id": "g1pf8ecavu91c" } }, "file_attachments_count": { "type": "integer", "x-stoplight": { "id": "asdf321yz102y" } }, "delivered_quantities": { "type": "array", "x-stoplight": { "id": "tz7t9d6whma7u" }, "items": { "$ref": "#/components/schemas/DeliveredQuantity-Read" } }, "actionable_jobs_count": { "type": "integer", "x-stoplight": { "id": "x92jv1ie9icwm" } }, "approved_loads_count": { "type": "integer", "x-stoplight": { "id": "ynkcps94laab5" } }, "approved_payables": { "type": "integer", "x-stoplight": { "id": "0t0vza2v6z7oj" }, "minimum": 0, "description": "Total number of approved payable invoices associated with the order." }, "total_payables": { "type": "integer", "x-stoplight": { "id": "mbzi3pgp8u1nr" }, "minimum": 0, "description": "Total number of payable invoices associated with the order." }, "approved_receivables": { "type": "integer", "x-stoplight": { "id": "i88d18440drnu" }, "minimum": 0, "description": "Total number of approved receivable invoices associated with the order." }, "total_receivables": { "type": "integer", "x-stoplight": { "id": "3e9vb8qziofmq" }, "minimum": 0, "description": "Total number of receivable invoices associated with the order." }, "calculated_loads_count": { "type": "integer", "x-stoplight": { "id": "qg3v5bidqzwiy" }, "description": "The calculated number of Loads to be delivered for an Order when Order has a per Job capacity", "nullable": true }, "material_gross_delivered_quantity": { "type": "string", "x-stoplight": { "id": "ly9ruqsa2biao" }, "description": "Largest sum of all delivered_quantities.delivered grouped by unit_of_measure", "nullable": true }, "material_gross_ticketed_delivered_quantity": { "type": "string", "x-stoplight": { "id": "ly9rvqsb2bjao" }, "description": "Largest sum of all delivered_quantities.delivered grouped by unit_of_measure where ticketed is true", "nullable": true }, "estimated_delivered_quantity": { "type": "string", "x-stoplight": { "id": "ly9svqtb2cjao" }, "description": "Estimated delivered quantity for the order", "nullable": true }, "estimated_delivered_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_gross_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_gross_requested_quantity": { "type": "string", "x-stoplight": { "id": "wvopfpoio0xwv" }, "description": "The total quantity of Material requested on the Order", "nullable": true }, "total_tickets_count": { "type": "integer", "x-stoplight": { "id": "pfuefmmipsq1v" } }, "total_tickets_quantity": { "type": "string", "x-stoplight": { "id": "zd7xlu6t9ct7c" } }, "first_load_unloaded_at": { "type": "string", "x-stoplight": { "id": "t6dp1fz8z83dy" }, "format": "date-time", "nullable": true }, "first_ticket_at": { "type": "string", "x-stoplight": { "id": "ral0sd1o5qt9p" }, "format": "date-time", "nullable": true }, "travelled_distance_meters": { "type": "string", "x-stoplight": { "id": "td2g7h8i9j0k1" }, "nullable": true } }, "additionalProperties": false }, "OrderTimeline-Read": { "title": "OrderTimeline-Read", "x-stoplight": { "id": "a5t3fhva82o06" }, "type": "object", "required": [ "created_at", "created_by", "object_changes" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by": { "$ref": "#/components/schemas/Principal-Read-Nested" }, "object_changes": { "type": "object" } }, "additionalProperties": false }, "OrderUnitOfMeasure": { "title": "OrderUnitOfMeasure", "x-stoplight": { "id": "kahcgn7w8swdv" }, "enum": [ "Load", "Tonne", "Ton", "Yard", "Meter", "Foot", "Liter", "Hour", "Bushel", "Gallon", "CubicMeter", "Mile", "Kilometer", "Barrel", "Bag", "Pallet" ], "example": "Load" }, "OtpSms-Create": { "title": "OtpSms-Create", "x-stoplight": { "id": "dcxf9hhuegc5q" }, "type": "object", "required": [ "phone" ], "properties": { "phone": { "type": "string", "x-stoplight": { "id": "h2sbeiy3xhoa3" } } }, "additionalProperties": false }, "OtpSms-Login": { "title": "OtpSms-Login", "x-stoplight": { "id": "f3vyx7q96jss2" }, "type": "object", "required": [ "phone_id", "code" ], "properties": { "phone_id": { "type": "string", "x-stoplight": { "id": "tfj4cxwcojurj" } }, "code": { "type": "string", "x-stoplight": { "id": "nu64nbrq17hcv" } } }, "additionalProperties": false }, "OtpSms-Read": { "title": "OtpSms-Read", "x-stoplight": { "id": "57qcip70tiv75" }, "type": "object", "required": [ "phone_id" ], "properties": { "phone_id": { "type": "string", "x-stoplight": { "id": "pr5k9mgthwcsb" } } }, "additionalProperties": false }, "Phase-Assign-Update": { "title": "Phase-Assign-Update", "x-stoplight": { "id": "7tpb9ufqo4ctp" }, "type": "object", "required": [ "phase_id" ], "properties": { "phase_id": { "type": "string", "x-stoplight": { "id": "q6qu288079kcn" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "Phase-Create": { "title": "Phase-Create", "x-stoplight": { "id": "75nmc5yd8h72i" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "d4kcn3t0asc5e" } }, "code": { "type": "string", "x-stoplight": { "id": "yoecopo3whrnu" }, "nullable": true }, "primary": { "type": "boolean", "x-stoplight": { "id": "iwe52gflixegu" } } }, "additionalProperties": false }, "Phase-Read": { "title": "Phase-Read", "x-stoplight": { "id": "t87rtwp61n8ry" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "code", "primary" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "joxj6kldpdok8" } }, "code": { "type": "string", "x-stoplight": { "id": "mtoxuvguckczq" }, "nullable": true }, "primary": { "type": "boolean", "x-stoplight": { "id": "ww6q56py1x5wq" } } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "Phase-Read-Typeahead": { "title": "Phase-Read-Typeahead", "x-stoplight": { "id": "tjfs70n45skps" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "x-stoplight": { "id": "a6hm4eognaiso" }, "type": "object", "required": [ "name", "code" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "ezkzw91o7rfo1" } }, "code": { "type": "string", "x-stoplight": { "id": "7wz335bhaggci" }, "nullable": true } } } ] }, "Phase-Update": { "title": "Phase-Update", "x-stoplight": { "id": "lgcase43scjtx" }, "allOf": [ { "$ref": "#/components/schemas/Destroyable" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "g0k8neezg3x5r" } }, "code": { "type": "string", "x-stoplight": { "id": "1pcdrs26ed1sh" }, "nullable": true }, "primary": { "type": "boolean", "x-stoplight": { "id": "sclf6qb2bu3x2" } } } } ] }, "Principal-Read-Nested": { "title": "Principal-Read-Nested", "x-stoplight": { "id": "oyruvwz2a9ddh" }, "allOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "x-stoplight": { "id": "up9qg59l8x5s0" }, "enum": [ "User", "Company", "M2MClient", "Impersonation" ] } } }, { "x-stoplight": { "id": "lz1m1s1btit0u" }, "anyOf": [ { "$ref": "#/components/schemas/Company-Read-Nested" }, { "$ref": "#/components/schemas/M2MClient-Read-Nested" }, { "$ref": "#/components/schemas/User-Read-Minimal" }, { "$ref": "#/components/schemas/Impersonation-Read-Minimal" } ] } ] }, "Printable": { "title": "Printable", "x-stoplight": { "id": "ha84mxua63ysd" }, "type": "object", "properties": { "ordinality": { "type": "integer", "x-stoplight": { "id": "y2rm2equnu4fz" }, "minimum": 0 }, "visible": { "type": "boolean", "x-stoplight": { "id": "uekpedm5x21mk" } } }, "additionalProperties": false }, "Project-Create": { "title": "Project-Create", "x-stoplight": { "id": "mc6h13scr3vve" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "x00f37nn6fjue" }, "description": "`Project` name, must be unique in the current `Company`" }, "effective_at": { "type": "string", "x-stoplight": { "id": "whfjwjjfk06f7" }, "format": "date-time", "description": "Timestamp of the `Project`'s effective start. Must be less than `expires_at` if `expires_at` is present." }, "expires_at": { "type": "string", "x-stoplight": { "id": "hrnixu5416kga" }, "format": "date-time", "description": "Timestamp of the `Project`'s effective end. Must be greater than `effective_at` if `effective_at` is present." }, "notes": { "type": "string", "x-stoplight": { "id": "y1klh0n6g0q6z" }, "description": "`Project` notes", "nullable": true }, "order_notes": { "type": "string", "x-stoplight": { "id": "ra53mqysfnd37" }, "description": "`Order` notes", "nullable": true }, "job_notes": { "type": "string", "x-stoplight": { "id": "lo5lvytlfbfh7" }, "description": "`Job` notes", "nullable": true }, "internal_notes": { "type": "string", "x-stoplight": { "id": "y87emixsvib8z" }, "description": "`Project` notes", "nullable": true }, "po_job_number": { "type": "string", "x-stoplight": { "id": "g3pngk5arrslf" }, "description": "PO/Job # for `Project`" }, "external_id": { "type": "string", "x-stoplight": { "id": "pwmsqnhu6vebh" }, "description": "External # for `Project`, must be unique in the current `Company`" }, "account_id": { "type": "string", "x-stoplight": { "id": "c7ru4hk340plc" }, "format": "uuid", "description": "`Account` ID. \n\nOne of `account_id` or `account` is required." }, "account": { "$ref": "#/components/schemas/Account-Create" }, "contact": { "$ref": "#/components/schemas/Contact-Create" }, "site_id": { "type": "string", "x-stoplight": { "id": "9mzhmk310z2tg" }, "format": "uuid", "nullable": true }, "company_id": { "type": "string", "x-stoplight": { "id": "7ygjobmwvb440" }, "format": "uuid" }, "phases": { "type": "array", "x-stoplight": { "id": "fa09m8a5b3w41" }, "items": { "$ref": "#/components/schemas/Phase-Create" } }, "project_material_totals": { "type": "array", "x-stoplight": { "id": "plmni6jzbwwbf" }, "items": { "$ref": "#/components/schemas/ProjectMaterialTotal-Create" } }, "sales_contact": { "$ref": "#/components/schemas/Contact-Create" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Create" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Create" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Create" }, "department_id": { "type": "string", "x-stoplight": { "id": "gpzcubrzftd5y" }, "format": "uuid", "nullable": true }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "g70fdfa5uekrj" }, "items": { "x-stoplight": { "id": "ksvg3cav8niz5" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "a70fdfa5uekrj" }, "items": { "x-stoplight": { "id": "bsvg3cav8niz5" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "c70fdfa5uekrj" }, "items": { "x-stoplight": { "id": "csvg3cav8niz5" }, "type": "string", "format": "uuid" } }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "ocoflso00uk96" }, "format": "uuid", "nullable": true }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "6sslnxwb1d0t2" }, "format": "uuid", "nullable": true }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "a3dvzwr72vhbq" }, "format": "uuid", "nullable": true }, "hauler_rate_type": { "type": "string", "nullable": true }, "service_id": { "type": "string", "x-stoplight": { "id": "8jytqfapee321" }, "format": "uuid", "nullable": true }, "service_class_id": { "type": "string", "x-stoplight": { "id": "redhglw9tzkw0" }, "format": "uuid", "nullable": true }, "job_time": { "type": "integer", "x-stoplight": { "id": "4cplr9mqa3d7g" }, "description": "Time in minutes", "nullable": true }, "order_quantity": { "type": "number", "x-stoplight": { "id": "81e5albx14q4u" }, "nullable": true }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "wy1npm222ygzg" }, "format": "uuid", "nullable": true }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "04gb5gkugm6t6" }, "minimum": 1, "maximum": 25, "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "zmb0d2t96cluv" }, "minimum": 1, "maximum": 200, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "w8rt161hyhlat" }, "nullable": true }, "job_quantity": { "type": "number", "x-stoplight": { "id": "nn6dwos93bxex" }, "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "s0593yl6a7cyk" }, "items": { "$ref": "#/components/schemas/Waypoint-Create" } }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "spnm2injq37ro" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "3iot48nwjdt2c" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "yig9ta99pt0fs" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "requester_id": { "type": "string", "x-stoplight": { "id": "hy11rdxvs6b4c" }, "format": "uuid", "nullable": true }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "h3u9e04snsaka" }, "nullable": true }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Create" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "gwgkvcwpd06wg" } }, "order_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "job_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "0h5w52svbemhc" }, "nullable": true }, "chase_missing_tickets": { "type": "boolean", "x-stoplight": { "id": "a7bmn9xt4kq2h" }, "description": "Enable ticket chasing for jobs in orders with this project" }, "default_digital_ticket_view": { "type": "boolean", "default": false, "x-stoplight": { "id": "ddtv3prjcreate" }, "description": "Use the default digital ticket view for orders in this project" }, "tax_rate": { "x-stoplight": { "id": "t7k2m9p4r1v3x" }, "type": "number", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "w8n3q5s6u2y4b" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "j1f4h6k8m0p2r" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "c3e5g7i9l1n3q" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } }, "additionalProperties": false }, "Project-Read": { "title": "Project-Read", "x-stoplight": { "id": "4p869ign045x0" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "gfks0fnwa815x" }, "required": [ "expires_at", "effective_at", "name", "notes", "order_notes", "job_notes", "internal_notes", "po_job_number", "external_id", "state", "project_id", "company", "account", "phases", "project_material_totals", "foremen", "collaborators", "salespeople", "hauler_rate_type", "job_time", "order_quantity", "loads_per_truck", "truck_count", "units_per_hour", "job_quantity", "customer_rate_value", "customer_rate_type", "vendor_rate_value", "vendor_rate_type", "driver_rate_value", "driver_rate_type", "equipment_type_gross_capacity", "load_unit_of_measure", "job_unit_of_measure", "order_unit_of_measure", "recurring_loads", "equipment_type_gross_capacity_unit_of_measure", "charge_to_account", "chase_missing_tickets", "tax_rate", "tax_freight", "tax_material", "tax_add_ons" ], "properties": { "expires_at": { "type": "string", "x-stoplight": { "id": "ypo4xculi788q" }, "nullable": true }, "effective_at": { "type": "string", "x-stoplight": { "id": "fcnvg73e1j3v8" }, "nullable": true }, "name": { "type": "string", "x-stoplight": { "id": "tld4cn3fzcmf3" } }, "notes": { "type": "string", "x-stoplight": { "id": "vuyc4o4l7g54t" }, "nullable": true }, "order_notes": { "type": "string", "x-stoplight": { "id": "5hb0rlyvc15ao" }, "nullable": true }, "job_notes": { "type": "string", "x-stoplight": { "id": "qh5hnt19uq4wm" }, "nullable": true }, "internal_notes": { "type": "string", "x-stoplight": { "id": "s2osoxby50u29" }, "nullable": true }, "po_job_number": { "type": "string", "x-stoplight": { "id": "ty2kf0ueaq3sw" }, "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "q22ozbvyys81t" }, "nullable": true }, "state": { "$ref": "#/components/schemas/ProjectState" }, "project_id": { "type": "string", "x-stoplight": { "id": "v0vird4qt9luv" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "phases": { "type": "array", "x-stoplight": { "id": "v7naa00rm6sdg" }, "items": { "$ref": "#/components/schemas/Phase-Read" } }, "project_material_totals": { "type": "array", "x-stoplight": { "id": "mhaw3k0gg8icd" }, "items": { "$ref": "#/components/schemas/ProjectMaterialTotal-Read" } }, "foremen": { "type": "array", "x-stoplight": { "id": "bln4zo5e9k0cz" }, "items": { "$ref": "#/components/schemas/Foreman-Read-Nested" } }, "collaborators": { "type": "array", "x-stoplight": { "id": "cln4zo5e9k0cz" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "salespeople": { "type": "array", "x-stoplight": { "id": "zzz4zo5e9k0cz" }, "items": { "$ref": "#/components/schemas/User-Read-Nested" } }, "sales_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "department": { "$ref": "#/components/schemas/Department-Read-Nested" }, "customer_rate": { "x-stoplight": { "id": "hv0x4x84xjhgv" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "vendor_rate": { "x-stoplight": { "id": "zqw55oqzxbjcf" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "driver_rate": { "x-stoplight": { "id": "qrkqbxhb0691m" }, "anyOf": [ { "$ref": "#/components/schemas/RateTime-Read-Nested" }, { "$ref": "#/components/schemas/RatePerUnit-Read-Nested" }, { "$ref": "#/components/schemas/RateCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatCommission-Read-Nested" }, { "$ref": "#/components/schemas/RateFlatRate-Read-Nested" } ] }, "hauler_rate_type": { "type": "string", "nullable": true }, "service": { "$ref": "#/components/schemas/Service-Read-Nested" }, "service_class": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" }, "job_time": { "type": "integer", "x-stoplight": { "id": "bpeck1k9rmjb3" }, "nullable": true }, "order_quantity": { "type": "string", "x-stoplight": { "id": "bn2qwdatmex3n" }, "nullable": true }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "xdjk8r7yzz2jz" }, "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "p54rz53gbe36g" }, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "h4kh0tcu82ni0" }, "nullable": true }, "job_quantity": { "type": "string", "x-stoplight": { "id": "rkr9r14aihvjs" }, "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "dwje8rido05xg" }, "items": { "$ref": "#/components/schemas/Waypoint-Read-Nested" } }, "customer_rate_value": { "type": "string", "x-stoplight": { "id": "syjmuphzgurad" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "string", "x-stoplight": { "id": "yhuvkn7bmgb6x" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate_value": { "type": "string", "x-stoplight": { "id": "kirj1xga7eraa" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "requester": { "$ref": "#/components/schemas/User-Read-Nested" }, "equipment_type_gross_capacity": { "type": "string", "x-stoplight": { "id": "mad4zg9xtr51h" }, "nullable": true }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Read-Nested" }, "job_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "order_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "ahlw8o6o6riym" } }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "1roxm3r1g2kdb" }, "nullable": true }, "chase_missing_tickets": { "type": "boolean", "x-stoplight": { "id": "c5wkp8dn6jl9r" }, "description": "Enable ticket chasing for jobs in orders with this project" }, "default_digital_ticket_view": { "type": "boolean", "default": false, "x-stoplight": { "id": "ddtv4prjread00" }, "description": "Use the default digital ticket view for orders in this project" }, "tax_rate": { "x-stoplight": { "id": "d5x8a2f4h6k9n" }, "type": "string", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "p1r3t5v7y9b2d" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "e4g6i8l0n2q4s" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "u6w8z0c2f4h7j" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } } } ], "description": "Read model for `Project`" }, "Project-Read-Nested": { "title": "Project-Read-Nested", "x-stoplight": { "id": "9ene929zmvaog" }, "allOf": [ { "$ref": "#/components/schemas/Project-Read-Typeahead" }, { "type": "object", "x-stoplight": { "id": "8t1ly6sefwmit" }, "required": [ "po_job_number", "internal_notes", "job_notes", "notes", "order_notes" ], "properties": { "po_job_number": { "type": "string", "x-stoplight": { "id": "w5ajmms5o1rjq" }, "nullable": true }, "internal_notes": { "type": "string", "x-stoplight": { "id": "3hbaltdu1u159" }, "nullable": true }, "job_notes": { "type": "string", "x-stoplight": { "id": "fupx5op0cmel2" }, "nullable": true }, "notes": { "type": "string", "x-stoplight": { "id": "96qr64lmtj36s" }, "nullable": true }, "order_notes": { "type": "string", "x-stoplight": { "id": "o38gpshallijh" }, "nullable": true } } } ] }, "Project-Read-Typeahead": { "title": "Project-Read-Typeahead", "x-stoplight": { "id": "3wdg6ghyvsknb" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "external_id" ], "properties": { "name": { "type": "string", "description": "Project name" }, "external_id": { "type": "string", "x-stoplight": { "id": "7kipqxvhrgvk0" }, "nullable": true } } } ] }, "Project-Read-Typeahead-External-Id": { "title": "Project-Read-Typeahead-External-Id", "x-stoplight": { "id": "z971jcl3xeyog" }, "type": "object", "properties": { "external_id": { "type": "string", "x-stoplight": { "id": "dkivyg6fju70u" } } }, "additionalProperties": false }, "Project-Update": { "title": "Project-Update", "x-stoplight": { "id": "w6ef8ajo94tmy" }, "type": "object", "description": "Update model for `Project`", "properties": { "name": { "type": "string", "x-stoplight": { "id": "rt38c7hf2wah2" } }, "effective_at": { "type": "string", "x-stoplight": { "id": "dpf2oa6dcbnmo" }, "format": "date-time" }, "expires_at": { "type": "string", "x-stoplight": { "id": "b5oxhoxyy1nq3" }, "format": "date-time" }, "notes": { "type": "string", "x-stoplight": { "id": "097mhtyu3j7ii" } }, "order_notes": { "type": "string", "x-stoplight": { "id": "0yo9ldqjd4rkp" } }, "job_notes": { "type": "string", "x-stoplight": { "id": "lajxn21wirg9m" } }, "internal_notes": { "type": "string", "x-stoplight": { "id": "mhmknc572dn37" } }, "po_job_number": { "type": "string", "x-stoplight": { "id": "mbs160z33u1zi" } }, "external_id": { "type": "string", "x-stoplight": { "id": "bfzknx3gbg6ca" } }, "contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "site_id": { "type": "string", "x-stoplight": { "id": "9o9vcffwttopr" }, "format": "uuid", "nullable": true }, "phases": { "type": "array", "x-stoplight": { "id": "exk04m9rzh9vz" }, "items": { "$ref": "#/components/schemas/Phase-Update" } }, "project_material_totals": { "type": "array", "x-stoplight": { "id": "d7pfypw0q88op" }, "items": { "$ref": "#/components/schemas/ProjectMaterialTotal-Update" } }, "sales_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "foreman_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "supervisor_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "collaborator_contact": { "$ref": "#/components/schemas/Contact-Update-Destroyable" }, "department_id": { "type": "string", "x-stoplight": { "id": "18me4hu0bc9cg" }, "format": "uuid", "nullable": true }, "foreman_ids": { "type": "array", "x-stoplight": { "id": "thsrda7uexm0r" }, "items": { "x-stoplight": { "id": "bffcleazsy2tk" }, "type": "string", "format": "uuid" } }, "collaborator_ids": { "type": "array", "x-stoplight": { "id": "dhsrda7uexm0r" }, "items": { "x-stoplight": { "id": "dffcleazsy2tk" }, "type": "string", "format": "uuid" } }, "salesperson_ids": { "type": "array", "x-stoplight": { "id": "ehsrda7uexm0r" }, "items": { "x-stoplight": { "id": "effcleazsy2tk" }, "type": "string", "format": "uuid" } }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "yy80qnnd0xnax" }, "format": "uuid", "nullable": true }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "064ra6tiiw0bh" }, "format": "uuid", "nullable": true }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "gxx9xr0kq1ugm" }, "format": "uuid", "nullable": true }, "hauler_rate_type": { "type": "string", "nullable": true }, "service_id": { "type": "string", "x-stoplight": { "id": "g8s1np3b7x78b" }, "format": "uuid", "nullable": true }, "service_class_id": { "type": "string", "x-stoplight": { "id": "3muh1cuh7j6xm" }, "format": "uuid", "nullable": true }, "job_time": { "type": "integer", "x-stoplight": { "id": "c0hb9xuilaqkr" }, "description": "Time in minutes", "nullable": true }, "order_quantity": { "type": "number", "x-stoplight": { "id": "8p2o6qmq5bcd5" }, "nullable": true }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "44c24uspwria0" }, "format": "uuid", "nullable": true }, "loads_per_truck": { "type": "integer", "x-stoplight": { "id": "4v0ygr6efo8iv" }, "minimum": 1, "maximum": 25, "nullable": true }, "truck_count": { "type": "integer", "x-stoplight": { "id": "provaq6kvfk05" }, "minimum": 1, "maximum": 200, "nullable": true }, "units_per_hour": { "type": "integer", "x-stoplight": { "id": "rzl1pw7wbtxyw" }, "nullable": true }, "job_quantity": { "type": "number", "x-stoplight": { "id": "o8djzy8k4kevi" }, "nullable": true }, "waypoints": { "type": "array", "x-stoplight": { "id": "josxokq5eb4r2" }, "items": { "$ref": "#/components/schemas/Waypoint-Update-Destroyable" } }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "itdg9pkmxt48m" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "44kqco2xivvvl" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "xxipwpkxca7uc" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "requester_id": { "type": "string", "x-stoplight": { "id": "0etw0h40kd2hh" }, "nullable": true }, "equipment_type_gross_capacity": { "type": "number", "x-stoplight": { "id": "9jhpl8sc51thg" }, "nullable": true }, "equipment_type_gross_capacity_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "load_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "dispatch_number": { "$ref": "#/components/schemas/DispatchNumber-Update" }, "order_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "job_unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "recurring_loads": { "type": "boolean", "x-stoplight": { "id": "8l9rf7qqp8ozc" } }, "charge_to_account": { "type": "string", "x-stoplight": { "id": "wwkfd3i22zwn1" }, "nullable": true }, "chase_missing_tickets": { "type": "boolean", "x-stoplight": { "id": "z9pqm2vx5tn7k" }, "description": "Enable ticket chasing for jobs in orders with this project" }, "default_digital_ticket_view": { "type": "boolean", "default": false, "x-stoplight": { "id": "ddtv5prjupdate" }, "description": "Use the default digital ticket view for orders in this project" }, "tax_rate": { "x-stoplight": { "id": "m9p1r3t5w7y0b" }, "type": "number", "nullable": true, "description": "Tax rate percentage (up to 4 decimal places)" }, "tax_freight": { "x-stoplight": { "id": "a2c4e6g8j0l2n" }, "type": "boolean", "default": false, "description": "Whether freight line items and FSC are taxable" }, "tax_material": { "x-stoplight": { "id": "q4s6u8w0z2b4d" }, "type": "boolean", "default": false, "description": "Whether material line items are taxable" }, "tax_add_ons": { "x-stoplight": { "id": "f6h8k0m2p4r6t" }, "type": "boolean", "default": false, "description": "Whether add-on charges are taxable (dual-confirm with add_on.taxable)" } }, "additionalProperties": false }, "ProjectMaterialTotal-Create": { "title": "ProjectMaterialTotal-Create", "x-stoplight": { "id": "g2el0av3jk3d1" }, "type": "object", "required": [ "material_id" ], "properties": { "total_quantity": { "type": "number", "x-stoplight": { "id": "78crmrexv0wqh" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_id": { "type": "string", "x-stoplight": { "id": "mklew23hjga8c" }, "format": "uuid" } }, "additionalProperties": false }, "ProjectMaterialTotal-Read": { "title": "ProjectMaterialTotal-Read", "x-stoplight": { "id": "fesdm0wakcpf5" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "total_quantity", "unit_of_measure", "material" ], "properties": { "total_quantity": { "type": "string", "x-stoplight": { "id": "1pwkfmzchwx3b" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "ProjectMaterialTotal-Update": { "title": "ProjectMaterialTotal-Update", "x-stoplight": { "id": "kphqetbkjj31b" }, "allOf": [ { "$ref": "#/components/schemas/Destroyable" }, { "type": "object", "properties": { "total_quantity": { "type": "number", "x-stoplight": { "id": "ydpgbfqh1oy39" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "material_id": { "type": "string", "x-stoplight": { "id": "bcx5tne2na6ho" }, "format": "uuid" } } } ] }, "ProjectState": { "title": "ProjectState", "x-stoplight": { "id": "ro1rcsiogqrmt" }, "enum": [ "active", "inactive" ], "example": "active", "default": "active" }, "ProjectStateEvent": { "title": "ProjectStateEvent", "x-stoplight": { "id": "1a8ulz2srbdfc" }, "enum": [ "activate", "deactivate" ] }, "QuantityUnit": { "title": "QuantityUnit", "x-stoplight": { "id": "c6w3qflofaihr" }, "type": "object", "required": [ "quantity", "unit_of_measure" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "xf9z9w59yb0cv" } }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" } }, "x-internal": true, "additionalProperties": false }, "Radii-Read-Nested": { "title": "Radii-Read-Nested", "x-stoplight": { "id": "ly6sm0c8t4pyb" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "ho0uakpcggx2p" }, "required": [ "radius_meters" ], "properties": { "radius_meters": { "type": "number", "x-stoplight": { "id": "gw6qtcobk2y84" } }, "site_id": { "type": "string", "x-stoplight": { "id": "fudag8xqdf288" }, "format": "uuid" } } } ] }, "Rate-CalculateCost-Request": { "title": "Rate-CalculateCost-Request", "x-stoplight": { "id": "bjyq2ixa02pwt" }, "type": "object", "required": [ "estimated_hours", "order_quantity", "order_unit_of_measure", "customer_rate_id", "vendor_rate_id" ], "properties": { "estimated_hours": { "type": "number", "x-stoplight": { "id": "czi9umggv758s" }, "minimum": 0 }, "order_quantity": { "type": "number", "x-stoplight": { "id": "jmcq14ot2rsz6" }, "minimum": 0 }, "order_unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "c2cw63vbm81gy" }, "format": "uuid" }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "i0abslp5dhqox" }, "format": "uuid" }, "truck_count": { "type": "number", "x-stoplight": { "id": "gvnu0azkxrb5w" } } }, "additionalProperties": false }, "Rate-CalculateCost-Response": { "title": "Rate-CalculateCost-Response", "x-stoplight": { "id": "6xcaob4yiw42c" }, "type": "object", "required": [ "customer_cost", "vendor_cost", "cost_margin" ], "properties": { "customer_cost": { "type": "number", "x-stoplight": { "id": "gqxe1ila2oc3y" } }, "vendor_cost": { "type": "number", "x-stoplight": { "id": "pt7rs2p6czrd9" } }, "cost_margin": { "type": "number", "x-stoplight": { "id": "ks8g2m46botxu" } } }, "additionalProperties": false }, "Rate-Copy": { "title": "Rate-Copy", "x-stoplight": { "id": "u7ct7zlokfp11" }, "type": "object", "properties": { "account_id": { "type": "string", "x-stoplight": { "id": "8v6cz6hexzwwt" }, "format": "uuid" }, "project_ids": { "type": "array", "x-stoplight": { "id": "da1q6tvvosx8m" }, "items": { "x-stoplight": { "id": "0747bgy4rmknl" }, "type": "string", "format": "uuid" } }, "service_ids": { "type": "array", "x-stoplight": { "id": "3ths2dkcsdita" }, "items": { "x-stoplight": { "id": "477515v91vj17" }, "type": "string", "format": "uuid" } }, "equipment_ids": { "type": "array", "x-stoplight": { "id": "vhsd46tayhys0" }, "items": { "x-stoplight": { "id": "d35exjwg4b468" }, "type": "string", "format": "uuid" } }, "name": { "type": "string", "x-stoplight": { "id": "mruul1yxhygxo" } }, "driver_id": { "type": "string", "x-stoplight": { "id": "agjof6mvwpyh0" }, "format": "uuid" }, "service_class_id": { "type": "string", "x-stoplight": { "id": "i28le4bssdo2t" }, "format": "uuid", "nullable": true }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "ou0tpiez1dz0k" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "Rate-Create": { "title": "Rate-Create", "x-stoplight": { "id": "ey189jfc035yx" }, "type": "object", "description": "Base model for Rate creation. Do not use this directly, instead use the submodels.", "required": [ "name", "type", "company_id" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "srgudka21ny4g" } }, "type": { "$ref": "#/components/schemas/RateType" }, "company_id": { "type": "string", "x-stoplight": { "id": "uowe3b3376s9p" }, "format": "uuid" }, "account_id": { "type": "string", "x-stoplight": { "id": "j0pp534586kk0" }, "format": "uuid" }, "account_type": { "$ref": "#/components/schemas/AccountType" }, "primary": { "type": "boolean", "x-stoplight": { "id": "z1uksxa93pqkd" } }, "fuel_surcharge_enabled": { "type": "boolean", "x-stoplight": { "id": "z1fxwpl4o6oey" } }, "project_ids": { "type": "array", "x-stoplight": { "id": "m09k5l03buzd4" }, "items": { "x-stoplight": { "id": "9uxgb1nz0jdzf" }, "type": "string", "format": "uuid" } }, "service_ids": { "type": "array", "x-stoplight": { "id": "j7jlfwkkekxwk" }, "items": { "x-stoplight": { "id": "1wrzt3xewrood" }, "type": "string", "format": "uuid" } }, "equipment_ids": { "type": "array", "x-stoplight": { "id": "iiwe368q7adeu" }, "items": { "x-stoplight": { "id": "levapkrql3015" }, "type": "string", "format": "uuid" } }, "owner_type": { "$ref": "#/components/schemas/RateOwnerType" }, "driver_id": { "type": "string", "x-stoplight": { "id": "f6sdtrc1r8k22" }, "format": "uuid" }, "add_on_ids": { "type": "array", "x-stoplight": { "id": "7oy5jkv3okatc" }, "items": { "x-stoplight": { "id": "sxhtexo530s5r" }, "type": "string", "format": "uuid" } }, "service_class_id": { "type": "string", "x-stoplight": { "id": "z2113gnlbuu0j" }, "format": "uuid", "nullable": true }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "90dzbwkoix3xr" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "Rate-Read": { "title": "Rate-Read", "x-stoplight": { "id": "de0evm1n01ovt" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type", "company", "primary", "fuel_surcharge_enabled", "projects", "services", "equipment", "owner_type", "add_ons" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "68v64b4h4savn" } }, "type": { "$ref": "#/components/schemas/RateType" }, "account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "account_type": { "$ref": "#/components/schemas/AccountType" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "primary": { "type": "boolean", "x-stoplight": { "id": "5zm8fs03fcx5f" } }, "fuel_surcharge_enabled": { "type": "boolean", "x-stoplight": { "id": "p2gy698ydj5z6" } }, "projects": { "type": "array", "x-stoplight": { "id": "l3jrum5n4f1kj" }, "items": { "$ref": "#/components/schemas/Project-Read-Nested" } }, "services": { "type": "array", "x-stoplight": { "id": "c6hzbddhsct1v" }, "items": { "$ref": "#/components/schemas/Service-Read-Nested" } }, "equipment": { "type": "array", "x-stoplight": { "id": "32sh55sr2mob0" }, "items": { "$ref": "#/components/schemas/Equipment-Read-Nested" } }, "owner_type": { "$ref": "#/components/schemas/RateOwnerType" }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "add_ons": { "type": "array", "x-stoplight": { "id": "6jf0xn2k0obg9" }, "items": { "$ref": "#/components/schemas/AddOn-Read-Nested" } }, "service_class": { "$ref": "#/components/schemas/ServiceClass-Read-Nested" }, "equipment_type": { "$ref": "#/components/schemas/EquipmentType-Read-Nested" } } } ], "description": "Base model for Rates. Do not use this directly, instead use the submodels." }, "Rate-Read-Nested": { "title": "Rate-Read-Nested", "x-stoplight": { "id": "1e88o8oi36nft" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "zj6ioiudweh1e" } }, "type": { "$ref": "#/components/schemas/RateType" } } } ] }, "Rate-Update": { "title": "Rate-Update", "x-stoplight": { "id": "x9582iknlyvs0" }, "type": "object", "required": [ "type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "yi7lw3jm093f8" } }, "account_id": { "type": "string", "x-stoplight": { "id": "xz4ij3efpqr0w" }, "format": "uuid", "nullable": true }, "account_type": { "$ref": "#/components/schemas/AccountType" }, "type": { "$ref": "#/components/schemas/RateType" }, "primary": { "type": "boolean", "x-stoplight": { "id": "yjb6s5cj84ooh" } }, "fuel_surcharge_enabled": { "type": "boolean", "x-stoplight": { "id": "y8e2mf3vmwwm4" } }, "project_ids": { "type": "array", "x-stoplight": { "id": "6xzaadxfufwzt" }, "items": { "x-stoplight": { "id": "j5xo2z992omby" }, "type": "string", "format": "uuid" } }, "service_ids": { "type": "array", "x-stoplight": { "id": "c8p14qi60sdy1" }, "items": { "x-stoplight": { "id": "tt6wr3qtpfufj" }, "type": "string", "format": "uuid" } }, "equipment_ids": { "type": "array", "x-stoplight": { "id": "nx7b5cvekj76i" }, "items": { "x-stoplight": { "id": "cky3e458xvq4r" }, "type": "string", "format": "uuid" } }, "add_on_ids": { "type": "array", "x-stoplight": { "id": "xyndb41h44f7k" }, "items": { "x-stoplight": { "id": "7wuj60bmzk3mm" }, "type": "string", "format": "uuid" } }, "service_class_id": { "type": "string", "x-stoplight": { "id": "82v15dt17p7hk" }, "format": "uuid", "nullable": true }, "equipment_type_id": { "type": "string", "x-stoplight": { "id": "ny113ky5pjd2w" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "RateCommission-Create": { "title": "RateCommission-Create", "x-stoplight": { "id": "r7b823x0dbrya" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Create" }, { "type": "object", "properties": { "commission_percentage": { "type": "integer", "x-stoplight": { "id": "jtg6f9bp4j1p5" }, "minimum": 0, "maximum": 100 } }, "required": [ "commission_percentage" ] } ] }, "RateCommission-Read": { "title": "RateCommission-Read", "x-stoplight": { "id": "ugvgjhdxqi406" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Read" }, { "type": "object", "properties": { "commission_percentage": { "type": "number", "x-stoplight": { "id": "ugu95q3secjrp" } } }, "required": [ "commission_percentage" ] } ] }, "RateCommission-Read-Nested": { "title": "RateCommission-Read-Nested", "x-stoplight": { "id": "rfosxiu0rajbx" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type", "commission_percentage" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "uquhf0pc3ydpf" } }, "type": { "$ref": "#/components/schemas/RateType" }, "commission_percentage": { "type": "number", "x-stoplight": { "id": "44e2kldfzbxdj" } } } } ] }, "RateCommission-Update": { "title": "RateCommission-Update", "x-stoplight": { "id": "8gvd1mp7vbbpn" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Update" }, { "type": "object", "properties": { "commission_percentage": { "type": "integer", "x-stoplight": { "id": "uj5x1tqf91f5f" }, "minimum": 0, "maximum": 100 } } } ] }, "RateFlatCommission-Create": { "title": "RateFlatCommission-Create", "x-stoplight": { "id": "r0dzxtipe2bod" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Create" }, { "type": "object", "required": [ "commission_amount" ], "properties": { "commission_amount": { "type": "number", "x-stoplight": { "id": "705il528fb4tl" } } } } ] }, "RateFlatCommission-Read": { "title": "RateFlatCommission-Read", "x-stoplight": { "id": "y8p7jejeqgai5" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Read" }, { "type": "object", "required": [ "commission_amount" ], "properties": { "commission_amount": { "type": "number", "x-stoplight": { "id": "ozl726ux4vu1t" } } } } ] }, "RateFlatCommission-Read-Nested": { "title": "RateFlatCommission-Read-Nested", "x-stoplight": { "id": "wtdgoiw8tlpl3" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type", "commission_amount" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "yt5g1alyyd6fu" } }, "type": { "$ref": "#/components/schemas/RateType" }, "commission_amount": { "type": "number", "x-stoplight": { "id": "14a1jkho85lpw" } } } } ] }, "RateFlatCommission-Update": { "title": "RateFlatCommission-Update", "x-stoplight": { "id": "i0onyjc00une4" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Update" }, { "type": "object", "required": [ "commission_amount" ], "properties": { "commission_amount": { "type": "number", "x-stoplight": { "id": "zrxd9mucgbrx9" } } } } ] }, "RateFlatRate-Create": { "title": "RateFlatRate-Create", "x-stoplight": { "id": "bi41h0yvhqwml" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Create" }, { "type": "object", "x-stoplight": { "id": "d0tgmqzt7nmak" }, "required": [ "flat_amount" ], "properties": { "flat_amount": { "type": "number", "x-stoplight": { "id": "ztu2zj17kq7g4" } } } } ] }, "RateFlatRate-Read": { "title": "RateFlatRate-Read", "x-stoplight": { "id": "cchfdcn2nogj4" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Read" }, { "type": "object", "x-stoplight": { "id": "k6s97jfyyal9x" }, "required": [ "flat_amount" ], "properties": { "flat_amount": { "type": "number", "x-stoplight": { "id": "lbps3g0gciclk" } } } } ] }, "RateFlatRate-Read-Nested": { "title": "RateFlatRate-Read-Nested", "x-stoplight": { "id": "l2to0mrxz6ndu" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "khly9g5a3tgap" }, "required": [ "name", "type", "flat_amount" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "0h0s2w3tathgv" } }, "type": { "$ref": "#/components/schemas/RateType" }, "flat_amount": { "type": "number", "x-stoplight": { "id": "3s2pycb09j6ph" } } } } ] }, "RateFlatRate-Update": { "title": "RateFlatRate-Update", "x-stoplight": { "id": "klq2nxyx195df" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Update" }, { "type": "object", "x-stoplight": { "id": "5q4vb43e671cm" }, "properties": { "flat_amount": { "type": "number", "x-stoplight": { "id": "s5yq8fs9c6wdh" } } } } ] }, "RateOwnerType": { "title": "RateOwnerType", "x-stoplight": { "id": "zwp4uh4rzdpft" }, "enum": [ "customer", "vendor", "driver" ], "default": "driver", "example": "driver" }, "RatePerUnit-Create": { "title": "RatePerUnit-Create", "x-stoplight": { "id": "p80fzlxo5rb8i" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Create" }, { "type": "object", "properties": { "unit_rate": { "type": "number", "x-stoplight": { "id": "tz33b5rkc4zay" }, "minimum": 0 }, "unit_minimum": { "type": "number", "x-stoplight": { "id": "sx2nbei12sw4h" }, "minimum": 0 }, "unit_increment": { "type": "number", "x-stoplight": { "id": "b8k87xfjxr9up" }, "minimum": 0 } }, "required": [ "unit_rate", "unit_minimum", "unit_increment" ] } ] }, "RatePerUnit-Read": { "title": "RatePerUnit-Read", "x-stoplight": { "id": "h49e4lb1d9qjn" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Read" }, { "type": "object", "properties": { "unit_rate": { "type": "number", "x-stoplight": { "id": "jhif8pzx75v63" }, "minimum": 0 }, "unit_minimum": { "type": "number", "x-stoplight": { "id": "ecwq9vr2oiz49" }, "minimum": 0 }, "unit_increment": { "type": "number", "x-stoplight": { "id": "9d7hhgo8jh9io" }, "minimum": 0 } }, "required": [ "unit_rate", "unit_minimum", "unit_increment" ] } ] }, "RatePerUnit-Read-Nested": { "title": "RatePerUnit-Read-Nested", "x-stoplight": { "id": "5kl2dre6otz74" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type", "unit_rate" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "7wb8p1ffoz1wz" } }, "type": { "$ref": "#/components/schemas/RateType" }, "unit_rate": { "type": "number", "x-stoplight": { "id": "szqf3p2vkmb0x" } } } } ] }, "RatePerUnit-Update": { "title": "RatePerUnit-Update", "x-stoplight": { "id": "b0xt7o23deaup" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Update" }, { "type": "object", "properties": { "unit_rate": { "type": "number", "x-stoplight": { "id": "1gpd7qu3hrb4q" }, "minimum": 0 }, "unit_minimum": { "type": "number", "x-stoplight": { "id": "m945zge67fnkt" }, "minimum": 0 }, "unit_increment": { "type": "number", "x-stoplight": { "id": "ys0qocfarn75c" }, "minimum": 0 } } } ] }, "RateTime-Create": { "title": "RateTime-Create", "x-stoplight": { "id": "g82io4nxe4j1d" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Create" }, { "type": "object", "properties": { "time_rate": { "type": "number", "x-stoplight": { "id": "iabt3nn8mvvyn" }, "minimum": 0 }, "time_minimum_minutes": { "type": "integer", "x-stoplight": { "id": "23j071n4sh53k" }, "minimum": 0 }, "time_increment_minutes": { "type": "integer", "x-stoplight": { "id": "ddop6jlcd75w9" }, "minimum": 0 } }, "required": [ "time_rate", "time_minimum_minutes", "time_increment_minutes" ] } ] }, "RateTime-Read": { "title": "RateTime-Read", "x-stoplight": { "id": "gsz4jl8ws70ac" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Read" }, { "type": "object", "properties": { "time_rate": { "type": "number", "x-stoplight": { "id": "77ouycjgsbisl" }, "minimum": 0 }, "time_minimum_minutes": { "type": "integer", "x-stoplight": { "id": "dknkfroav5bqj" }, "minimum": 0 }, "time_increment_minutes": { "type": "integer", "x-stoplight": { "id": "ds1s0ub4319lh" }, "minimum": 0 } }, "required": [ "time_rate", "time_minimum_minutes", "time_increment_minutes" ] } ] }, "RateTime-Read-Nested": { "title": "RateTime-Read-Nested", "x-stoplight": { "id": "k3z13rbtdojcq" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type", "time_rate" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "s5zmmpgpw8ykn" } }, "type": { "$ref": "#/components/schemas/RateType" }, "time_rate": { "type": "number", "x-stoplight": { "id": "yzbg76z9oflup" } } } } ] }, "RateTime-Update": { "title": "RateTime-Update", "x-stoplight": { "id": "ktut5amjh4bv6" }, "allOf": [ { "$ref": "#/components/schemas/Rate-Update" }, { "type": "object", "properties": { "time_rate": { "type": "number", "x-stoplight": { "id": "utv13n0084nrz" }, "minimum": 0 }, "time_minimum_minutes": { "type": "integer", "x-stoplight": { "id": "ct1pxlkvgk0ll" }, "minimum": 0 }, "time_increment_minutes": { "type": "integer", "x-stoplight": { "id": "8ltktqwz1e1h3" }, "minimum": 0 } } } ] }, "RateTimeAndPerUnit-Create": { "title": "RateTimeAndPerUnit-Create", "x-stoplight": { "id": "9byn46fdvhxt2" }, "allOf": [ { "$ref": "#/components/schemas/RateTime-Create" }, { "$ref": "#/components/schemas/RatePerUnit-Create" } ] }, "RateTimeUnit": { "title": "RateTimeUnit", "x-stoplight": { "id": "sfaqnylrwldqj" }, "enum": [ "hourly", "daily" ], "example": "hourly" }, "RateType": { "title": "RateType", "x-stoplight": { "id": "zn2jb7gsifkk3" }, "enum": [ "RatePerHour", "RatePerDay", "RatePerLoad", "RatePerTon", "RatePerTonne", "RatePerYard", "RatePerBushel", "RateCommission", "RateFlatCommission", "RateFlatRate" ], "example": "RatePerHour" }, "RebillSettlementInvoiceRate-Update": { "title": "RebillSettlementInvoiceRate-Update", "x-stoplight": { "id": "z1oupofi6nf99" }, "type": "object", "required": [ "invoice_id", "rebill_rate_value" ], "properties": { "invoice_id": { "type": "string", "x-stoplight": { "id": "f2qioyn3p9ukj" }, "format": "uuid" }, "rebill_rate_value": { "type": "number", "x-stoplight": { "id": "womp3grd8k6ek" }, "nullable": true } }, "additionalProperties": false }, "ReportCategory-Create": { "title": "ReportCategory-Create", "x-stoplight": { "id": "o09qb30a1qkrg" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "7aicmm7orystr" } }, "system": { "type": "boolean", "x-stoplight": { "id": "pfov05cu0auik" } } }, "x-internal": true, "additionalProperties": false }, "ReportCategory-Read": { "title": "ReportCategory-Read", "x-stoplight": { "id": "0wppww4mee050" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "ohyqoa1t83mag" }, "required": [ "name", "system" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "8bw23t06r90h3" } }, "system": { "type": "boolean", "x-stoplight": { "id": "0t7net7vosd8z" } } } } ], "x-internal": true }, "ReportCategory-Update": { "title": "ReportCategory-Update", "x-stoplight": { "id": "aa52md9g3xvnn" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "bebjyyae4jzyu" } } }, "x-internal": true, "additionalProperties": false }, "RequestedApprovalType": { "title": "RequestedApprovalType", "x-stoplight": { "id": "2qzekamelz3vv" }, "enum": [ "driver", "foreman", "biller", "company_admin" ], "nullable": true }, "RequestedQuantityType": { "title": "RequestedQuantityType", "x-stoplight": { "id": "qysuik83a8uvo" }, "enum": [ "truck", "load", "unit" ] }, "Resource-Read-Nested": { "title": "Resource-Read-Nested", "x-stoplight": { "id": "zsxrcvafomwu1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "type" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "lz8ri4iufqzwq" } }, "type": { "$ref": "#/components/schemas/ResourceType" } } } ] }, "ResourceScope-Create": { "title": "ResourceScope-Create", "x-stoplight": { "id": "41ox6ewfjpo0r" }, "type": "object", "required": [ "resource_id", "resource_type" ], "properties": { "resource_id": { "type": "string", "x-stoplight": { "id": "rxl9bwb4ol3s8" }, "format": "uuid" }, "resource_type": { "$ref": "#/components/schemas/ResourceType" } }, "additionalProperties": false }, "ResourceScope-Read": { "title": "ResourceScope-Read", "x-stoplight": { "id": "oov968gb7f2jh" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "id": { "type": "string", "x-stoplight": { "id": "4yvrj9wav30v2" } }, "user": { "$ref": "#/components/schemas/User-Read-Nested" }, "resource": { "$ref": "#/components/schemas/Resource-Read-Nested" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "ResourceType": { "title": "ResourceType", "x-stoplight": { "id": "20tmbtxmlreh3" }, "enum": [ "Site" ] }, "ResourceUsageLog-Create": { "title": "ResourceUsageLog-Create", "x-stoplight": { "id": "ctlqt56dso5sp" }, "type": "object", "required": [ "usage_minutes", "date_of_use", "driver_id" ], "properties": { "usage_minutes": { "type": "integer", "x-stoplight": { "id": "pgh45oidnpymr" } }, "date_of_use": { "type": "string", "x-stoplight": { "id": "p9caze6rxyn5b" }, "format": "date" }, "equipment_id": { "type": "string", "x-stoplight": { "id": "727hux7q1s5bn" }, "format": "uuid", "nullable": true }, "driver_id": { "type": "string", "x-stoplight": { "id": "jv0mr9v8rn4ht" }, "format": "uuid" }, "phase_id": { "type": "string", "x-stoplight": { "id": "gstyyn7mj0vga" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "ResourceUsageLog-Read": { "title": "ResourceUsageLog-Read", "x-stoplight": { "id": "71ah7ysofkyys" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "27h1eblij2y2j" }, "required": [ "usage_minutes", "resource_usage_loggable_type", "resource_usage_loggable_id" ], "properties": { "usage_minutes": { "type": "integer", "x-stoplight": { "id": "jcgxqpwj89vk2" } }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "phase": { "$ref": "#/components/schemas/Phase-Read" }, "resource_usage_loggable_type": { "type": "string", "x-stoplight": { "id": "g3ls2k5o246sb" } }, "resource_usage_loggable_id": { "type": "string", "x-stoplight": { "id": "3pgg849uxtyzy" }, "format": "uuid" } } } ] }, "ResourceUsageLog-Update": { "title": "ResourceUsageLog-Update", "x-stoplight": { "id": "v8we1vazn425k" }, "type": "object", "properties": { "usage_minutes": { "type": "integer", "x-stoplight": { "id": "z51hhaqeaikzb" } }, "phase_id": { "type": "string", "x-stoplight": { "id": "zxp12hofpm9zd" }, "format": "uuid", "nullable": true }, "equipment_id": { "type": "string", "x-stoplight": { "id": "fu47g4phlvxcp" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "ResourceUsageLog-Update-Destroyable": { "title": "ResourceUsageLog-Update-Destroyable", "x-stoplight": { "id": "jmj4biysbjpfr" }, "allOf": [ { "$ref": "#/components/schemas/ResourceUsageLog-Update" }, { "$ref": "#/components/schemas/Destroyable" } ] }, "RoleApprovable": { "title": "RoleApprovable", "x-stoplight": { "id": "fie0647l1zmho" }, "type": "object", "required": [ "approved", "approvable", "unapprovable", "billing_approved_at", "field_approved_at" ], "properties": { "approved": { "type": "boolean", "x-stoplight": { "id": "je3f3e9kzi9d8" } }, "approvable": { "type": "boolean", "x-stoplight": { "id": "3e8gmlshlm661" } }, "unapprovable": { "type": "boolean", "x-stoplight": { "id": "7t2cltf0njxtj" } }, "billing_approved_at": { "type": "string", "x-stoplight": { "id": "f2bkkw0znb1uy" }, "format": "date-time", "nullable": true }, "field_approved_at": { "type": "string", "x-stoplight": { "id": "78l5n1sakfgl3" }, "format": "date-time", "nullable": true } }, "additionalProperties": false }, "RouteEstimate-Create": { "title": "RouteEstimate-Create", "x-stoplight": { "id": "8slflevzhvg10" }, "type": "object", "required": [ "pickup_site_lat", "pickup_site_lon", "drop_off_site_lat", "drop_off_site_lon" ], "properties": { "pickup_site_lat": { "type": "number", "x-stoplight": { "id": "wz709s0jozthi" }, "description": "latitude of the `Pickup` site. \\n\\nMust be a number between -90 and 90" }, "pickup_site_lon": { "type": "number", "x-stoplight": { "id": "wx4xd3d4cymk3" }, "description": "longitude of the `Pickup` site. \\n\\nMust be a number between -180 and 180" }, "drop_off_site_lat": { "type": "number", "x-stoplight": { "id": "jxs8aoou98et5" }, "description": "latitude of the `Dropoff` site. \\n\\nMust be a number between -90 and 90" }, "drop_off_site_lon": { "type": "number", "x-stoplight": { "id": "sc3mmqet2z00m" }, "description": "longitude of the `Dropoff` site. \\n\\nMust be a number between -180 and 180" } }, "additionalProperties": false }, "RouteEstimate-Read": { "title": "RouteEstimate-Read", "x-stoplight": { "id": "j2acjgtam3331" }, "type": "object", "required": [ "pickup_to_drop_off_time_minutes", "pickup_to_drop_off_distance_meters" ], "properties": { "pickup_to_drop_off_time_minutes": { "type": "integer", "x-stoplight": { "id": "1lrtfwdqsec9v" } }, "pickup_to_drop_off_distance_meters": { "type": "integer", "x-stoplight": { "id": "5lgfuxa26k8dt" } } }, "additionalProperties": false }, "S": { "x-stoplight": { "id": "o6oprcupw6ep7" } }, "SSO-Login": { "title": "SSO-Login", "x-stoplight": { "id": "4ex5ekm3oekn4" }, "type": "object", "required": [ "sso_token" ], "properties": { "sso_token": { "type": "string", "x-stoplight": { "id": "f3rshmpkuzlwl" } } }, "additionalProperties": false }, "SSOConnection-Query": { "title": "SSOConnection-Query", "x-stoplight": { "id": "wkp0lw5wbamay" }, "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "j89u98u98u98u" }, "format": "email" } }, "additionalProperties": false }, "SSOConnection-Read": { "title": "SSOConnection-Read", "x-stoplight": { "id": "ywkp0lw5wbama" }, "type": "object", "properties": { "display_name": { "type": "string", "x-stoplight": { "id": "89u98u98u98uj" } }, "stytch_connection_id": { "type": "string", "x-stoplight": { "id": "9u98u98u98uj8" } }, "start_url": { "type": "string", "x-stoplight": { "id": "u98u98u98uj89" } }, "stytch_identity_provider": { "$ref": "#/components/schemas/StytchIdentityProvider" } }, "additionalProperties": false }, "SaasBillingPlan": { "title": "SaasBillingPlan", "x-stoplight": { "id": "e7hyhw2zszf6l" }, "enum": [ "basic", "standard", "pro" ], "example": "basic", "default": "basic", "x-internal": true }, "Scheduled-Time-Off-Create": { "title": "Scheduled-Time-Off-Create", "x-stoplight": { "id": "kg82d261cjr4w" }, "description": "Scheduled Time Off - Create", "type": "object", "required": [ "start_date", "end_date" ], "properties": { "start_date": { "type": "string", "x-stoplight": { "id": "gse6o5a3nswlz" }, "format": "date-time" }, "end_date": { "type": "string", "x-stoplight": { "id": "jxpl58y44m2kh" }, "format": "date-time" } }, "additionalProperties": false }, "Scheduled-Time-Off-Read": { "title": "Scheduled-Time-Off-Read", "x-stoplight": { "id": "u331truw5dg23" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "h8hb87yfchf0u" }, "required": [ "start_date" ], "properties": { "start_date": { "type": "string", "x-stoplight": { "id": "ykovozns0x8k2" }, "format": "date-time" }, "end_date": { "type": "string", "x-stoplight": { "id": "rpad7acd8im3j" }, "nullable": true } } } ], "description": "Scheduled Time Off" }, "SendInvite": { "title": "SendInvite", "x-stoplight": { "id": "85j5tkeowjyx9" }, "type": "object", "properties": { "email": { "type": "boolean", "default": false, "description": "Whether to send an invitation via email along with the creation of the `User`.\n\nRequires the `email` field to be present." }, "sms": { "type": "boolean", "default": false, "description": "Whether to send an invitation via sms along with the creation of the `User`. \n\nRequires the `phone` field to be present." } }, "additionalProperties": false }, "Service-Read": { "title": "Service-Read", "x-stoplight": { "id": "93apij767hahq" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "6m7pynwrc9gaz" } }, "system": { "type": "boolean", "x-stoplight": { "id": "0ctn5ygv4gt7n" } }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "service_type": { "$ref": "#/components/schemas/ServiceType-Read-Nested" } }, "required": [ "name", "system", "company", "service_type" ] }, { "$ref": "#/components/schemas/Timestamps" }, { "$ref": "#/components/schemas/Printable" } ] }, "Service-Read-Nested": { "title": "Service-Read-Nested", "x-stoplight": { "id": "4bry9oy16sin9" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "tsb5b63pzas6h" } } }, "required": [ "name" ] } ] }, "Service-Read-Typeahead": { "title": "Service-Read-Typeahead", "x-stoplight": { "id": "hzokhwqcwvue5" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "description": "Service name" } }, "required": [ "name" ] } ] }, "ServiceClass-Create": { "title": "ServiceClass-Create", "x-stoplight": { "id": "3z02x2foty3ht" }, "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "ServiceClass name, must be unique for the company " } }, "additionalProperties": false }, "ServiceClass-Read": { "title": "ServiceClass-Read", "x-stoplight": { "id": "jcc37qao2rb7x" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "description": "Department name" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } }, "required": [ "name", "company" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "ServiceClass-Read-Nested": { "title": "ServiceClass-Read-Nested", "x-stoplight": { "id": "ahk4knwjgo1di" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "description": "ServiceClass name." } }, "required": [ "name" ] } ] }, "ServiceClass-Update": { "title": "ServiceClass-Update", "x-stoplight": { "id": "phdouv8mvb6bu" }, "type": "object", "properties": { "name": { "type": "string", "description": "Name of the service_class. Must be unique for a company." } }, "additionalProperties": false }, "ServiceType-Read-Nested": { "title": "ServiceType-Read-Nested", "x-stoplight": { "id": "84wz44x2i04yv" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "4s0oiqiohsnz5" } }, "key": { "type": "string", "x-stoplight": { "id": "r8apolqsdguj0" } } } } ] }, "Settlement-Create": { "title": "Settlement-Create", "x-stoplight": { "id": "nlvb8x0r2gx5a" }, "type": "object", "required": [ "invoice_ids" ], "properties": { "invoice_ids": { "type": "array", "x-stoplight": { "id": "aau0i3cz52wlo" }, "items": { "x-stoplight": { "id": "y8ugswqp22m9g" }, "type": "string", "format": "uuid" } }, "settlement_line_item_type": { "$ref": "#/components/schemas/SettlementLineItemType" }, "settlement_line_item_groupings": { "type": "array", "x-stoplight": { "id": "d7130jo90cyhn" }, "items": { "$ref": "#/components/schemas/SettlementLineItemGrouping" } }, "include_loads_in_pdf": { "type": "boolean", "description": "Controls whether load details are included in settlement PDFs" } }, "x-internal": true, "additionalProperties": false }, "Settlement-Data": { "title": "Settlement-Data", "x-stoplight": { "id": "ev9ysl8wkgqou" }, "type": "object", "properties": { "friendly_order_ids": { "type": "array", "x-stoplight": { "id": "bhu3ljgdpexd4" }, "items": { "x-stoplight": { "id": "dw71zmxlco4dl" }, "type": "string" } }, "quantities_per_uom": { "type": "array", "x-stoplight": { "id": "o6clrualzppm4" }, "items": { "x-stoplight": { "id": "m7rll6vs1wws3" }, "type": "string" } } }, "x-internal": true, "additionalProperties": false }, "Settlement-Read": { "title": "Settlement-Read", "x-stoplight": { "id": "v7tgu5dpw0yx6" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "adjustments_total_amount", "data", "exported_at", "include_loads_in_pdf", "jobs_count", "state", "total_amount", "settlement_id", "ar_settlement_id", "ap_settlement_id", "settlement_line_item_type", "settlement_line_item_groupings", "add_on_charges_total_amount", "invoices_total_amount", "state_events", "editable", "void_reason", "rebillable", "rebill_total_amount", "rebill_add_on_charges_total_amount", "rebill_invoices_total_amount", "voided_at", "approved", "approvable", "unapprovable", "billing_approved_at", "delivered_quantities", "invoices_tax_total_amount", "rebill_invoices_tax_total_amount" ], "properties": { "adjustments_total_amount": { "type": "string", "x-stoplight": { "id": "ewne9idc4jme5" } }, "data": { "$ref": "#/components/schemas/Settlement-Data" }, "exported_at": { "type": "string", "x-stoplight": { "id": "96czpadmujxyh" }, "format": "date-time", "nullable": true }, "jobs_count": { "type": "integer", "x-stoplight": { "id": "1eyszir4rj04s" } }, "state": { "$ref": "#/components/schemas/SettlementState" }, "total_amount": { "type": "string", "x-stoplight": { "id": "5gkc63khvm43b" } }, "customer_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "vendor_account": { "$ref": "#/components/schemas/Account-Read-Nested" }, "driver": { "$ref": "#/components/schemas/Driver-Read-Nested" }, "settlement_id": { "type": "string", "x-stoplight": { "id": "o6sa87h84mg4b" } }, "ar_settlement_id": { "type": "string", "x-stoplight": { "id": "k8m2n5p7q3r1s" }, "description": "Accounts Receivable settlement identifier (e.g., AR-123)" }, "ap_settlement_id": { "type": "string", "x-stoplight": { "id": "t4u6v8w0x2y4z" }, "description": "Accounts Payable settlement identifier (e.g., AP-123)" }, "settlement_line_item_type": { "$ref": "#/components/schemas/SettlementLineItemType" }, "settlement_line_item_groupings": { "type": "array", "x-stoplight": { "id": "5a0weyv4qlxnk" }, "items": { "$ref": "#/components/schemas/SettlementLineItemGrouping" } }, "add_on_charges_total_amount": { "type": "string", "x-stoplight": { "id": "lb7d33qab3qj1" }, "description": "This is the sum of all the `Settlement`'s `AddOnCharges`' `total_amount`" }, "invoices_total_amount": { "type": "string", "x-stoplight": { "id": "0hb1d9olmgqgd" }, "description": "This is the sum of all the `Invoices`'s `total_amount` that this `Settlement` aggregates." }, "state_events": { "type": "array", "x-stoplight": { "id": "v364iig0ejiow" }, "items": { "$ref": "#/components/schemas/SettlementStateEvent" } }, "editable": { "type": "boolean", "x-stoplight": { "id": "nohmp55lokifo" } }, "last_settlement_email_delivery": { "$ref": "#/components/schemas/SettlementEmailDelivery-Read" }, "void_reason": { "type": "string", "x-stoplight": { "id": "f5yrr6bc18x2c" }, "nullable": true }, "rebillable": { "type": "boolean", "x-stoplight": { "id": "wzj7dvmwvvfip" } }, "original_settlement": { "$ref": "#/components/schemas/Settlement-Read-Nested" }, "rebill_total_amount": { "type": "string", "x-stoplight": { "id": "33hwveuov29mz" }, "nullable": true }, "rebill_add_on_charges_total_amount": { "type": "string", "x-stoplight": { "id": "3jxungxzuzdpo" }, "nullable": true }, "rebill_invoices_total_amount": { "type": "string", "x-stoplight": { "id": "j22k4f0fr1oiq" }, "nullable": true }, "voided_at": { "type": "string", "x-stoplight": { "id": "qnq1ub9i4nwl5" }, "format": "date-time", "nullable": true }, "approved": { "type": "boolean", "x-stoplight": { "id": "bhcdc0mszq249" } }, "approvable": { "type": "boolean", "x-stoplight": { "id": "6iq2bu84k7ztn" } }, "unapprovable": { "type": "boolean", "x-stoplight": { "id": "93uxkqtkkm3rj" } }, "billing_approved_at": { "type": "string", "x-stoplight": { "id": "moxy969odp41e" }, "format": "date-time", "nullable": true }, "delivered_quantities": { "type": "array", "x-stoplight": { "id": "l6cuz25bmm9z4" }, "items": { "$ref": "#/components/schemas/DeliveredQuantity-Read" } }, "include_loads_in_pdf": { "type": "boolean", "description": "Controls whether load details are included in settlement PDFs" }, "agave_settlement_export": { "$ref": "#/components/schemas/AgaveSettlementExport-Read-Nested" }, "invoices_tax_total_amount": { "type": "string", "nullable": true, "description": "Sum of tax_total_amount from all invoices in this settlement" }, "rebill_invoices_tax_total_amount": { "type": "string", "nullable": true, "description": "Sum of tax_total_amount from all invoices for rebill settlements" } } } ], "x-internal": true }, "Settlement-Read-Nested": { "title": "Settlement-Read-Nested", "x-stoplight": { "id": "b0g75f7r9nprp" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "8dtolmjnu2anj" }, "required": [ "settlement_id" ], "properties": { "settlement_id": { "type": "string", "x-stoplight": { "id": "ma5w6k43cajtr" } }, "ar_settlement_id": { "type": "string", "description": "Accounts Receivable settlement identifier (e.g., AR-123)" }, "ap_settlement_id": { "type": "string", "description": "Accounts Payable settlement identifier (e.g., AP-123)" } } } ] }, "Settlement-Update": { "title": "Settlement-Update", "x-stoplight": { "id": "4hy1m4lb26xyz" }, "type": "object", "properties": { "settlement_line_item_type": { "$ref": "#/components/schemas/SettlementLineItemType" }, "settlement_line_item_groupings": { "type": "array", "x-stoplight": { "id": "rj7b8nm5md41e" }, "items": { "$ref": "#/components/schemas/SettlementLineItemGrouping" } }, "include_loads_in_pdf": { "type": "boolean", "description": "Controls whether load details are included in settlement PDFs" }, "exported_at": { "type": "string", "x-stoplight": { "id": "k7m2p9r4t6w1x" }, "format": "date-time", "nullable": true, "description": "Timestamp when the settlement was exported. Use to manually mark a settlement as exported when no accounting integrations are connected." } }, "x-internal": true, "additionalProperties": false }, "SettlementEmailDelivery-Read": { "title": "SettlementEmailDelivery-Read", "x-stoplight": { "id": "pdqy2qteoe1nf" }, "x-internal": true, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "email", "sender_user", "settlement_id", "state" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "tnhxje2guszp3" }, "format": "email" }, "sender_user": { "$ref": "#/components/schemas/User-Read-Minimal" }, "settlement_id": { "type": "string", "x-stoplight": { "id": "6aod263sq8xxk" }, "format": "uuid" }, "state": { "$ref": "#/components/schemas/SettlementEmailDeliveryState" } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "SettlementEmailDeliveryState": { "title": "SettlementEmailDeliveryState", "x-stoplight": { "id": "k8jfsdsjtz731" }, "enum": [ "initiated", "delivered", "failed" ], "default": "initiated" }, "SettlementLineItem-Group-Read": { "title": "SettlementLineItem-Group-Read", "x-stoplight": { "id": "4g8m7uf1tq39l" }, "type": "object", "required": [ "line_items" ], "properties": { "group": { "type": "string", "x-stoplight": { "id": "8mce1y8dhbj19" } }, "line_items": { "type": "array", "x-stoplight": { "id": "i39l6ua43811g" }, "items": { "$ref": "#/components/schemas/SettlementLineItem-Read" } }, "subtotal": { "type": "string", "x-stoplight": { "id": "9efcuir1c290j" } } }, "additionalProperties": false }, "SettlementLineItem-Read": { "title": "SettlementLineItem-Read", "x-stoplight": { "id": "5yii67a6dj4do" }, "type": "object", "x-internal": true, "required": [ "date", "truck_external_ids", "equipment_types", "services", "materials", "quantities", "ids", "total_quantity", "rate_value", "rate_types", "total_amount", "loads_count", "equipment_names", "rebill_rate_value", "rebill_total_amount" ], "properties": { "date": { "x-stoplight": { "id": "to9ocq8299m0q" }, "type": "string", "format": "date-time" }, "truck_external_ids": { "type": "array", "x-stoplight": { "id": "hqzxigknkhvq1" }, "items": { "x-stoplight": { "id": "4pz26v03yrala" }, "type": "string" } }, "equipment_types": { "type": "array", "x-stoplight": { "id": "xj7xxlv1e9ls8" }, "items": { "x-stoplight": { "id": "1oq1lm3yta92v" }, "type": "string" } }, "services": { "type": "array", "x-stoplight": { "id": "rvnxewkix1pr3" }, "items": { "x-stoplight": { "id": "x0tg9ln814h8c" }, "type": "string" } }, "materials": { "type": "array", "x-stoplight": { "id": "z7yqebwq0oiai" }, "items": { "x-stoplight": { "id": "19uerojbcz0g0" }, "type": "string" } }, "quantities": { "type": "array", "x-stoplight": { "id": "da6uifgybmtc2" }, "items": { "x-stoplight": { "id": "jepfcq7latefe" }, "type": "object", "required": [ "quantity", "unit_of_measure" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "xq75n02nyaxmq" } }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" } } } }, "ids": { "type": "array", "x-stoplight": { "id": "e18k9i0kt37bx" }, "items": { "x-stoplight": { "id": "mcxokl9cd66qb" }, "type": "object", "required": [ "order_id", "job_id", "friendly_job_id", "friendly_order_id", "load_id", "friendly_load_id", "load_ordinality" ], "properties": { "order_id": { "type": "string", "x-stoplight": { "id": "ip1tkvwsube86" } }, "job_id": { "type": "string", "x-stoplight": { "id": "pdmm7opkvys2p" } }, "friendly_job_id": { "type": "string", "x-stoplight": { "id": "e8y6wduasdhd8" } }, "friendly_order_id": { "type": "string", "x-stoplight": { "id": "souq7yd12kdko" } }, "load_id": { "type": "string", "x-stoplight": { "id": "ghqiz7xuc600u" }, "nullable": true }, "friendly_load_id": { "type": "string", "x-stoplight": { "id": "73vmp5d4hfzhx" }, "nullable": true }, "load_ordinality": { "type": "number", "x-stoplight": { "id": "44otsffgk1117" }, "nullable": true } } } }, "total_quantity": { "type": "string", "x-stoplight": { "id": "knbackeowp5h0" } }, "rate_value": { "type": "string", "x-stoplight": { "id": "ooix402cieta9" } }, "rate_types": { "type": "array", "x-stoplight": { "id": "besocvr26lazt" }, "items": { "x-stoplight": { "id": "0kt7k3vp6p34v" }, "type": "string" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "pfahafcfmvp09" } }, "loads_count": { "type": "integer", "x-stoplight": { "id": "h594q6m2gaa1u" } }, "ticket_numbers": { "type": "array", "x-stoplight": { "id": "1e10yvjytrh9w" }, "description": "Currently only exists when the `Settlement.settlement_line_item_type == \"load\"` which would only have 1 record", "items": { "x-stoplight": { "id": "8wbucdsxq3hyd" }, "type": "string" } }, "pay_start_time": { "type": "string", "x-stoplight": { "id": "rihq5b0hbiqvn" }, "format": "date-time", "description": "Exists when the `Settlement.settlement_line_item_type == \"job\"` and the corresponding `SettlementLineItem` is based on a `RatePerHour` `Invoice`", "nullable": true }, "pay_end_time": { "type": "string", "x-stoplight": { "id": "n4ia01fqjjbh8" }, "format": "date-time", "description": "Exists when the `Settlement.settlement_line_item_type == \"job\"` and the corresponding `SettlementLineItem` is based on a `RatePerHour` `Invoice`", "nullable": true }, "billing_adjustment_minutes": { "type": "integer", "x-stoplight": { "id": "vgtrh0lh1p5oi" }, "description": "Exists when the `Settlement.settlement_line_item_type == \"job\"` and the corresponding `SettlementLineItem` is based on a `RatePerHour` `Invoice`" }, "equipment_names": { "type": "array", "x-stoplight": { "id": "hspioilyjdfux" }, "items": { "x-stoplight": { "id": "71nd1nr9ad25f" }, "type": "string" } }, "rebill_rate_value": { "type": "string", "x-stoplight": { "id": "metmhpxycbiun" }, "nullable": true }, "rebill_total_amount": { "type": "string", "x-stoplight": { "id": "0r8hgbuf21sba" } }, "vendor_job_assignment": { "type": "object", "x-stoplight": { "id": "gl08waphcqgzp" }, "required": [ "id" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "lnc7plez0xqwg" }, "format": "uuid" }, "vendor_account": { "type": "object", "x-stoplight": { "id": "djqyl0s6snug7" }, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "ivic77v14lidw" }, "format": "uuid" }, "name": { "type": "string", "x-stoplight": { "id": "sxegfgj3f0tme" } } } } } }, "driver": { "type": "object", "x-stoplight": { "id": "6a2huzjuz2ic4" }, "required": [ "id", "first_name", "last_name" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "wnlx1uua0glrn" }, "format": "uuid" }, "first_name": { "type": "string", "x-stoplight": { "id": "z46eggoyih5e7" } }, "last_name": { "type": "string", "x-stoplight": { "id": "unwb5vq86nanl" } } } }, "material_rate_unit_of_measure": { "x-stoplight": { "id": "m8k2r5x9p7v3w" }, "$ref": "#/components/schemas/NullableOrderUnitOfMeasure" }, "line_item_type": { "x-stoplight": { "id": "k9m4t2x7p5r8n" }, "$ref": "#/components/schemas/InvoiceLineItemType" } }, "additionalProperties": false }, "SettlementLineItemGrouping": { "title": "SettlementLineItemGrouping", "x-stoplight": { "id": "5pcss2yqvsbrb" }, "enum": [ "material", "equipment_type", "service" ], "example": "material" }, "SettlementLineItemType": { "title": "SettlementLineItemType", "x-stoplight": { "id": "kr3n8ngq9cl8d" }, "enum": [ "order", "job", "load" ], "example": "order", "default": "load" }, "SettlementSettlementEmailDeliveryChannel-Read": { "title": "SettlementSettlementEmailDeliveryChannel-Read", "x-stoplight": { "id": "cxl2lpltdrhtv" }, "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/SettlementEmailDelivery-Read" } }, "x-internal": true, "additionalProperties": false }, "SettlementState": { "title": "SettlementState", "x-stoplight": { "id": "fszy9g5471ubx" }, "enum": [ "pending", "approved", "paid", "customer_pending", "customer_approved", "customer_paid", "voided" ], "example": "pending", "default": "pending" }, "SettlementStateEvent": { "title": "SettlementStateEvent", "x-stoplight": { "id": "1a9ulz2srbdfc" }, "enum": [ "approve", "customer_pay", "pay", "send_settlement", "unapprove", "undo_pay", "void" ] }, "ShiftAdjustmentType": { "title": "ShiftAdjustmentType", "x-stoplight": { "id": "pjqvol5eso8aa" }, "enum": [ "break", "breakdown", "lunch", "wait_time" ], "example": "break" }, "Signature-Create": { "title": "Signature-Create", "x-stoplight": { "id": "vvpo8xw5a6phf" }, "type": "object", "required": [ "image" ], "properties": { "lat": { "type": "number", "x-stoplight": { "id": "bzojplevcikrm" }, "minimum": -90, "maximum": 90, "nullable": true }, "lon": { "type": "number", "x-stoplight": { "id": "wdi9m9b6m71ka" }, "minimum": -180, "maximum": 180, "nullable": true }, "image": { "type": "string", "x-stoplight": { "id": "6y01erfgccb8l" }, "format": "binary" } }, "additionalProperties": false }, "Signature-Read": { "title": "Signature-Read", "x-stoplight": { "id": "tdfex6ug1m32n" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "csvfey7448ht4" }, "required": [ "lat", "lon", "image_url", "image_mime_type", "image_name", "type", "signable_type", "signable_id" ], "properties": { "lat": { "type": "string", "x-stoplight": { "id": "778pgryz3ejzq" }, "nullable": true }, "lon": { "type": "string", "x-stoplight": { "id": "i19gbsjmeopj6" }, "nullable": true }, "image_url": { "type": "string", "x-stoplight": { "id": "hvalrtpme3uks" }, "format": "uri", "nullable": true }, "image_mime_type": { "type": "string", "x-stoplight": { "id": "47o0osx3ai8nn" }, "nullable": true }, "image_name": { "type": "string", "x-stoplight": { "id": "ydfcqwykmz8jm" }, "nullable": true }, "type": { "$ref": "#/components/schemas/SignatureType" }, "signable_type": { "type": "string", "x-stoplight": { "id": "sig1nabletype001" }, "description": "The type of the parent resource (Load, Job, or DriverDay)" }, "signable_id": { "type": "string", "x-stoplight": { "id": "sig1nableid0001" }, "format": "uuid", "description": "The ID of the parent resource" } } } ] }, "SignatureType": { "title": "SignatureType", "x-stoplight": { "id": "bj700e33yuj75" }, "enum": [ "DriverSignature", "DropoffSignature" ] }, "SimulateOrder-Create": { "title": "SimulateOrder-Create", "x-stoplight": { "id": "l2e056bx35wfa" }, "type": "object", "properties": { "customer_account_id": { "type": "string", "x-stoplight": { "id": "2gi87v7nzicdg" }, "format": "uuid", "nullable": true }, "driver_id": { "type": "string", "x-stoplight": { "id": "1tmnvy5sevgta" }, "format": "uuid", "nullable": true }, "shared_driver_id": { "type": "string", "x-stoplight": { "id": "1vt5xg1kr12kz" }, "format": "uuid", "nullable": true } }, "additionalProperties": false }, "Site-Create": { "title": "Site-Create", "x-stoplight": { "id": "jeymxc4hi5p5l" }, "type": "object", "required": [ "name", "lat", "lon" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "zq3t2uddm30pt" } }, "address": { "$ref": "#/components/schemas/Address-Create" }, "lat": { "type": "string", "x-stoplight": { "id": "ff0brii5lm5ap" }, "nullable": true, "description": "Latitude of the site. If not provided, the latitude from the address will be used." }, "lon": { "type": "string", "x-stoplight": { "id": "x829mvlcec3ab" }, "nullable": true, "description": "Longitude of the site. If not provided, the longitude from the address will be used." }, "notes": { "type": "string", "x-stoplight": { "id": "zredyk0m5jrzy" } }, "site_type": { "$ref": "#/components/schemas/SiteType" }, "company_id": { "type": "string", "x-stoplight": { "id": "hsbfalng7gfy7" }, "format": "uuid" }, "next_billion_geofence": { "$ref": "#/components/schemas/NextBillionGeofence-Create" }, "external_id": { "type": "string", "x-stoplight": { "id": "wpo53gfpsxx29" }, "nullable": true }, "full_address": { "type": "string", "x-stoplight": { "id": "1kqd8udhq1sk8" } }, "moving_site": { "$ref": "#/components/schemas/MovingSite-Create" }, "department_id": { "type": "string", "x-stoplight": { "id": "wvg3y5vwxabsm" }, "format": "uuid", "nullable": true }, "contacts": { "type": "array", "x-stoplight": { "id": "1qiq49auf1qn8" }, "items": { "$ref": "#/components/schemas/Contact-Create" } } }, "additionalProperties": false }, "Site-Read": { "title": "Site-Read", "x-stoplight": { "id": "d3bw9em1ibuq1" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "company", "name", "lat", "lon", "notes", "state", "external_id", "full_address", "routable" ], "properties": { "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "address": { "$ref": "#/components/schemas/Address-Read-Nested" }, "name": { "type": "string", "x-stoplight": { "id": "qetgw5ugccnx3" } }, "lat": { "type": "string", "x-stoplight": { "id": "f85y4jij1rblz" }, "nullable": true }, "lon": { "type": "string", "x-stoplight": { "id": "12zny9anzmdv1" }, "nullable": true }, "site_type": { "$ref": "#/components/schemas/SiteType" }, "notes": { "type": "string", "x-stoplight": { "id": "x8fcflv4sr9qu" }, "nullable": true }, "state": { "$ref": "#/components/schemas/SiteState" }, "next_billion_geofence": { "$ref": "#/components/schemas/NextBillionGeofence-Read" }, "external_id": { "type": "string", "x-stoplight": { "id": "89q7a12oipvs7" }, "nullable": true }, "full_address": { "type": "string", "x-stoplight": { "id": "5yo2vmvrpdqhs" }, "nullable": true }, "routable": { "type": "boolean", "x-stoplight": { "id": "1wpkny0oz7ju1" } }, "moving_site": { "$ref": "#/components/schemas/MovingSite-Read" }, "department": { "$ref": "#/components/schemas/Department-Read-Nested" }, "contacts": { "type": "array", "x-stoplight": { "id": "iln7bn31b1mdo" }, "items": { "$ref": "#/components/schemas/Contact-Read-Nested" } }, "editable": { "type": "boolean", "description": "Whether the current user can edit this site" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Nested" } } }, { "$ref": "#/components/schemas/Timestamps" }, { "$ref": "#/components/schemas/Discardable" } ], "x-tags": [ "Sites" ] }, "Site-Read-Nested": { "title": "Site-Read-Nested", "x-stoplight": { "id": "rt6xqxsfzf4iv" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "lat", "lon", "full_address", "routable" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "7r0x7wicrvwyy" } }, "lat": { "type": "string", "x-stoplight": { "id": "cr6y5v0hdl5oo" }, "nullable": true }, "lon": { "type": "string", "x-stoplight": { "id": "f23mkvamncbuw" }, "nullable": true }, "address": { "$ref": "#/components/schemas/Address-Read-Nested" }, "full_address": { "type": "string", "x-stoplight": { "id": "uxixxnmgfi47i" }, "nullable": true }, "routable": { "type": "boolean", "x-stoplight": { "id": "uobfxkm0hujhv" } }, "next_billion_geofence": { "$ref": "#/components/schemas/NextBillionGeofence-Read" } } }, { "$ref": "#/components/schemas/Discardable" } ] }, "Site-Read-Typeahead": { "title": "Site-Read-Typeahead", "x-stoplight": { "id": "wnzkdq5df4apa" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "name", "external_id" ], "properties": { "name": { "type": "string", "description": "Site name" }, "company_share": { "$ref": "#/components/schemas/CompanyShare-Read-Nested" }, "external_id": { "type": "string", "x-stoplight": { "id": "tt6lx8lw29aiu" }, "nullable": true } } } ] }, "Site-Update": { "type": "object", "properties": { "address": { "$ref": "#/components/schemas/Address-Update-Destroyable" }, "name": { "type": "string", "x-stoplight": { "id": "lo3hj3abput7a" }, "description": "Name of the site. Must be unique for a company." }, "lat": { "type": "string", "x-stoplight": { "id": "23p5rsebwbg2j" } }, "lon": { "type": "string", "x-stoplight": { "id": "2ddagc7aogltz" } }, "site_type": { "$ref": "#/components/schemas/SiteType" }, "notes": { "type": "string", "x-stoplight": { "id": "ibg3whjp8vhwq" }, "nullable": true }, "next_billion_geofence": { "$ref": "#/components/schemas/NextBillionGeofence-Update" }, "external_id": { "type": "string", "x-stoplight": { "id": "m39zwkfuo9cv6" }, "nullable": true }, "moving_site": { "$ref": "#/components/schemas/MovingSite-Update-Destroyable" }, "department_id": { "type": "string", "x-stoplight": { "id": "guv07r4rnifrt" }, "format": "uuid", "nullable": true }, "contacts": { "type": "array", "x-stoplight": { "id": "5ul0ykwiwlm50" }, "items": { "$ref": "#/components/schemas/Contact-Update-Destroyable" } } }, "additionalProperties": false }, "SiteEquipmentStats-Read": { "title": "SiteEquipmentStats-Read", "x-stoplight": { "id": "8etpjf1w69aeh" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "umr8uj9uqqp2m" }, "required": [ "site", "on_site_equipment_count", "en_route_equipment_count", "avg_onsite_time_minutes", "last_geofence_at" ], "properties": { "site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "on_site_equipment_count": { "type": "integer", "x-stoplight": { "id": "n578cd4x7x5ly" } }, "en_route_equipment_count": { "type": "integer", "x-stoplight": { "id": "taffu015bgyym" } }, "avg_onsite_time_minutes": { "type": "integer", "x-stoplight": { "id": "9jex5jl9vxnd8" } }, "last_geofence_at": { "type": "string", "x-stoplight": { "id": "inoyxurh9q96l" }, "format": "date-time", "nullable": true } } }, { "$ref": "#/components/schemas/Timestamps" } ] }, "SiteRateSchedule-Create": { "title": "SiteRateSchedule-Create", "x-stoplight": { "id": "v2i3mk9aik5jb" }, "type": "object", "properties": { "site_id": { "type": "string", "x-stoplight": { "id": "ts12o1kz34gw2" }, "format": "uuid", "nullable": true }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "lr57ec8w1gr3g" }, "format": "uuid", "nullable": true }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "2v9p3t8q3m68f" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "qqnr5hfhpm164" }, "format": "uuid", "nullable": true }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "9ejrujhe42281" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "sate8n6spba02" }, "format": "uuid", "nullable": true }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "c7s8ctper3cq0" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" } }, "additionalProperties": false }, "SiteRateSchedule-Read": { "title": "SiteRateSchedule-Read", "x-stoplight": { "id": "44jre1z43iv9r" }, "allOf": [ { "type": "object", "required": [ "customer_rate_value", "customer_rate_type", "vendor_rate_value", "vendor_rate_type", "driver_rate_value", "driver_rate_type", "auto_add_on_assignments_count" ], "properties": { "site": { "$ref": "#/components/schemas/Site-Read-Nested" }, "customer_rate": { "$ref": "#/components/schemas/Rate-Read-Nested" }, "customer_rate_value": { "type": "string", "x-stoplight": { "id": "i4y0q2txezcdz" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate": { "$ref": "#/components/schemas/Rate-Read-Nested" }, "vendor_rate_value": { "type": "string", "x-stoplight": { "id": "isagxw0yrscaf" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate": { "$ref": "#/components/schemas/Rate-Read-Nested" }, "driver_rate_value": { "type": "string", "x-stoplight": { "id": "2xgp2yjeeglk8" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "auto_add_on_assignments_count": { "type": "integer", "x-stoplight": { "id": "wcgxtgzymeyye" } } } }, { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" } ] }, "SiteRateSchedule-Update": { "title": "SiteRateSchedule-Update", "x-stoplight": { "id": "os3zgqwwdr5j4" }, "type": "object", "properties": { "site_id": { "type": "string", "x-stoplight": { "id": "s749p4za9ezo3" }, "format": "uuid", "nullable": true }, "customer_rate_id": { "type": "string", "x-stoplight": { "id": "d0lz0b6qrhxjv" }, "format": "uuid", "nullable": true }, "customer_rate_value": { "type": "number", "x-stoplight": { "id": "zswnlulxi66y2" }, "nullable": true }, "customer_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "vendor_rate_id": { "type": "string", "x-stoplight": { "id": "85lsswuhrjjvy" }, "format": "uuid", "nullable": true }, "vendor_rate_value": { "type": "number", "x-stoplight": { "id": "j9u5hj26065pp" }, "nullable": true }, "vendor_rate_type": { "$ref": "#/components/schemas/NullableRateType" }, "driver_rate_id": { "type": "string", "x-stoplight": { "id": "9jwsydwvyup3a" }, "format": "uuid", "nullable": true }, "driver_rate_value": { "type": "number", "x-stoplight": { "id": "cc33k6uec52oc" }, "nullable": true }, "driver_rate_type": { "$ref": "#/components/schemas/NullableRateType" } }, "additionalProperties": false }, "SiteState": { "title": "SiteState", "x-stoplight": { "id": "tk96rwiactdrj" }, "enum": [ "active", "inactive" ], "default": "active", "description": "" }, "SiteStateEvent": { "title": "SiteStateEvent", "x-stoplight": { "id": "1b0ulz2srbdfc" }, "enum": [ "activate", "deactivate" ] }, "SiteType": { "title": "SiteType", "x-stoplight": { "id": "31h267btxh667" }, "enum": [ "Plant", "Quarry", "JobSite", "Depot", "Other", "Daily", "EquipmentHomeBase" ], "example": "Plant" }, "Sms-Create": { "title": "Sms-Create", "x-stoplight": { "id": "zv43wnznv667u" }, "type": "object", "properties": { "message": { "type": "string", "x-stoplight": { "id": "761aqafj3bpc1" } } }, "additionalProperties": false }, "SmsJobRequestStateEvent": { "title": "SmsJobRequestStateEvent", "x-stoplight": { "id": "1b1ulz2srbdfc" }, "enum": [ "accept", "cancel", "reject" ] }, "StateError": { "title": "StateError", "x-stoplight": { "id": "zgcsl4t8bsn3c" }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "type": "object", "x-stoplight": { "id": "ntvt2atfotcge" }, "required": [ "errors" ], "properties": { "errors": { "type": "array", "x-stoplight": { "id": "noi1jg6o8psl7" }, "items": { "$ref": "#/components/schemas/StateError-Item" } } } } ] }, "StateError-Item": { "title": "StateError-Item", "x-stoplight": { "id": "dgw2jdmi7ozjj" }, "allOf": [ { "$ref": "#/components/schemas/ModelError-Item" }, { "type": "object", "x-stoplight": { "id": "jrgi7oapao3e5" }, "required": [ "state", "event" ], "properties": { "state": { "type": "string", "x-stoplight": { "id": "mah8jye43io32" }, "description": "The current state value of the field on this Model" }, "event": { "type": "string", "x-stoplight": { "id": "dtgu62ni9ofuh" }, "description": "The failed state event called on the Model" } } } ] }, "StateError-Response": { "title": "StateError-Response", "x-stoplight": { "id": "i0wsk2gmnaqup" }, "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/StateError" } }, "additionalProperties": false }, "StytchIdentityProvider": { "title": "StytchIdentityProvider", "x-stoplight": { "id": "stytchidp001" }, "enum": [ "classlink", "cyberark", "duo", "generic", "google-workspace", "jumpcloud", "keycloak", "microsoft-entra", "miniorange", "okta", "onelogin", "pingfederate", "rippling", "salesforce", "shibboleth" ], "description": "Identity provider type from Stytch SSO (OIDC/SAML)" }, "StytchMemberStatus": { "title": "StytchMemberStatus", "x-stoplight": { "id": "18ac6vz49292k" }, "enum": [ "pending", "needs_invite", "invited", "active", "deleted" ], "description": "Stytch member status", "example": "pending", "default": "pending" }, "SystemOfMeasure": { "title": "SystemOfMeasure", "x-stoplight": { "id": "hu40i1qp6a4ed" }, "enum": [ "imperial", "metric" ], "example": "imperial", "default": "imperial", "description": "Unit system to use when displaying non-distance measurements" }, "TelematicsFleet-Read": { "title": "TelematicsFleet-Read", "x-stoplight": { "id": "7morriwrzyhd3" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "3iqx1q7krh4mi" }, "required": [ "external_remote_fleet_id", "provider_source", "company_id" ], "properties": { "external_remote_fleet_id": { "type": "string", "x-stoplight": { "id": "jbfwmpk7iq9r5" }, "nullable": true }, "provider_source": { "$ref": "#/components/schemas/TelematicsProviderSource" }, "company_id": { "type": "string", "x-stoplight": { "id": "vr38u0i2aebz8" }, "format": "uuid" } } } ] }, "TelematicsProviderSource": { "title": "TelematicsProviderSource", "x-stoplight": { "id": "9csrn2g21o443" }, "enum": [ "axle", "paver_tracker" ] }, "TelematicsRemoteVehicle-Read": { "title": "TelematicsRemoteVehicle-Read", "x-stoplight": { "id": "r0q7f0r1ybb0i" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "x-stoplight": { "id": "d4k8j1wny76bs" }, "required": [ "telematics_fleet_id", "remote_vehicle_external_id", "remote_vehicle_external_name", "remote_vehicle_external_model", "remote_vehicle_external_license_plate_number" ], "properties": { "telematics_fleet_id": { "type": "string", "x-stoplight": { "id": "xvj9akg8ywblc" }, "format": "uuid" }, "remote_vehicle_external_id": { "type": "number", "x-stoplight": { "id": "xq7860839zn6c" } }, "remote_vehicle_external_name": { "type": "string", "x-stoplight": { "id": "jm4jg52cm924u" } }, "remote_vehicle_external_model": { "type": "string", "x-stoplight": { "id": "pz3xuif93dwk1" }, "nullable": true }, "remote_vehicle_external_license_plate_number": { "type": "string", "x-stoplight": { "id": "5acxe97clnqtp" }, "nullable": true }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" } } } ] }, "TelematicsRemoteVehicle-Update": { "title": "TelematicsRemoteVehicle-Update", "x-stoplight": { "id": "jrhriusqekxoc" }, "type": "object", "properties": { "telematics_fleet_id": { "type": "string", "x-stoplight": { "id": "4noqqqv9nmoot" }, "format": "uuid" }, "equipment_id": { "type": "string", "x-stoplight": { "id": "sxe7yvlc5gq6p" }, "format": "uuid", "nullable": true }, "remote_vehicle_external_id": { "type": "number", "x-stoplight": { "id": "5a2cju2p37vz0" } }, "remote_vehicle_external_name": { "type": "string", "x-stoplight": { "id": "2a7jqwkglsd17" } }, "remote_vehicle_external_model": { "type": "string", "x-stoplight": { "id": "2nq0t1400otk0" }, "nullable": true }, "remote_vehicle_external_license_plate_number": { "type": "string", "x-stoplight": { "id": "ek1b4yla11ugq" }, "nullable": true } }, "additionalProperties": false }, "Ticket-Create": { "title": "Ticket-Create", "x-stoplight": { "id": "131qvudbt31h8" }, "type": "object", "required": [ "unit_of_measure" ], "properties": { "quantity": { "type": "number", "x-stoplight": { "id": "68w2mgm2lle6k" }, "nullable": true }, "ticket_number": { "type": "string", "x-stoplight": { "id": "p67knkzoxujnd" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "job_id": { "type": "string", "x-stoplight": { "id": "9m3xrz2jrzpcv" }, "format": "uuid", "nullable": true }, "material_id": { "type": "string", "x-stoplight": { "id": "emc067k3odhah" }, "format": "uuid", "nullable": true }, "load_id": { "type": "string", "x-stoplight": { "id": "qilqgc5qwadfb" }, "format": "uuid", "nullable": true }, "printed_at": { "type": "string", "x-stoplight": { "id": "2ufj0pk9uzf82" }, "format": "date-time", "nullable": true }, "service_date": { "type": "string", "x-stoplight": { "id": "yimcofg0r55xa" }, "format": "date-time", "nullable": true }, "source": { "$ref": "#/components/schemas/TicketSource" } }, "additionalProperties": false }, "Ticket-Image-Create": { "title": "Ticket-Image-Create", "x-stoplight": { "id": "cl7aomdoqrh8v" }, "type": "object", "required": [ "image" ], "properties": { "image": { "x-stoplight": { "id": "m0ta240u1ja53" }, "anyOf": [ { "x-stoplight": { "id": "wwurdbme7r4da" }, "format": "binary" }, { "x-stoplight": { "id": "gegzd5bom5va0" } } ], "type": "string" } }, "additionalProperties": false }, "Ticket-Load-Approval-Read": { "title": "Ticket-Load-Approval-Read", "x-stoplight": { "id": "evazca6zh8g8x" }, "description": "This model will be used by mobile client for approvals screen for loads approval, ticket section.", "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "image_url", "ticket_number", "created_at" ], "properties": { "image_url": { "type": "string", "x-stoplight": { "id": "hqaprdh4iljv0" }, "format": "uri", "nullable": true }, "ticket_number": { "x-stoplight": { "id": "799mj4fi2y2qx" }, "type": "string", "nullable": true }, "created_at": { "type": "string", "x-stoplight": { "id": "098o4h7evay63" }, "format": "date-time" } } } ] }, "Ticket-Metadata-Read": { "title": "Ticket-Metadata-Read", "x-stoplight": { "id": "aaazca6zh8g8x" }, "description": "This model includes AI metadata for a ticket", "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "ai_extracted_full_text", "ai_structured_data", "ai_confidence_score" ], "properties": { "ai_extracted_full_text": { "x-stoplight": { "id": "w7pu6txv1oy0d" }, "description": "AI-generated text description of the ticket", "type": "string", "nullable": true }, "ai_structured_data": { "type": "object", "x-stoplight": { "id": "qripkb3os00ih" }, "description": "Unstructured JSON of all fields extracted by the AI vision model", "nullable": true }, "ai_confidence_score": { "type": "string", "x-stoplight": { "id": "3ua4pc0st87ef" }, "example": "\"1.0\", \"90.5\", null", "description": "Percentage confidence score from the AI vision model", "nullable": true } } } ] }, "Ticket-Read": { "title": "Ticket-Read", "x-stoplight": { "id": "jb9fdewaxmw1t" }, "allOf": [ { "$ref": "#/components/schemas/Ticket-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "quantity", "unit_of_measure", "job_id", "order_id", "image_url", "image_mime_type", "preview_mime_type", "ocr_ticket_number", "ocr_net_quantity_ton", "ocr_processed", "load_id", "source", "state", "flagged", "missing_info", "printed_at", "ocr_ticket_number_confidence", "ocr_net_quantity_ton_confidence", "ocr_service_date", "ocr_service_date_raw_str", "ai_processed" ], "properties": { "quantity": { "type": "string", "x-stoplight": { "id": "hc9oz0vfm68u0" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "job_id": { "type": "string", "x-stoplight": { "id": "037deqk7slvf4" }, "format": "uuid", "nullable": true }, "order_id": { "type": "string", "x-stoplight": { "id": "111deqk7slvf4" }, "format": "uuid", "nullable": true }, "material": { "$ref": "#/components/schemas/Material-Read-Nested" }, "image_url": { "type": "string", "x-stoplight": { "id": "zls4nx0al0t9h" }, "format": "uri", "nullable": true }, "image_mime_type": { "type": "string", "x-stoplight": { "id": "ozhkitwvj5b7q" }, "description": "This will be the type of attachment.", "nullable": true }, "preview_mime_type": { "type": "string", "x-stoplight": { "id": "abckitwvj5b7z" }, "description": "This will be the type of attachment.", "nullable": true }, "ocr_ticket_number": { "type": "string", "x-stoplight": { "id": "6cc7czi0fiykn" }, "nullable": true }, "ocr_net_quantity_ton": { "type": "string", "x-stoplight": { "id": "ohhdzp74uxp1t" }, "nullable": true }, "ocr_processed": { "type": "boolean", "x-stoplight": { "id": "ny2zxmboh8uty" } }, "load_id": { "type": "string", "x-stoplight": { "id": "bstva0m37b0dk" }, "format": "uuid", "nullable": true }, "source": { "$ref": "#/components/schemas/TicketSource" }, "state": { "$ref": "#/components/schemas/TicketState" }, "state_events": { "type": "array", "x-stoplight": { "id": "tvnn7axceeubc" }, "items": { "$ref": "#/components/schemas/TicketStateEvent" } }, "flagged": { "type": "boolean", "x-stoplight": { "id": "oujkhiehefkc3" }, "readOnly": true }, "service_date": { "type": "string", "x-stoplight": { "id": "s46b12vbuanfd" }, "format": "date-time", "nullable": true }, "friendly_job_id": { "type": "string", "x-stoplight": { "id": "ob6wwko7nk9l3" }, "nullable": true }, "customer_name": { "type": "string", "x-stoplight": { "id": "yt5ohhg087jw2" }, "nullable": true }, "project_name": { "type": "string", "x-stoplight": { "id": "lctkgf7pnyiby" }, "nullable": true }, "dispatch_number_name": { "type": "string", "x-stoplight": { "id": "q1r2s3t4u5v6w" }, "nullable": true, "description": "Dispatch number name from the order" }, "equipment_name": { "type": "string", "x-stoplight": { "id": "jx5lmwhemf2g8" }, "nullable": true }, "driver_name": { "type": "string", "x-stoplight": { "id": "8iplagfsmzgbw" }, "nullable": true }, "vendor_name": { "type": "string", "x-stoplight": { "id": "5tsnul2i0tfr5" }, "nullable": true }, "material_name": { "type": "string", "x-stoplight": { "id": "fq50fysabdxve" }, "nullable": true }, "pickup_site_name": { "type": "string", "x-stoplight": { "id": "jay8jobgw4zy8" }, "nullable": true }, "dropoff_site_name": { "type": "string", "x-stoplight": { "id": "rudn8s9j3ocyr" }, "nullable": true }, "missing_info": { "type": "boolean", "x-stoplight": { "id": "4rjs6i5z14ik5" }, "description": "A `Ticket` is missing info when any of the following are true:\n1. is has no `job_id`.\n2. it has no `quantity`\n3. it has no `ticket_number`\n4. it has no `image`\n" }, "printed_at": { "type": "string", "x-stoplight": { "id": "5f95ni9l51rtg" }, "format": "date-time", "description": "This is the time when the ticket was printed. This is different from created_at", "nullable": true }, "ocr_ticket_number_confidence": { "type": "string", "x-stoplight": { "id": "82rfndbofuoxv" }, "example": "\"1.0\", \"90.5\", null", "description": "Percentage confidence score", "nullable": true }, "ocr_net_quantity_ton_confidence": { "type": "string", "x-stoplight": { "id": "56f10gbenjxk3" }, "example": "\"1.0\", \"90.5\", null", "description": "Percentage confidence score", "nullable": true }, "ocr_service_date": { "type": "string", "x-stoplight": { "id": "gzgvplenry5ue" }, "format": "date-time", "nullable": true }, "ocr_service_date_raw_str": { "type": "string", "x-stoplight": { "id": "his0q7sb4sw3t" }, "nullable": true }, "ai_processed": { "type": "boolean", "x-stoplight": { "id": "kpmmww5xayiou" } }, "external_truck_id": { "type": "string", "x-stoplight": { "id": "l6g3zmooi9sd6" }, "nullable": true }, "external_vendor_name": { "type": "string", "x-stoplight": { "id": "zapwl7aisd0u7" }, "nullable": true }, "external_material_material_name": { "type": "string", "x-stoplight": { "id": "zwl5ubv4mhsbl" }, "nullable": true }, "external_net_weight": { "type": "string", "x-stoplight": { "id": "ge7l0pjxzwqon" }, "nullable": true }, "external_net_weight_unit": { "type": "string", "x-stoplight": { "id": "4u5hcn505wkfr" }, "nullable": true }, "external_ticket_number": { "type": "string", "x-stoplight": { "id": "6xg5q9dj0bukx" }, "nullable": true } } } ] }, "Ticket-Read-Nested": { "title": "Ticket-Read-Nested", "x-stoplight": { "id": "sxhhxkcgkj6ep" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "u7esfoogq8q49" }, "required": [ "ticket_number", "preview_url" ], "properties": { "ticket_number": { "type": "string", "x-stoplight": { "id": "kzx5yw8vvwbra" }, "nullable": true }, "preview_url": { "type": "string", "x-stoplight": { "id": "h1do11irp24bw" }, "format": "uri", "nullable": true } } } ] }, "Ticket-Update": { "title": "Ticket-Update", "x-stoplight": { "id": "kthjhrcsdatr9" }, "type": "object", "properties": { "quantity": { "type": "number", "x-stoplight": { "id": "089ty63es0vch" }, "nullable": true }, "ticket_number": { "type": "string", "x-stoplight": { "id": "ds6qndk0ifsfl" }, "nullable": true }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" }, "material_id": { "type": "string", "x-stoplight": { "id": "zvfdcmv2ov83s" }, "format": "uuid" }, "load_id": { "type": "string", "x-stoplight": { "id": "306pwjjow337f" }, "format": "uuid" }, "flagged": { "type": "boolean", "x-stoplight": { "id": "72dvguu6oyhre" } }, "service_date": { "type": "string", "x-stoplight": { "id": "fdpjc4t3ex1ev" }, "format": "date-time" }, "printed_at": { "type": "string", "x-stoplight": { "id": "j1m5h32kr9g3y" }, "format": "date-time", "nullable": true } }, "additionalProperties": false }, "TicketRollupSummary-Read": { "title": "TicketRollupSummary-Read", "x-stoplight": { "id": "8hl2dv5xu3hc6" }, "type": "object", "required": [ "external_vendor_name", "external_truck_id", "total_tickets_count", "total_tickets_missing_job_count", "total_tickets_quantity", "total_tickets_missing_job_quantity" ], "properties": { "external_vendor_name": { "type": "string", "x-stoplight": { "id": "nym1xtyupjjk0" } }, "external_truck_id": { "type": "string", "x-stoplight": { "id": "ywebg5780jiy3" } }, "total_tickets_count": { "type": "integer", "x-stoplight": { "id": "gqtwnjam89ci4" } }, "total_tickets_missing_job_count": { "type": "integer", "x-stoplight": { "id": "qw71s1luaetyn" } }, "total_tickets_quantity": { "type": "number", "x-stoplight": { "id": "8slo9pd137h0m" } }, "total_tickets_missing_job_quantity": { "type": "number", "x-stoplight": { "id": "xxy6yaadsn4ty" } }, "unit_of_measure": { "$ref": "#/components/schemas/OrderUnitOfMeasure" } }, "additionalProperties": false }, "TicketSource": { "title": "TicketSource", "x-stoplight": { "id": "z52hto616mgx1" }, "enum": [ "driver_app", "web", "api_integration", "agent" ], "example": "driver_app", "default": "driver_app", "readOnly": true }, "TicketState": { "title": "TicketState", "x-stoplight": { "id": "q01ztz4xuvcc5" }, "enum": [ "new", "pending", "approved", "voided" ], "readOnly": true }, "TicketStateEvent": { "title": "TicketStateEvent", "x-stoplight": { "id": "1b2ulz2srbdfc" }, "enum": [ "approve", "void" ] }, "TimeFormat": { "title": "TimeFormat", "x-stoplight": { "id": "2fy67ypn6nohz" }, "enum": [ "12-hour", "24-hour" ], "example": "12-hour", "default": "12-hour" }, "TimeZone": { "title": "TimeZone", "x-stoplight": { "id": "23bilsa9wx5xx" }, "enum": [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Coyhaique", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Factory", "GB", "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0", "Greenwich", "HST", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROC", "ROK", "Singapore", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ], "example": "America/New_York", "default": "America/New_York" }, "Timestamps": { "title": "Timestamps", "x-stoplight": { "id": "t82ecgfu0oj00" }, "type": "object", "required": [ "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "x-stoplight": { "id": "gjj950jpq0ga9" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone" }, "updated_at": { "type": "string", "x-stoplight": { "id": "bwcuyfwc7aj0e" }, "format": "date-time", "description": "ISO8601 timestamp with local timezone" } }, "additionalProperties": false }, "TrafficControlPlan-Read-Typeahead": { "title": "TrafficControlPlan-Read-Nested", "x-stoplight": { "id": "ckqgoytcerdb5" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "x-stoplight": { "id": "owzje9m62wkns" }, "required": [ "name" ], "properties": { "name": { "type": "string", "x-stoplight": { "id": "ewndawz46zsax" } } } } ] }, "TravelledDistance-Read": { "title": "TravelledDistance-Read", "x-stoplight": { "id": "tdddr7x9k2abc" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "administrative_area", "travelled_distance_meters", "travelled_distance_type" ], "properties": { "administrative_area": { "$ref": "#/components/schemas/AdministrativeArea" }, "travelled_distance_meters": { "type": "string" }, "travelled_distance_type": { "$ref": "#/components/schemas/TravelledDistanceType" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Minimal" } } } ] }, "TravelledDistanceType": { "title": "TravelledDistanceType", "x-stoplight": { "id": "tdtdr7x9k2abc" }, "type": "string", "enum": [ "off_job", "unloaded", "loaded" ], "description": "Type of travelled distance based on load state" }, "TreadId": { "title": "TreadId", "x-stoplight": { "id": "43k4t5tl359m4" }, "type": "object", "required": [ "tread_id" ], "properties": { "tread_id": { "type": "string", "x-stoplight": { "id": "zi3ld7djflw6f" }, "pattern": "^[0-9A-F]{6}$", "minLength": 6, "maxLength": 6, "example": "ABC123", "description": "Tread ID" } }, "additionalProperties": false }, "TwilioIntegration-Read": { "title": "TwilioIntegration-Read", "x-stoplight": { "id": "h5w8n2p7q1r3s" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "properties": { "phone": { "type": "string", "x-stoplight": { "id": "j9k4m2n8p1q3r" }, "description": "Phone number in E.164 format" }, "twilio_region": { "$ref": "#/components/schemas/TwilioRegion" }, "company": { "$ref": "#/components/schemas/Company-Read-Nested" } }, "required": [ "phone", "twilio_region", "company" ] }, { "$ref": "#/components/schemas/Timestamps" } ] }, "TwilioRegion": { "title": "TwilioRegion", "x-stoplight": { "id": "a7b3k9m2x4p1q" }, "type": "string", "enum": [ "us", "ca" ], "description": "Twilio region for SMS integration" }, "UnauthenticatedError": { "title": "UnauthenticatedError", "x-stoplight": { "id": "202o69l0fs40h" }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "type": "object", "x-stoplight": { "id": "tg10dt7s0l6bw" }, "properties": { "error_type": { "type": "string", "x-stoplight": { "id": "wvq8c0qsym4hz" } } }, "required": [ "error_type" ] } ] }, "UnauthenticatedError-Response": { "title": "UnauthenticatedError-Response", "x-stoplight": { "id": "o477eph7ttbzt" }, "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/UnauthenticatedError" } }, "additionalProperties": false }, "UnitOfDistance": { "title": "UnitOfDistance", "x-stoplight": { "id": "5mw7vxpvk84iu" }, "enum": [ "mile", "kilometer" ], "example": "mile", "default": "mile", "description": "Unit to use when displaying distances" }, "UsageStatus": { "title": "UsageStatus", "x-stoplight": { "id": "m57ggtmxjg5pi" }, "enum": [ "demo", "onboarding", "active", "suspended", "churned", "deleted" ], "description": "Usage status", "default": "demo", "example": "demo", "x-internal": true }, "User-Create": { "title": "User-Create", "x-stoplight": { "id": "me8ky4aaxfsa8" }, "description": "Input parameters for User creation.", "type": "object", "required": [ "company_id", "first_name", "last_name", "iam_role_ids" ], "properties": { "company_id": { "type": "string", "x-stoplight": { "id": "nv1pabrl7wf1u" }, "format": "uuid" }, "first_name": { "type": "string", "x-stoplight": { "id": "2sp0qa9e7oyvg" } }, "last_name": { "type": "string", "x-stoplight": { "id": "3vee6r0l6qxra" } }, "iam_role_ids": { "type": "array", "x-stoplight": { "id": "54aq4izha1cge" }, "format": "uuid", "items": { "x-stoplight": { "id": "2q1vqmsd37old" }, "type": "string", "format": "uuid" } }, "email": { "type": "string", "x-stoplight": { "id": "qu15zuhcmmek4" }, "description": "User's email address.\n\nOne of email or phone is required." }, "phone": { "type": "string", "x-stoplight": { "id": "3t69nheyk3pbs" }, "description": "User's E.164 formatted phone number.\n\nOne of email or phone is required.", "example": "+18885551234" }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "send_invite": { "$ref": "#/components/schemas/SendInvite" }, "external_id": { "type": "string", "x-stoplight": { "id": "z61varc931mf1" }, "nullable": true }, "equipment_id": { "type": "string", "x-stoplight": { "id": "sxq0fk7ydi91j" }, "format": "uuid", "nullable": true }, "additional_equipment_ids": { "type": "array", "x-stoplight": { "id": "bow4yijkgrszd" }, "items": { "x-stoplight": { "id": "uabm0q6kx4eti" }, "type": "string", "format": "uuid" } }, "text_to_accept_enabled": { "type": "boolean", "x-stoplight": { "id": "rvne2r6livoau" } }, "label_ids": { "type": "array", "x-stoplight": { "id": "lbl1d5cr8usr1" }, "description": "Array of Label IDs to assign to this User.", "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false }, "User-Me-Read": { "title": "User-Me-Read", "x-stoplight": { "id": "j4a1tcqky0fl3" }, "allOf": [ { "$ref": "#/components/schemas/User-Read" }, { "type": "object", "x-stoplight": { "id": "661vzsxzpbu4p" }, "properties": { "intercom_hash": { "type": "string", "x-stoplight": { "id": "7j2ioq3aphg10" }, "description": "Intercom User verification hash" } }, "required": [ "intercom_hash" ] } ] }, "User-Read": { "title": "User-Read", "x-stoplight": { "id": "6ujqph9bhsa1a" }, "allOf": [ { "$ref": "#/components/schemas/User-Read-Nested" }, { "$ref": "#/components/schemas/Timestamps" }, { "type": "object", "required": [ "company", "iam_roles", "stytch_member_id", "stytch_member_status", "stytch_phone_id", "stytch_user_id", "stytch_user_status", "additional_equipment", "time_zone", "preferences", "text_to_accept_enabled", "last_login_at", "labels" ], "properties": { "company": { "$ref": "#/components/schemas/Company-Read-Nested" }, "iam_roles": { "x-stoplight": { "id": "qye9bcp0y5uul" }, "type": "array", "items": { "$ref": "#/components/schemas/IamRole-Read-Nested" } }, "stytch_member_id": { "type": "string", "x-stoplight": { "id": "ix2syq5ftfe9u" }, "description": "Stytch B2B Member ID for this `User`.", "nullable": true }, "stytch_member_status": { "$ref": "#/components/schemas/StytchMemberStatus" }, "stytch_phone_id": { "type": "string", "x-stoplight": { "id": "2svrmu9cyyrds" }, "description": "Stytch B2C Phone ID for this `User`.", "nullable": true }, "stytch_user_id": { "type": "string", "x-stoplight": { "id": "qdkap3qlietsh" }, "description": "Stytch B2C User ID for this `User`.", "nullable": true }, "stytch_user_status": { "$ref": "#/components/schemas/StytchMemberStatus" }, "equipment": { "$ref": "#/components/schemas/Equipment-Read-Nested" }, "additional_equipment": { "x-stoplight": { "id": "8p33bg3kpcdzy" }, "type": "array", "minItems": 0, "items": { "$ref": "#/components/schemas/Equipment-Read-Nested" } }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "preferences": { "$ref": "#/components/schemas/UserPreferences-Read" }, "text_to_accept_enabled": { "type": "boolean", "x-stoplight": { "id": "x9f7s7447dkor" } }, "last_login_at": { "type": "string", "x-stoplight": { "id": "pahq0jl62so8h" }, "nullable": true }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/Label-Read-Nested" }, "description": "Labels assigned to this user" } } } ], "description": "User model for reads. " }, "User-Read-Minimal": { "title": "User-Read-Minimal", "x-stoplight": { "id": "c25yzr29pbh5t" }, "allOf": [ { "$ref": "#/components/schemas/User-Read-Typeahead" }, { "$ref": "#/components/schemas/Discardable" }, { "x-stoplight": { "id": "qmk2e9npvoxcs" }, "type": "object", "required": [ "company" ], "properties": { "company": { "$ref": "#/components/schemas/Company-Read-Nested" } } } ] }, "User-Read-Nested": { "title": "User-Read-Nested", "x-stoplight": { "id": "llvhpyfas0ekp" }, "allOf": [ { "$ref": "#/components/schemas/User-Read-Typeahead" }, { "$ref": "#/components/schemas/Discardable" }, { "type": "object", "x-stoplight": { "id": "6i4ku1oj5jnjs" }, "required": [ "email", "phone", "external_id", "schedule_on" ], "properties": { "email": { "type": "string", "x-stoplight": { "id": "lyetvi4zixhq9" }, "nullable": true }, "phone": { "type": "string", "x-stoplight": { "id": "5dyog3jwd9m72" }, "description": "User's E.164 formatted phone number", "nullable": true }, "external_id": { "type": "string", "x-stoplight": { "id": "nk3qk35smj1ej" }, "nullable": true }, "schedule_on": { "type": "boolean", "x-stoplight": { "id": "5l8bajmm29c31" } } } } ] }, "User-Read-Typeahead": { "title": "User-Read-Typeahead", "x-stoplight": { "id": "ttbbss5b5k66f" }, "allOf": [ { "$ref": "#/components/schemas/Identifier" }, { "type": "object", "required": [ "first_name", "last_name" ], "properties": { "first_name": { "type": "string", "description": "First name", "x-stoplight": { "id": "gwo999rcdahmg" } }, "last_name": { "type": "string", "description": "Last name", "x-stoplight": { "id": "l9omnnsq644bh" } } } } ], "description": "" }, "User-Update": { "title": "User-Update", "x-stoplight": { "id": "9xenpkvfqtquj" }, "allOf": [ { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "iam_role_ids": { "type": "array", "format": "uuid", "items": { "type": "string", "format": "uuid", "x-stoplight": { "id": "lrtnsrl1niucz" } } }, "email": { "type": "string", "description": "User's email address.\n\nOne of email or phone is required.", "nullable": true }, "phone": { "type": "string", "description": "User's E.164 formatted phone number\n\nOne of email or phone is required.", "example": "+18885551234", "nullable": true }, "equipment_id": { "type": "string", "x-stoplight": { "id": "ssgcdro93re6i" }, "format": "uuid", "nullable": true }, "additional_equipment_ids": { "type": "array", "x-stoplight": { "id": "g3nhmof4pg5xa" }, "minItems": 0, "items": { "x-stoplight": { "id": "bwbqcht2c8r83" }, "type": "string", "format": "uuid" } }, "default_equipment_id": { "type": "string", "x-stoplight": { "id": "ulg0qkq6vrz1d" }, "nullable": true }, "default_additional_equipment_ids": { "type": "array", "x-stoplight": { "id": "ka4tso3ohq4wo" }, "minItems": 0, "items": { "x-stoplight": { "id": "wudd6vwja4pqk" }, "type": "string", "format": "uuid" } }, "time_zone": { "$ref": "#/components/schemas/TimeZone" }, "external_id": { "type": "string", "x-stoplight": { "id": "crc9fwgeh0yce" }, "nullable": true }, "preferences": { "$ref": "#/components/schemas/UserPreferences-Update" }, "text_to_accept_enabled": { "type": "boolean", "x-stoplight": { "id": "gr27ktlomjcai" } }, "label_ids": { "type": "array", "x-stoplight": { "id": "k8m3nlb5vq2wf" }, "description": "Array of Label IDs to assign to this User", "items": { "type": "string", "format": "uuid" } } } }, { "$ref": "#/components/schemas/AutoAddOn-BulkAssign" } ] }, "UserBulkAcceptJobsChannel-Read": { "title": "UserBulkAcceptJobsChannel-Read", "x-stoplight": { "id": "allbzzyomlh32" }, "type": "object", "x-internal": true, "required": [ "accepted_job_friendly_ids", "failed_job_friendly_ids" ], "properties": { "accepted_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "ktgvllj2xu4ri" }, "description": "The `Job.friendly_job_ids` that were accepted.", "items": { "x-stoplight": { "id": "4k9p9t39vuvpw" }, "type": "string" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "uxedrmwrd28c5" }, "description": "The `Job.friendly_job_ids` that failed to be accepted.", "items": { "x-stoplight": { "id": "iqmkqm4i0x2y2" }, "type": "string" } } }, "additionalProperties": false }, "UserBulkAssignJobsChannel-Read": { "title": "UserBulkAssignJobsChannel-Read", "x-stoplight": { "id": "3k486ib0mx3wf" }, "type": "object", "x-internal": true, "properties": { "assigned_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "zeqwuw651bojo" }, "description": "The `Job.friendly_job_ids` that were assigned.", "items": { "x-stoplight": { "id": "l31cyrxvxq8we" }, "type": "string" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "bk2chskga3d67" }, "description": "The `Job.friendly_job_ids` that failed to be assigned.", "items": { "x-stoplight": { "id": "ss1jfen0tpiqe" }, "type": "string" } } }, "additionalProperties": false }, "UserBulkCopyAssignmentsChannel-Read": { "title": "UserBulkCopyAssignmentsChannel-Read", "x-stoplight": { "id": "g5wt9c7g2ct1k" }, "type": "object", "required": [ "copied_job_friendly_ids", "failed_job_friendly_ids" ], "properties": { "copied_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "uygpb6ik9b5d5" }, "description": "The `Job.friendly_job_ids` that were copied", "items": { "x-stoplight": { "id": "rsals4ogemuqh" }, "type": "string", "format": "uuid" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "r2zoxyq746uxw" }, "description": "The `Job.friendly_job_ids` that failed to be copied", "items": { "x-stoplight": { "id": "chtxkyuoat9ga" }, "type": "string", "format": "uuid" } } }, "x-internal": true, "additionalProperties": false }, "UserBulkCreateSettlementChannel-Read": { "title": "UserBulkCreateSettlementChannel-Read", "x-stoplight": { "id": "0xtu3c5591wkp" }, "type": "object", "required": [ "created_customer_settlements", "created_vendor_settlements", "created_driver_settlements" ], "properties": { "created_customer_settlements": { "type": "object", "x-stoplight": { "id": "w201y5nvyjf8n" }, "required": [ "count", "total_amount" ], "properties": { "count": { "type": "integer", "x-stoplight": { "id": "cjx6k5gt6xkmb" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "trcz6h2w7adwd" } } } }, "created_vendor_settlements": { "type": "object", "x-stoplight": { "id": "wgg3k3z7n91ra" }, "required": [ "count", "total_amount" ], "properties": { "count": { "type": "integer", "x-stoplight": { "id": "79dq81zk3w49l" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "m5jygsnn24442" } } } }, "created_driver_settlements": { "type": "object", "x-stoplight": { "id": "jqozsfh8ffjzy" }, "required": [ "count", "total_amount" ], "properties": { "count": { "type": "integer", "x-stoplight": { "id": "2fkm7s4sko290" } }, "total_amount": { "type": "string", "x-stoplight": { "id": "fpar0zptmodpu" } } } } }, "additionalProperties": false }, "UserBulkDeleteJobsChannel-Read": { "title": "UserBulkDeleteJobsChannel", "x-stoplight": { "id": "wh7lna5mtzhf7" }, "type": "object", "required": [ "deleted_job_friendly_ids", "failed_job_friendly_ids" ], "properties": { "deleted_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "q0ckz2o9ifsgu" }, "items": { "x-stoplight": { "id": "ep05ibclitlqo" }, "type": "string" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "xmylquga6uymf" }, "items": { "x-stoplight": { "id": "68kq39s6em2t0" }, "type": "string" } } }, "additionalProperties": false }, "UserBulkSendJobsChannel-Read": { "title": "UserBulkSendJobsChannel-Read", "x-stoplight": { "id": "teuj7qn5xlinn" }, "type": "object", "properties": { "sent_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "cut4uojqky9sx" }, "description": "The `Job.friendly_job_ids` that were sent.", "items": { "x-stoplight": { "id": "szp44y7senr8u" }, "type": "string" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "42sysx7yfa35x" }, "description": "The `Job.friendly_job_ids` that failed to be sent.", "items": { "x-stoplight": { "id": "9xzsp4uom81j3" }, "type": "string" } } }, "x-internal": true, "additionalProperties": false }, "UserBulkUpdateJobsChannel-Read": { "title": "UserBulkUpdateJobsChannel-Read", "x-stoplight": { "id": "ome4h85wygndg" }, "type": "object", "properties": { "updated_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "2ak7c6qodt3cs" }, "description": "The `Job.friendly_job_ids` that were updated.", "items": { "x-stoplight": { "id": "5k8aar4gw62vj" }, "type": "string" } }, "failed_job_friendly_ids": { "type": "array", "x-stoplight": { "id": "kdu563jc5f2ua" }, "description": "The `Job.friendly_job_ids` that failed to be updated.", "items": { "x-stoplight": { "id": "eka30ggvpvtz2" }, "type": "string" } } }, "additionalProperties": false }, "UserDevicePermission-Read-Nested": { "title": "UserDevicePermission-Read-Nested", "x-stoplight": { "id": "e3jx6upc31ms7" }, "type": "object", "description": "An individual permission and current state", "required": [ "device_permission", "device_permission_state" ], "properties": { "device_permission": { "$ref": "#/components/schemas/DevicePermission" }, "device_permission_state": { "$ref": "#/components/schemas/DevicePermissionState" } }, "additionalProperties": false }, "UserDevicePermission-Update": { "title": "UserDevicePermission-Update", "x-stoplight": { "id": "tjt78iltqu7mp" }, "type": "object", "description": "This model will be used by the app to update array of user device permissions", "required": [ "device_id", "device_permissions" ], "properties": { "device_id": { "type": "string", "x-stoplight": { "id": "hoyojk7ugnk3l" } }, "device_permissions": { "type": "array", "x-stoplight": { "id": "kr5ocmelozr37" }, "items": { "$ref": "#/components/schemas/UserDevicePermissionCombined" } } }, "additionalProperties": false }, "UserDevicePermissionCombined": { "title": "UserDevicePermissionCombined", "x-stoplight": { "id": "e3ix6tpc21ms7" }, "type": "object", "description": "This is an object which combines the permission name and state", "required": [ "user_device_permission", "user_device_permission_state" ], "properties": { "user_device_permission": { "$ref": "#/components/schemas/DevicePermission" }, "user_device_permission_state": { "$ref": "#/components/schemas/DevicePermissionState" } }, "additionalProperties": false }, "UserPreference-Notification-Read": { "title": "UserPreference-Notification-Read", "x-stoplight": { "id": "en73kswq7u6pz" }, "type": "object", "properties": { "pending_job_reminder": { "type": "array", "x-stoplight": { "id": "rlrlm8oz7xlze" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "new_job_request": { "type": "array", "x-stoplight": { "id": "97tsxi2fnqtoz" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "start_job_reminder": { "type": "array", "x-stoplight": { "id": "zbbti6gi7o0b9" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "no_location_alert": { "type": "array", "x-stoplight": { "id": "c2ff3yue3eq6x" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_pending_request": { "type": "array", "x-stoplight": { "id": "tii1qjkplsuvr" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_accepted": { "type": "array", "x-stoplight": { "id": "rk3i76qlgf45t" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_rejected": { "type": "array", "x-stoplight": { "id": "qm3x22497l6ee" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_canceled": { "type": "array", "x-stoplight": { "id": "vxnw52tnenqzi" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_canceled": { "type": "array", "x-stoplight": { "id": "wxnw52tnenqzi" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_unassigned": { "type": "array", "x-stoplight": { "id": "xxnw52tnenqzi" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "end_shift_reminder": { "type": "array", "x-stoplight": { "id": "yxnw52tnenqzi" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_completed": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "load_completed": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_state_changed": { "type": "array", "x-stoplight": { "id": "k9m2h7qwp3x5t" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } } }, "additionalProperties": false }, "UserPreference-Notification-Update": { "title": "UserPreference-Notification-Update", "x-stoplight": { "id": "njl5wcmc5dxke" }, "type": "object", "properties": { "pending_job_reminder": { "type": "array", "x-stoplight": { "id": "bo4llpqgvnirb" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "new_job_request": { "type": "array", "x-stoplight": { "id": "jj2y0hhsovwj2" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "start_job_reminder": { "type": "array", "x-stoplight": { "id": "9ooofdwuon5m2" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "no_location_alert": { "type": "array", "x-stoplight": { "id": "f0cblm7sazl7h" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_pending_request": { "type": "array", "x-stoplight": { "id": "91no0cwp2mys5" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_accepted": { "type": "array", "x-stoplight": { "id": "in3bpzp9lg2y7" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_rejected": { "type": "array", "x-stoplight": { "id": "6k6wc9a78t5g5" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "order_canceled": { "type": "array", "x-stoplight": { "id": "qvo49zfowx4xl" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_unassigned": { "type": "array", "x-stoplight": { "id": "12349zfowx4xl" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "end_shift_reminder": { "type": "array", "x-stoplight": { "id": "45649zfowx4xl" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_canceled": { "type": "array", "x-stoplight": { "id": "78949zfowx4xl" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_completed": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "load_completed": { "type": "array", "items": { "$ref": "#/components/schemas/NotificationMethod" } }, "job_state_changed": { "type": "array", "x-stoplight": { "id": "r4n8j5swm2y6v" }, "items": { "$ref": "#/components/schemas/NotificationMethod" } } }, "additionalProperties": false }, "UserPreferences-Read": { "title": "UserPreferences-Read", "x-stoplight": { "id": "krp6z3ve78jym" }, "type": "object", "properties": { "notifications": { "$ref": "#/components/schemas/UserPreference-Notification-Read" } }, "additionalProperties": false }, "UserPreferences-Update": { "title": "UserPreferences-Update", "x-stoplight": { "id": "jrnm8j1ct880d" }, "type": "object", "properties": { "notifications": { "$ref": "#/components/schemas/UserPreference-Notification-Update" } }, "additionalProperties": false }, "Version-Read": { "title": "Version-Read", "x-stoplight": { "id": "7gy0fsdb7cj8p" }, "type": "object", "x-internal": true, "required": [ "sha", "time" ], "properties": { "sha": { "type": "string", "x-stoplight": { "id": "4ci3zf3ruvgv7" } }, "time": { "type": "string", "x-stoplight": { "id": "ui2uehdkrw33p" }, "format": "date-time" } }, "additionalProperties": false }, "Waypoint-Create": { "title": "Waypoint-Create", "x-stoplight": { "id": "lkkjczl49mn3l" }, "type": "object", "required": [ "type", "site_id", "ordinality" ], "properties": { "type": { "$ref": "#/components/schemas/WaypointType" }, "site_id": { "type": "string", "x-stoplight": { "id": "qlodrw03gom0x" }, "format": "uuid" }, "contact": { "$ref": "#/components/schemas/Contact-Create" }, "ordinality": { "type": "integer", "x-stoplight": { "id": "bfpbu9vyhtn9a" } } }, "additionalProperties": false }, "Waypoint-Read-Nested": { "title": "Waypoint-Read-Nested", "x-stoplight": { "id": "s7xrqujvsvhq0" }, "allOf": [ { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/WaypointType" }, "ordinality": { "type": "integer", "x-stoplight": { "id": "fn4w5zg9n1hyl" } }, "contact": { "$ref": "#/components/schemas/Contact-Read-Nested" }, "site": { "$ref": "#/components/schemas/Site-Read-Nested" } }, "required": [ "type", "ordinality", "site" ] }, { "$ref": "#/components/schemas/Identifier" } ] }, "Waypoint-Update-Destroyable": { "title": "Waypoint-Update-Destroyable", "x-stoplight": { "id": "w96rpm44miiib" }, "allOf": [ { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/WaypointType" }, "site_id": { "type": "string", "x-stoplight": { "id": "8quojxs0ual5a" }, "format": "uuid" }, "contact": { "$ref": "#/components/schemas/Contact-Update" }, "ordinality": { "type": "integer", "x-stoplight": { "id": "53pb6rybmktqc" } } } }, { "$ref": "#/components/schemas/Destroyable" } ], "description": "" }, "WaypointType": { "title": "WaypointType", "x-stoplight": { "id": "a8567v0zl3pi3" }, "enum": [ "pickup", "drop_off", "weigh_point" ], "example": "pickup" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "Error": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Error-Response" } } } }, "ModelError": { "description": "", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/ModelError-Response" } } } }, "StateError": { "description": "Example response", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/StateError-Response" } } } }, "HealthCheck": { "description": "Health check response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/HealthCheck-Read" } }, "required": [ "data" ] } } } }, "UnauthenticatedError": { "description": "Example response", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/UnauthenticatedError-Response" } } } } }, "parameters": { "Accept-Language": { "name": "Accept-Language", "in": "header", "schema": { "type": "string", "default": "en", "example": "en" }, "description": "The Accept-Language request HTTP header indicates the natural language and locale that the client prefers. " }, "ids": { "name": "ids", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Primary IDs based on resource.id" }, "page-limit": { "name": "page[limit]", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 25, "maximum": 100 }, "description": "The maximum number of paginated results to return" }, "page-after": { "name": "page[after]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The cursor to start paginating after" }, "page-before": { "name": "page[before]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The cursor to stop paginating at" }, "search-datagrid": { "name": "search[datagrid]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search string for datagrid queries" }, "search-query": { "name": "search[query]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search string for queries" }, "filter-states": { "name": "filter[states]", "in": "query", "schema": { "type": "array" }, "description": "States based on the resource (e.g. Order states or Job states)" }, "filter-account_types": { "name": "filter[account_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "AccountType filter" }, "filter-start_date": { "name": "filter[start_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Start date range" }, "filter-end_date": { "name": "filter[end_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "End date range" }, "filter-customer_account_ids": { "name": "filter[customer_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Customer Account IDs" }, "filter-vendor_account_ids": { "name": "filter[vendor_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Vendor Account IDs" }, "filter-driver_ids": { "name": "filter[driver_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The assigned Driver IDs" }, "filter-pickup_site_ids": { "name": "filter[pickup_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Pickup Site IDs" }, "filter-dropoff_site_ids": { "name": "filter[dropoff_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Dropoff Site IDs" }, "filter-equipment_ids": { "name": "filter[equipment_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Equipment IDs" }, "filter-material_ids": { "name": "filter[material_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Material IDs" }, "filter-project_ids": { "name": "filter[project_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Project IDs" }, "filter-service_ids": { "name": "filter[service_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Service IDs" }, "filter-equipment_type_ids": { "name": "filter[equipment_type_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated EquipmentType IDs" }, "filter-job-customer_account_ids": { "name": "filter[job][customer_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Customer Account IDs for the Job" }, "filter-job-driver_ids": { "name": "filter[job][driver_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The assigned Driver IDs for the Job" }, "filter-job-dropoff_site_ids": { "name": "filter[job][dropoff_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Dropoff Site IDs for the Job" }, "filter-job-end_date": { "name": "filter[job][end_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "End date range for Job.job_start_at" }, "filter-job-equipment_ids": { "name": "filter[job][equipment_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Equipment IDs for the Job" }, "filter-job-external_ids": { "name": "filter[job][external_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated External Project IDs for the Job" }, "filter-job-material_ids": { "name": "filter[job][material_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Material IDs for the Job" }, "filter-job-pickup_site_ids": { "name": "filter[job][pickup_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Pickup Site IDs for the Job" }, "filter-job-project_ids": { "name": "filter[job][project_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Project IDs for the Job" }, "filter-job-service_ids": { "name": "filter[job][service_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Service IDs for the Job" }, "filter-job-start_date": { "name": "filter[job][start_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Start date range for Job.job_start_at" }, "filter-job-states": { "name": "filter[job][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Job states" }, "filter-job-vendor_account_ids": { "name": "filter[job][vendor_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Vendor Account IDs for the Job" }, "search-job-datagrid": { "name": "search[job][datagrid]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search string for datagrid queries" }, "search-invoice-datagrid": { "name": "search[invoice][datagrid]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search string for invoice datagrid queries" }, "filter-connected": { "name": "filter[connected]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show connected Accounts" }, "filter-discarded": { "name": "filter[discarded]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show discarded Accounts" }, "filter-account_id": { "name": "filter[account_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Account ID filter" }, "filter-invoice_category": { "name": "filter[invoice_category]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The Invoice category filter. See InvoiceCategoryFilter for accepted values." }, "filter-account_ids": { "name": "filter[account_ids]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Account IDs filter" }, "filter-shared": { "name": "filter[shared]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter shared CompanyShareable models" }, "filter-dispatchable": { "name": "filter[dispatchable]", "in": "query", "schema": { "type": "boolean" }, "description": "Filter dispatchable CompanyShareable models" }, "filter-driver_id": { "name": "filter[driver_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Driver ID filter" }, "filter-equipment_id": { "name": "filter[equipment_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Equipment ID filter" }, "filter-include_default": { "name": "filter[include_default]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Includes default rates when set to true" }, "filter-owner_type": { "name": "filter[owner_type]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "RateOwnerType filter" }, "filter-project_id": { "name": "filter[project_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Project ID filter" }, "filter-service_id": { "name": "filter[service_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Service ID filter" }, "filter-external_ids": { "name": "filter[external_ids]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The associated External IDs" }, "filter-grouped": { "name": "filter[grouped]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show Invoices that are part of a Settlement" }, "filter-rate_types": { "name": "filter[rate_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Array of rate types to filter by" }, "filter-iam_roles": { "name": "filter[iam_roles]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The IamRoles of the User. Allowed values: `platform_admin`, `company_admin`, `dispatcher`, `biller`, `foreman`, `driver`, `it_admin`, `manager`", "allowEmptyValue": false, "explode": false }, "filter-job-company_ids": { "name": "filter[job][company_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Company IDs for the Job" }, "filter-requester_ids": { "name": "filter[requester_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Requester IDs" }, "filter-invoiceable_type": { "name": "filter[invoiceable_type]", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "Job", "DriverDay" ] }, "description": "InvoiceableType enum filter (e.g. Job, DriverDay)" }, "filter-job-site_types": { "name": "filter[job][site_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "SiteType enum filters for the Job (see SiteType enum for the list of values)" }, "facet-search-query": { "name": "facet[search][query]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The typeahead search query. Matches on the models's `name` field" }, "facet-filter-waypoint-type": { "name": "facet[filter][waypoint][type]", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "pickup", "drop_off" ] }, "description": "A Waypoint type to filter on. Can be omitted to return all." }, "filter-resource_type": { "name": "filter[resource_type]", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "Site" ] }, "description": "Resource Type" }, "filter-customer_account_id": { "name": "filter[customer_account_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated Customer Account ID" }, "filter-material_id": { "name": "filter[material_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated Material ID" }, "filter-show_all": { "name": "filter[show_all]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Show all records. Deprecated in favor of `filter[availability]`", "deprecated": true }, "filter-site_id": { "name": "filter[site_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated Site ID" }, "filter-default_only": { "name": "filter[default_only]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show default records" }, "filter-material_rates": { "name": "filter[material_rates]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter on whether the Account has associated MaterialRates" }, "filter-site_ids": { "name": "filter[site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Site IDs" }, "filter-foreman_ids": { "name": "filter[foreman_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Foreman IDs" }, "filter-job-foreman_ids": { "name": "filter[job][foreman_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Foreman IDs for the Job" }, "filter-collaborator_ids": { "name": "filter[collaborator_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Collaborator IDs" }, "filter-salesperson_ids": { "name": "filter[salesperson_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Salesperson IDs" }, "filter-department_ids": { "name": "filter[department_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Department IDs. Use 'none' to filter for records without a Department." }, "filter-job-collaborator_ids": { "name": "filter[job][collaborator_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Collaborator IDs for the Job" }, "filter-job-salesperson_ids": { "name": "filter[job][salesperson_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Salesperson IDs for the Job" }, "filter-site_types": { "name": "filter[site_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "SiteType enum filters (see SiteType enum for the list of values)" }, "search-site-query": { "name": "search[site][query]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search string for queries on Site" }, "filter-date": { "name": "filter[date]", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Single Date Filter" }, "sort-dispatch_number-name": { "name": "sort[dispatch_number][name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by DispatchNumber name `asc` or `desc`" }, "sort-created_at": { "name": "sort[created_at]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Created At timestamp `asc` or `desc`" }, "sort-load_at": { "name": "sort[load_at]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Load At timestamp `asc` or `desc`" }, "sort-friendly_order_id": { "name": "sort[friendly_order_id]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Friendly Order ID `asc` or `desc`" }, "sort-account-name": { "name": "sort[account][name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by the associated Account's Name `asc` or `desc`" }, "sort-company-legal_name": { "name": "sort[company][legal_name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by the associated Company's Legal Name `asc` or `desc`" }, "filter-connected_company-company_types": { "name": "filter[connected_company][company_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Connected Company Type enum filters (see CompanyType enum for the list of values)" }, "filter-availability": { "name": "filter[availability]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter based on record availability based on the `date` parameter/filter, defaulting to the current day." }, "filter-expiring": { "name": "filter[expiring]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter based on record expiry. Default is `null`, which means all records are returned, `true` will omit non-expiring records, `false` will omit expiring records." }, "filter-company_ids": { "name": "filter[company_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Company IDs " }, "filter-account_type": { "name": "filter[account_type]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "AccountType filter. See `AccountType` enum for accepted values." }, "filter-auto_add_ons": { "name": "filter[auto_add_ons]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter on whether the resource (e.g. Account, User) has associated AutoAddOns" }, "filter-label_ids": { "name": "filter[label_ids]", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "description": "Filter by Label IDs. Returns records that have ANY of the specified labels (OR logic)." }, "filter-add_on_types": { "name": "filter[add_on_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "AddOnTypes enum filter. See AddOnType enum for accepted values." }, "filter-invoice-start_date": { "name": "filter[invoice][start_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Start date range for Invoice" }, "filter-invoice-end_date": { "name": "filter[invoice][end_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "End date range for Invoice" }, "filter-invoice-states": { "name": "filter[invoice][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "States based on the Invoice" }, "filter-invoice-invoice_category": { "name": "filter[invoice][invoice_category]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "The Invoice category filter. See InvoiceCategoryFilter for accepted values." }, "filter-invoice-grouped": { "name": "filter[invoice][grouped]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show Invoices that are part of a Settlement" }, "filter-invoice-customer_account_ids": { "name": "filter[invoice][customer_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Customer Account IDs for the Invoice" }, "filter-invoice-vendor_account_ids": { "name": "filter[invoice][vendor_account_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Vendor Account IDs for the Invoice" }, "filter-invoice-dropoff_site_ids": { "name": "filter[invoice][dropoff_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Dropoff Site IDs for the Invoice" }, "filter-invoice-pickup_site_ids": { "name": "filter[invoice][pickup_site_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Pickup Site IDs for Invoice" }, "filter-invoice-project_ids": { "name": "filter[invoice][project_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Project IDs for Invoice" }, "filter-invoice-rate_types": { "name": "filter[invoice][rate_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Array of rate types to filter by for Invoice" }, "filter-invoice-invoiceable_type": { "name": "filter[invoice][invoiceable_type]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "InvoiceableType enum filter (e.g. Job, DriverDay)" }, "filter-invoice-driver_ids": { "name": "filter[invoice][driver_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The assigned Driver IDs for the Invoice" }, "filter-company_id": { "name": "filter[company_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated Company ID" }, "filter-invoice-company_id": { "name": "filter[invoice][company_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated Company ID of the Invoice" }, "filter-ticket-flagged": { "name": "filter[ticket][flagged]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Filter to only loads with flagged or unflagged tickets" }, "filter-sender_company_ids": { "name": "filter[sender_company_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Sender Company IDs" }, "filter-sender_company_types": { "name": "filter[sender_company_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "CompanyType enum filter. See CompanyType enum for accepted values." }, "filter-add_on_rate_types": { "name": "filter[add_on_rate_types]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "AddOnRateTypes enum filter. See AddOnRateType enum for accepted values." }, "filter-service_class_id": { "name": "filter[service_class_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated ServiceClass ID" }, "filter-equipment_type_id": { "name": "filter[equipment_type_id]", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "The associated EquipmentType ID" }, "filter-dispatch_number_ids": { "name": "filter[dispatch_number_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated DispatchNumber IDs" }, "filter-po_job_numbers": { "name": "filter[po_job_numbers]", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "description": "The associated PO/Job Numbers", "x-stoplight": { "id": "k8mj3nxp2r7t1" } }, "filter-service_class_ids": { "name": "filter[service_class_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated ServiceClass IDs", "x-stoplight": { "id": "r5tp9qwm4j2n8" } }, "filter-order-dispatch_number_ids": { "name": "filter[order][dispatch_number_ids]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "The associated Order's DispatchNumber IDs" }, "filter-sources": { "name": "filter[sources]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "Array of sources (Tickets)" }, "filter-job-receivable_invoice-states": { "name": "filter[job][receivable_invoice][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "States based on the Job Receivable Invoice" }, "filter-job-payable_invoice-states": { "name": "filter[job][payable_invoice][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "States based on the Job Payable Invoice" }, "filter-receivable_invoice-states": { "name": "filter[receivable_invoice][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "States based on the Receivable Invoice" }, "filter-payable_invoice-states": { "name": "filter[payable_invoice][states]", "in": "query", "required": false, "schema": { "type": "array" }, "description": "States based on the Payable Invoice" }, "sort-driver_day_date": { "name": "sort[driver_day_date]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Driver Day Date `asc` or `desc`" }, "sort-driver-first_name": { "name": "sort[driver][first_name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Driver First Name `asc` or `desc`" }, "sort-driver-last_name": { "name": "sort[driver][last_name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Driver Last Name `asc` or `desc`" }, "sort-vendor_account-name": { "name": "sort[vendor_account][name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort by Vendor Account Name `asc` or `desc`" }, "filter-missing_company_share": { "name": "filter[missing_company_share]", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "Only show records missing a `CompanyShare`" }, "filter-states-": { "name": "filter[states][]", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LoadState" } }, "description": "Filter loads by state. Multiple states can be provided to filter loads matching any of the specified states." }, "sort-name": { "name": "sort[name]", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Sort on Name `asc` or `desc`" } }, "requestBodies": {} }, "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "Projects" }, { "name": "Orders" }, { "name": "Loads" }, { "name": "Jobs" }, { "name": "JobAssignments" }, { "name": "ApprovalAssignments" }, { "name": "Equipment" }, { "name": "FuelSurcharges" }, { "name": "Materials" }, { "name": "Accounts" }, { "name": "Tickets" }, { "name": "Users" }, { "name": "Sites" }, { "name": "Companies" }, { "name": "Departments" }, { "name": "Rates" }, { "name": "Services" }, { "name": "EquipmentType" }, { "name": "FileAttachments" }, { "name": "MaterialType" }, { "name": "LineItemType" }, { "name": "DriverStateEvent" }, { "name": "Authentication" }, { "name": "IamRoles" }, { "name": "Typeaheads" }, { "name": "Integrations" }, { "name": "Reflection" }, { "name": "LoadCycles" }, { "name": "AddOns" }, { "name": "ServiceClass" }, { "name": "Invoices" }, { "name": "JobSummaries" }, { "name": "LoadSummaries" }, { "name": "CompanyShares" }, { "name": "UserDevicePermission" }, { "name": "Drivers" }, { "name": "Settlements" }, { "name": "LocationHistories" }, { "name": "Telematics" }, { "name": "OmniReports" }, { "name": "DriverDays" }, { "name": "Agave" }, { "name": "AddOnCharges" }, { "name": "ResourceUsageLogs" }, { "name": "ResourceScopes" }, { "name": "TravelledDistances" }, { "name": "MaterialRates" }, { "name": "CompanyDayJobStats" }, { "name": "KMLFiles" }, { "name": "AutoAddOnAssignments" }, { "name": "SiteRateSchedules" }, { "name": "TwilioIntegrations" }, { "name": "Foremen" }, { "name": "AccountExternalTruckIdentifier" }, { "name": "GeofenceTriggers" }, { "name": "Labels" }, { "name": "Compliance" }, { "name": "ComplianceDocuments" } ] }