tread.io LoadSummaries API
The LoadSummaries API from tread.io — 1 operation(s) for loadsummaries.
The LoadSummaries API from tread.io — 1 operation(s) for loadsummaries.
openapi: 3.0.3
info:
title: Horizon API V1 AccountExternalTruckIdentifier LoadSummaries API
version: '1.0'
contact:
name: Tread
url: https://tread.io
email: developers@tread.io
description: 'This is the Version 1 implementation.
When 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
security:
- bearerAuth: []
tags:
- name: LoadSummaries
paths:
/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`.
This endpoint requires the `edit_load_summaries` and `edit_job` `IamPermission`.'
components:
schemas:
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-Read:
title: LoadSummary-Read
x-stoplight:
id: dtdqwthqqnted
allOf:
- $ref: '#/components/schemas/LoadSummary-Read-Nested'
- $ref: '#/components/schemas/Identifier'
- $ref: '#/components/schemas/Timestamps'
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
Identifier:
title: Identifier
x-stoplight:
id: gnd39lue5v7ol
type: object
required:
- id
properties:
id:
type: string
x-stoplight:
id: 2e38hjk4zd58m
format: uuid
additionalProperties: false
Error-Response:
title: Error-Response
x-stoplight:
id: 52cydhphee3qe
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
additionalProperties: false
UnauthenticatedError-Response:
title: UnauthenticatedError-Response
x-stoplight:
id: o477eph7ttbzt
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/UnauthenticatedError'
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
ModelError-Response:
title: ModelError-Response
x-stoplight:
id: payf9ndh3l6np
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/ModelError'
additionalProperties: false
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
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
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
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'
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'
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. '
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
x-stoplight:
id: 75rfxjepk4523