{"openapi":"3.1.0","info":{"title":"The Leonard API","version":"1.1.0","description":"A company's own systems read its loads, trucks, drivers, invoices, documents and a live load's tracking, and upload documents. The version is in the path: a breaking change means /api/v2, and /api/v1 keeps working at least 12 months after v2 ships. Times are ISO 8601 in UTC; money is a whole number of cents beside a currency; every answer carries a Request-Id."},"servers":[{"url":"https://desk.leonarddispatch.com/api/v1"}],"tags":[{"name":"Loads"},{"name":"Tracking"},{"name":"Trucks"},{"name":"Drivers"},{"name":"Invoices"},{"name":"Documents"},{"name":"Partner totals"},{"name":"The spec"}],"paths":{"/loads":{"get":{"operationId":"getLoads","tags":["Loads"],"summary":"List loads","description":"The company's loads, the latest change first.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}},{"name":"updated_since","in":"query","required":false,"description":"Only rows changed at or after this time (ISO 8601). For keeping a copy in step.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only rows in this status (a truck's state).","schema":{"type":"string","pattern":"^[a-z_]{2,30}$"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Load"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["loads:read"]}]}},"/loads/{id}":{"get":{"operationId":"getLoadsId","tags":["Loads"],"summary":"Get a load","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Load"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing of yours has that id.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["loads:read"]}]}},"/loads/{id}/tracking":{"get":{"operationId":"getLoadsIdTracking","tags":["Tracking"],"summary":"A live load's tracking events","description":"Positions and stop events for one load, the newest first, while the load is live (booked, in transit or at the dock). After delivery the answer is live: false with no events; nothing is ever returned for the time between loads.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"live":{"type":"boolean","description":"Whether the load is live. Tracking exists only while it is: nothing before pickup is booked, nothing after delivery."},"data":{"type":"array","items":{"$ref":"#/components/schemas/TrackingEvent"}},"next_cursor":{"type":["string","null"]}},"required":["live","data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing of yours has that id.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["tracking:read"]}]}},"/trucks":{"get":{"operationId":"getTrucks","tags":["Trucks"],"summary":"List trucks","description":"The trucks and the one state each is in.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}},{"name":"updated_since","in":"query","required":false,"description":"Only rows changed at or after this time (ISO 8601). For keeping a copy in step.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only rows in this status (a truck's state).","schema":{"type":"string","pattern":"^[a-z_]{2,30}$"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Truck"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["trucks:read"]}]}},"/drivers":{"get":{"operationId":"getDrivers","tags":["Drivers"],"summary":"List drivers","description":"Name and unit only. Never a phone number or an email.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}},{"name":"updated_since","in":"query","required":false,"description":"Only rows changed at or after this time (ISO 8601). For keeping a copy in step.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only rows in this status (a truck's state).","schema":{"type":"string","pattern":"^[a-z_]{2,30}$"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Driver"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["drivers:read"]}]}},"/invoices":{"get":{"operationId":"getInvoices","tags":["Invoices"],"summary":"List invoices","parameters":[{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}},{"name":"updated_since","in":"query","required":false,"description":"Only rows changed at or after this time (ISO 8601). For keeping a copy in step.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only rows in this status (a truck's state).","schema":{"type":"string","pattern":"^[a-z_]{2,30}$"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["invoices:read"]}]}},"/invoices/{id}":{"get":{"operationId":"getInvoicesId","tags":["Invoices"],"summary":"Get an invoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing of yours has that id.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["invoices:read"]}]}},"/documents":{"get":{"operationId":"getDocuments","tags":["Documents"],"summary":"List documents","description":"Each document's facts, the newest first. updated_since reads the day it was added: a document doesn't change.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many rows, 1 to 200. Default 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string","maxLength":200}},{"name":"updated_since","in":"query","required":false,"description":"Only rows changed at or after this time (ISO 8601). For keeping a copy in step.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"load_id","in":"query","required":false,"description":"Only this load's documents.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"document_type","in":"query","required":false,"schema":{"type":"string","enum":["rate_confirmation","bol","pod","invoice","other","lumper","scale","coi","securement_photo","permit","escort_contract","w9","noa","authority_letter","cdl","medical_card","registration","inspection"]}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["documents:read"]}]},"post":{"operationId":"postDocuments","tags":["Documents"],"summary":"Upload a document","description":"multipart/form-data with the file in `file` (a PDF or a photo, up to 25 MB). Send an Idempotency-Key header: the same key with the same file answers with the first document again and never makes a second.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Any string of up to 200 characters, unique to this upload. A retry with the same key and the same file answers with the first document.","schema":{"type":"string","maxLength":200}}],"responses":{"201":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Document"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The first request with this Idempotency-Key is still being worked. Try again shortly.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The file is over 25 MB.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The upload isn't multipart/form-data, or the file isn't a PDF or a photo.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was already used with a different file or different fields.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["documents:write"]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The file: application/pdf, image/jpeg, image/png, image/webp, image/heic."},"document_type":{"default":"other","type":"string","enum":["rate_confirmation","bol","pod","invoice","other","lumper","scale","coi","securement_photo","permit","escort_contract","w9","noa","authority_letter","cdl","medical_card","registration","inspection"]},"load_id":{"description":"The load the document belongs to.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"description":"What to call it. Defaults to the file's name.","type":"string","minLength":1,"maxLength":200}}}}}}}},"/documents/{id}":{"get":{"operationId":"getDocumentsId","tags":["Documents"],"summary":"Get a document's facts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Document"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing of yours has that id.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["documents:read"]}]}},"/documents/{id}/download":{"get":{"operationId":"getDocumentsIdDownload","tags":["Documents"],"summary":"Download a document","description":"The file itself, with its own content type.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing of yours has that id.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["documents:read"]}]}},"/partner/overview":{"get":{"operationId":"getPartnerOverview","tags":["Partner totals"],"summary":"The program's totals","description":"The same totals the partner console shows, from the same daily snapshot: never a single carrier, never a number with fewer than five carriers in it.","parameters":[],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PartnerOverview"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["partner:read"]}]}},"/partner/pilot":{"get":{"operationId":"getPartnerPilot","tags":["Partner totals"],"summary":"The pilot's measures, at the start and today","parameters":[],"responses":{"200":{"description":"OK","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PartnerPilot"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"A parameter or a field is wrong; the message says which.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized, key_expired","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"missing_scope, ip_not_allowed, wrong_key_kind, plan_required, company_closed","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry-After says how many seconds to wait.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"},"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerKey":["partner:read"]}]}},"/openapi.json":{"get":{"operationId":"getOpenapiJson","tags":["The spec"],"summary":"This API as an OpenAPI 3.1 document","description":"Needs no key.","parameters":[],"responses":{"200":{"description":"The document.","headers":{"Request-Id":{"$ref":"#/components/headers/Request-Id"}},"content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}}},"components":{"securitySchemes":{"bearerKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer lk_live_… (or lk_test_… for the sandbox). Scopes: loads:read (Read loads); trucks:read (Read trucks); drivers:read (Read drivers (name and unit)); invoices:read (Read invoices); documents:read (Read and download documents); documents:write (Upload documents); tracking:read (Read a live load's tracking); partner:read (Read the program's totals)."}},"headers":{"Request-Id":{"description":"This request's id. Quote it when you write to us.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key (600).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts again.","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"A fixed word for the kind of error, safe to branch on."},"message":{"type":"string","description":"A sentence for a person."},"request_id":{"type":"string","description":"The same value as the Request-Id header."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"The HTTP status again, for keys made before 2026-11-15."}},"required":["code","message","request_id","status"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Load":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},"reference":{"type":["string","null"]},"broker_reference":{"type":["string","null"]},"status":{"type":"string","enum":["evaluating","offered","booked","in_transit","at_dock","delivered","paperwork","invoiced","paid","closed","lost"]},"origin":{"type":"object","properties":{"city":{"type":["string","null"]},"state":{"type":["string","null"]}},"required":["city","state"],"additionalProperties":false},"destination":{"type":"object","properties":{"city":{"type":["string","null"]},"state":{"type":["string","null"]}},"required":["city","state"],"additionalProperties":false},"pickup_appointment":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"delivery_appointment":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"equipment":{"type":["string","null"]},"rate_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A whole number of cents."},{"type":"null"}],"description":"The linehaul rate, in cents."},"projected_net_profit_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A whole number of cents."},{"type":"null"}],"description":"Leonard's projected net profit on the load, in cents."},"currency":{"type":"string","const":"USD","description":"ISO 4217. Leonard keeps US dollars."},"rate":{"deprecated":true,"description":"The rate in dollars. Kept for keys made before 2026-11-15; read rate_cents.","type":["number","null"]},"projected_net_profit":{"deprecated":true,"description":"In dollars. Read projected_net_profit_cents.","type":["number","null"]},"miles":{"type":["number","null"]},"verdict":{"anyOf":[{"type":"string","enum":["TAKE","COUNTER","BACKUP","SKIP","WAIT","REPOSITION"]},{"type":"null"}]},"truck_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"driver_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"broker_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."}},"required":["id","reference","broker_reference","status","origin","destination","pickup_appointment","delivery_appointment","equipment","rate_cents","projected_net_profit_cents","currency","rate","projected_net_profit","miles","verdict","truck_id","driver_id","broker_id","delivered_at","paid_at","created_at","updated_at"],"additionalProperties":false},"TrackingEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["position","dispatched","arrived_pickup","loaded","departed_pickup","arrived_delivery"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},"source":{"description":"Where it came from: eld, driver_link, text, driver_sms, dispatcher or system.","type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"speed_mph":{"type":["number","null"]},"heading":{"type":["number","null"]}},"required":["id","type","at","source","lat","lng","speed_mph","heading"],"additionalProperties":false},"Truck":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},"unit_number":{"type":["string","null"]},"state":{"description":"The one state the truck is in: empty_soon, searching, offered, booked, in_transit, at_dock, delivered, paperwork, invoiced or paid.","type":["string","null"]},"empty_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"equipment":{"type":["string","null"]},"trailer_type":{"type":["string","null"]},"year":{"type":["number","null"]},"make":{"type":["string","null"]},"model":{"type":["string","null"]},"driver_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"current_load_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"carrier_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."}},"required":["id","unit_number","state","empty_at","equipment","trailer_type","year","make","model","driver_id","current_load_id","carrier_id","updated_at"],"additionalProperties":false},"Driver":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},"full_name":{"type":"string"},"unit_number":{"description":"The unit the driver is on.","type":["string","null"]},"status":{"type":["string","null"]},"carrier_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."}},"required":["id","full_name","unit_number","status","carrier_id","updated_at"],"additionalProperties":false,"description":"A driver: the name and the unit. Never a phone number, an email, a licence or a home address."},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},"number":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["draft","issued","submitted_to_factor","paid","void"]},"load_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"broker_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"carrier_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"subtotal_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A whole number of cents."},"total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A whole number of cents."},"paid_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A whole number of cents."},"currency":{"type":"string","const":"USD","description":"ISO 4217. Leonard keeps US dollars."},"issued_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"due_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"submitted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."}},"required":["id","number","kind","status","load_id","broker_id","carrier_id","subtotal_cents","total_cents","paid_cents","currency","issued_at","due_at","submitted_at","paid_at","created_at","updated_at"],"additionalProperties":false},"Document":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},"document_type":{"type":"string","enum":["rate_confirmation","bol","pod","invoice","other","lumper","scale","coi","securement_photo","permit","escort_contract","w9","noa","authority_letter","cdl","medical_card","registration","inspection"]},"name":{"type":["string","null"]},"content_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"load_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"truck_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"driver_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"broker_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"carrier_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"A uuid."},{"type":"null"}]},"expires_on":{"description":"A date, YYYY-MM-DD, for a document that runs out.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC."}},"required":["id","document_type","name","content_type","size_bytes","load_id","invoice_id","truck_id","driver_id","broker_id","carrier_id","expires_on","created_at"],"additionalProperties":false,"description":"A document's facts. The file itself is GET /documents/{id}/download; its text is never in the API."},"PartnerOverview":{"type":"object","properties":{"enough":{"type":"boolean","description":"False while fewer than five carriers are in the program's totals; then there are no totals."},"message":{"type":"string"},"as_of":{"description":"The day of the snapshot, YYYY-MM-DD. Totals change once a day.","type":"string"},"invited":{"type":"number"},"metrics":{"description":"The console's totals. Each measure is { n, v }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trend":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["enough"],"additionalProperties":false},"PartnerPilot":{"type":"object","properties":{"enough":{"type":"boolean"},"message":{"type":"string"},"pilot":{"type":"boolean"},"start":{"type":["string","null"]},"at_start":{"type":"object","properties":{"date":{"type":"string"},"measures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"n":{"type":["number","null"]},"v":{"type":["number","null"]},"short":{"type":"boolean"}},"required":["n","v"],"additionalProperties":false},{}]}}},"required":["date","measures"],"additionalProperties":false},"today":{"type":"object","properties":{"date":{"type":"string"},"measures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"n":{"type":["number","null"]},"v":{"type":["number","null"]},"short":{"type":"boolean"}},"required":["n","v"],"additionalProperties":false},{}]}}},"required":["date","measures"],"additionalProperties":false}},"required":["enough"],"additionalProperties":false}}}}