openapi: 3.1.0 info: title: ShiftHaul Partner API version: 1.1.0 summary: ShiftHaul car shipping prices for publishers, and booking and tracking for business accounts. description: | Version 1, for approved partners. Two kinds of keys use the same base URL: - Publisher keys show ShiftHaul's price on the partner's site with a checkout link to book it. Docs: https://shifthaul.com/developers/api/ - Business account keys (dealers, auctions, fleets with an approved ShiftHaul Business account and a signed master agreement) get contract prices, create and manage orders, upload and download documents, message dispatch, read invoices and receive webhooks. Docs: https://shifthaul.com/developers/api/business/ Operations tagged "Business accounts only" answer 404 to a publisher key. POST /quotes and GET /quotes/{quote_id} answer both kinds of keys with different bodies (see the oneOf schemas). Server to server only: never put an API key in browser code, a mobile app or a public repo. The API sends no CORS headers. Test keys (shk_test_) use the same base URL with their own sandbox data. Live keys (shk_live_) return real prices and real orders. A publisher test key returns sample prices ("sample_price": true and the ShiftHaul-Sample-Price: true header); a business test key returns the account's real contract prices with test orders. Publisher limits: 20 requests a minute per key; 100 quotes and 50 new routes (pickup ZIP to delivery ZIP, in that direction) a day per account, all keys together; test keys have the same limits with their own counters. Prices are for the visitor who asked for them. Partners may not store, compile, resell or share prices, or use the API to build a price list (partner program terms, section 6: https://shifthaul.com/partner-program/terms/#api). Business limits: 20 quotes and 120 other requests a minute per key; 500 quotes a day per company, test and live keys together; 60 new orders in 24 hours and 30 orders waiting for a price or approval per company, dashboard and API together. The day resets at midnight US Eastern (America/Indiana/Indianapolis). Version 1 only grows: we add fields, events and calls, so ignore what you don't know. If we ever need to remove or change something, we email partners at least 90 days ahead. ShiftHaul is a licensed auto transport broker: DBW Transport LLC d/b/a ShiftHaul, MC 1786043, USDOT 4511175. contact: name: ShiftHaul partners email: partners@shifthaul.com url: https://shifthaul.com/developers/api/ servers: - url: https://api.shifthaul.com/v1 security: - apiKey: [] tags: - name: Quotes - name: Vehicles - name: Orders description: Business accounts only. - name: Locations description: Business accounts only. - name: Documents description: Business accounts only. - name: Messages description: Business accounts only. - name: Invoices description: Business accounts only. Read only; amounts in cents. - name: Webhooks description: Business accounts only. Not available for publisher keys yet. - name: Sandbox description: Business test keys only. paths: /quotes: post: tags: [Quotes] summary: Create a quote description: | Publisher key: ShiftHaul's door-to-door price. With a live key the price comes from the same pricing engine as shifthaul.com, so the API and the site give the same number for the same route, vehicles and trailer. A test key gives a sample price instead ("sample_price": true). A priced quote is locked for 7 days (expires_at). A route that can't be priced online comes back as 201 with status unavailable. Business account key: the contract price for the lane from the master agreement (per-vehicle rate plus the lane's not-running charge), or status needs_manual_price (no contract lane, enclosed trailer, or a van). No payment options, checkout link or expiry; the price is checked again when the order is booked. Answers 403 company_paused while the account is paused. Every quote returned counts toward the daily limit; errors and a repeat with the same Idempotency-Key don't. operationId: createQuote parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/QuoteRequest' - $ref: '#/components/schemas/BusinessQuoteRequest' examples: publisher: summary: Publisher key value: pickup: { zip: '28310' } delivery: { zip: '92136' } vehicles: [ { year: 2021, make: Toyota, model: RAV4 } ] transport: open pickup_date: { type: flexible } business: summary: Business account key value: pickup: { zip: '46808' } delivery: { zip: '48243' } vehicles: [ { year: 2022, make: Toyota, model: Camry } ] transport: open responses: '201': description: Quote created headers: Request-Id: { $ref: '#/components/headers/RequestId' } RateLimit-Policy: { $ref: '#/components/headers/RateLimitPolicy' } RateLimit: { $ref: '#/components/headers/RateLimit' } Idempotent-Replayed: { $ref: '#/components/headers/IdempotentReplayed' } ShiftHaul-Sample-Price: { $ref: '#/components/headers/SamplePrice' } content: application/json: schema: oneOf: - $ref: '#/components/schemas/Quote' - $ref: '#/components/schemas/BusinessQuote' examples: priced: summary: Publisher key, Fort Bragg, NC to San Diego, CA, one RAV4, open trailer value: id: qt_5nO6HmVFwPzQuYPQ object: quote mode: live status: priced pickup: { zip: '28310', city: Fort Bragg, state: NC } delivery: { zip: '92136', city: San Diego, state: CA } vehicles: [ { year: 2021, make: Toyota, model: RAV4, body_type: suv, inoperable: false } ] transport: open pickup_date: { type: flexible } created_at: '2026-11-27T02:34:14Z' price_lines: [ { type: transport, amount: 1528 } ] payment_options: - { method: card, total: { amount: 1528, currency: USD }, due_now: { amount: 0, currency: USD }, booking_payment: { amount: 150, currency: USD } } - { method: pay_on_delivery, total: { amount: 1482, currency: USD }, due_now: { amount: 0, currency: USD }, booking_payment: { amount: 150, currency: USD } } distance_miles: 2517 estimated_transit_days: { min: 5, max: 7 } checkout_url: https://api.shifthaul.com/p/YMflUyVJ19... expires_at: '2026-12-04T02:34:14Z' unavailable: summary: Publisher key, delivery to Anchorage, AK value: id: qt_mOyEcNkk3atXX2hR object: quote mode: test status: unavailable pickup: { zip: '28310', city: Fort Bragg, state: NC } delivery: { zip: '99501', city: Anchorage, state: AK } vehicles: [ { year: 2021, make: Toyota, model: RAV4, body_type: suv, inoperable: false } ] transport: open pickup_date: { type: flexible } created_at: '2026-11-27T02:34:15Z' unavailable_reason: outside_service_area message: We can’t price this shipment online. Call (260) 800-6747 or email partners@shifthaul.com for a price. business_priced: summary: Business account key, contract price (amounts made up) value: id: qt_W4nZp8Qe1KcR6sTm object: quote mode: live status: priced pickup: { zip: '46808', city: Fort Wayne, state: IN } delivery: { zip: '48243', city: Detroit, state: MI } vehicles: - { year: 2022, make: Toyota, model: Camry, body_type: sedan, inoperable: false } - { year: 2019, make: Ford, model: Escape, body_type: suv, inoperable: true } transport: open sample_price: false created_at: '2026-11-28T21:40:12Z' price_source: contract_lane total: { amount: 920, currency: USD } price_lines: - { type: transport, amount: { amount: 770, currency: USD } } - { type: not_running, amount: { amount: 150, currency: USD } } business_manual: summary: Business account key, no contract lane value: id: qt_8vRk2NwQ5LmT1xYb object: quote mode: test status: needs_manual_price pickup: { zip: '46808', city: Fort Wayne, state: IN } delivery: { zip: '48243', city: Detroit, state: MI } vehicles: [ { year: 2022, make: Toyota, model: Camry, body_type: sedan, inoperable: false } ] transport: open sample_price: false created_at: '2026-11-28T21:48:32Z' unavailable_reason: no_contract_lane message: 'There is no contract price for this shipment. Create the order with request_price: true and ShiftHaul will price it.' default: { $ref: '#/components/responses/Error' } /quotes/{quote_id}: get: tags: [Quotes] summary: Retrieve a quote description: | Returns the same body as when the quote was created. Publisher keys: after expires_at a priced quote also has "expired": true. Only your own quotes (business keys: your company's): anyone else's ID returns 404 not_found. Test keys read test quotes, live keys read live quotes. Counts only toward the per-minute limit. operationId: getQuote parameters: [ { $ref: '#/components/parameters/QuoteId' } ] responses: '200': description: The quote headers: Request-Id: { $ref: '#/components/headers/RequestId' } RateLimit-Policy: { $ref: '#/components/headers/RateLimitPolicy' } RateLimit: { $ref: '#/components/headers/RateLimit' } content: application/json: schema: oneOf: - $ref: '#/components/schemas/Quote' - $ref: '#/components/schemas/BusinessQuote' default: { $ref: '#/components/responses/Error' } /vehicles: get: tags: [Vehicles] summary: Look up the body type we use for a year, make and model description: | Up to 200 rows, no paging. An empty data list means the model isn't in our list: send body_type with that vehicle when you quote. Counts only toward the per-minute limit. The list changes rarely: cache the answers for a day. operationId: listVehicles parameters: - { name: make, in: query, required: true, description: 'The make, any case. Short names such as Chevy or VW work.', schema: { type: string, maxLength: 40 } } - { name: model, in: query, description: 'Start of the model name, any case.', schema: { type: string, maxLength: 60 } } - { name: year, in: query, description: 'Only models built that year; the year is echoed in each row.', schema: { type: integer, minimum: 1981 } } responses: '200': description: Matching vehicles headers: Request-Id: { $ref: '#/components/headers/RequestId' } RateLimit-Policy: { $ref: '#/components/headers/RateLimitPolicy' } RateLimit: { $ref: '#/components/headers/RateLimit' } content: application/json: schema: type: object required: [data] properties: data: { type: array, maxItems: 200, items: { $ref: '#/components/schemas/VehicleRef' } } example: data: - { year: 2021, make: Toyota, model: RAV4, body_type: suv } - { year: 2021, make: Toyota, model: RAV4 Prime (PHEV), body_type: suv } default: { $ref: '#/components/responses/Error' } /orders: post: tags: [Orders] summary: Create an order description: | Business accounts only. Send either a priced quote_id (the order is booked at the contract price, checked again now) or request_price true (status pricing; dispatch sets a price, then you approve or decline). One pickup to one delivery, 1 to 10 vehicles. partner_reference is required and unique among the orders your company creates through the API (test and live apart): it can't be used again, even after a cancel. New orders stop with 403 company_paused, orders_closed or invoices_past_due. operationId: createOrder parameters: [ { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/OrderCreate' } example: request_price: true partner_reference: PO-10482 pickup: { name: Main lot, street: 100 Dealer Way, city: Fort Wayne, state: IN, zip: '46808', contact_name: Lot manager, contact_phone: (260) 555-0142 } delivery: { name: Buyer, street: 250 Buyer St, city: Detroit, state: MI, zip: '48243', contact_name: Receiving desk, contact_phone: (313) 555-0199 } vehicles: [ { year: 2022, make: Toyota, model: Camry, vin: 4T1B11HK5NU000001 } ] ready_date: '2026-12-01' responses: '201': description: The order (status booked from a quote, or pricing) headers: { Request-Id: { $ref: '#/components/headers/RequestId' }, Idempotent-Replayed: { $ref: '#/components/headers/IdempotentReplayed' } } content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } get: tags: [Orders] summary: List orders description: Business accounts only. Your company's orders, newest first, including orders from the dashboard. Places show name, city, state and ZIP only. operationId: listOrders parameters: - { name: status, in: query, description: One or more statuses, comma-separated., schema: { type: string, examples: ['quoted,booked'] } } - { name: partner_reference, in: query, schema: { type: string, maxLength: 40 } } - $ref: '#/components/parameters/Limit' - { name: starting_after, in: query, description: An order ID from the previous page., schema: { type: string, pattern: '^ord_[A-Za-z0-9]{16}$' } } responses: '200': description: A page of orders headers: { Request-Id: { $ref: '#/components/headers/RequestId' } } content: application/json: schema: type: object required: [object, data, has_more] properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/OrderListItem' } } has_more: { type: boolean } default: { $ref: '#/components/responses/Error' } /orders/{order_id}: get: tags: [Orders] summary: Retrieve an order description: Business accounts only. The status can trail the dispatch board by a few minutes. operationId: getOrder parameters: [ { $ref: '#/components/parameters/OrderId' } ] responses: '200': description: The order headers: { Request-Id: { $ref: '#/components/headers/RequestId' } } content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } /orders/{order_id}/approve: post: tags: [Orders] summary: Approve the price description: | Business accounts only. Only for status quoted. expected_total is the total.amount you saw. If the price changed, 409 price_changed with current_price. Not quoted: 409 order_not_quoted. operationId: approveOrder parameters: [ { $ref: '#/components/parameters/OrderId' }, { $ref: '#/components/parameters/IdempotencyKey' } ] requestBody: required: true content: application/json: schema: type: object required: [expected_total] properties: expected_total: { type: integer, minimum: 0, description: Whole US dollars } example: { expected_total: 400 } responses: '200': description: The order, now booked content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } /orders/{order_id}/decline: post: tags: [Orders] summary: Decline the price description: Business accounts only. Only for status quoted; no body. Dispatch can still send a new price later (status quoted again). operationId: declineOrder parameters: [ { $ref: '#/components/parameters/OrderId' }, { $ref: '#/components/parameters/IdempotencyKey' } ] responses: '200': description: The order, now declined content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } /orders/{order_id}/cancel: post: tags: [Orders] summary: Cancel an order description: | Business accounts only. Free until a carrier is assigned. After that the cancellation fee in the agreement applies: the first call answers 409 fee_not_accepted with fee; repeat with accept_fee equal to fee.amount. After pickup: 409 order_not_cancellable (call dispatch). The body is optional. operationId: cancelOrder parameters: [ { $ref: '#/components/parameters/OrderId' }, { $ref: '#/components/parameters/IdempotencyKey' } ] requestBody: required: false content: application/json: schema: type: object properties: accept_fee: { type: integer, minimum: 0, description: Whole US dollars, equal to fee.amount } example: { accept_fee: 100 } responses: '200': description: The order, now cancelled content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } /locations: get: tags: [Locations] summary: List your locations description: Business accounts only. Read only; add and edit locations in the dashboard. Use location_id in quotes and orders. operationId: listLocations responses: '200': description: Your company's locations content: application/json: schema: type: object required: [object, data] properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Location' } } default: { $ref: '#/components/responses/Error' } /orders/{order_id}/documents: get: tags: [Documents] summary: List an order's documents description: Business accounts only. Yours and ShiftHaul's (such as the BOL). operationId: listDocuments parameters: [ { $ref: '#/components/parameters/OrderId' } ] responses: '200': description: The documents content: application/json: schema: type: object required: [object, data, can_upload, upload_kinds, max_file_bytes] properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Document' } } can_upload: { type: boolean } upload_kinds: { type: array, items: { type: string, enum: [release, gate_pass, other] } } max_file_bytes: { type: integer, examples: [10485760] } default: { $ref: '#/components/responses/Error' } post: tags: [Documents] summary: Upload a document description: | Business accounts only. multipart/form-data with a Content-Length header (411 length_required without it). PDF, JPG, PNG, WEBP or HEIC, up to 10 MB (413 file_too_large). Only before pickup, up to 30 files per order, not on declined, refused or cancelled orders (409 document_not_allowed; the 30 include ShiftHaul's files and removed ones). The BOL comes from ShiftHaul: kind bol is refused. Up to 3 uploads at a time per company. operationId: uploadDocument parameters: [ { $ref: '#/components/parameters/OrderId' }, { $ref: '#/components/parameters/IdempotencyKey' } ] requestBody: required: true content: multipart/form-data: schema: type: object required: [kind, file] properties: kind: { type: string, enum: [release, gate_pass, other] } vehicle_index: { type: integer, minimum: 0, description: The vehicle's index in the order } file: { type: string, format: binary } responses: '201': description: The new document content: { application/json: { schema: { $ref: '#/components/schemas/Document' } } } default: { $ref: '#/components/responses/Error' } /documents/{document_id}/file: get: tags: [Documents] summary: Download a document description: Business accounts only. The file, through our server, as an attachment. operationId: downloadDocument parameters: - { name: document_id, in: path, required: true, schema: { type: string, pattern: '^doc_[0-9a-f]{32}$' } } responses: '200': description: The file content: application/pdf: { schema: { type: string, format: binary } } image/*: { schema: { type: string, format: binary } } default: { $ref: '#/components/responses/Error' } /orders/{order_id}/messages: get: tags: [Messages] summary: Read the order's thread with dispatch description: Business accounts only. Oldest first. Reading does not mark messages as read in the dashboard. operationId: listMessages parameters: - $ref: '#/components/parameters/OrderId' - $ref: '#/components/parameters/Limit' - { name: starting_after, in: query, schema: { type: string, pattern: '^msg_[A-Za-z0-9]{16}$' } } responses: '200': description: A page of messages content: application/json: schema: type: object required: [object, data, has_more] properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Message' } } has_more: { type: boolean } default: { $ref: '#/components/responses/Error' } post: tags: [Messages] summary: Write to dispatch description: Business accounts only. The same thread as the dashboard. Up to 30 messages an hour per key. operationId: createMessage parameters: [ { $ref: '#/components/parameters/OrderId' }, { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] requestBody: required: true content: application/json: schema: type: object required: [text] properties: text: { type: string, minLength: 1, maxLength: 2000 } author_name: { type: string, maxLength: 100, description: 'Shown as " via API"; without it, " via API"' } responses: '201': description: The message content: { application/json: { schema: { $ref: '#/components/schemas/Message' } } } default: { $ref: '#/components/responses/Error' } /invoices: get: tags: [Invoices] summary: List invoices description: | Business accounts only. Newest first. Voided invoices are not shown, the same as in the dashboard. Test keys see one sample invoice, SHI-TEST-0001. The API never moves money: pay in the dashboard (account_url) by ACH or bank transfer. operationId: listInvoices parameters: - { name: status, in: query, description: One or more statuses, comma-separated., schema: { type: string, examples: ['open,past_due'] } } - $ref: '#/components/parameters/Limit' - { name: starting_after, in: query, schema: { type: string, pattern: '^inv_[A-Za-z0-9]{16}$' } } responses: '200': description: A page of invoices content: application/json: schema: type: object required: [object, data, has_more] properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Invoice' } } has_more: { type: boolean } default: { $ref: '#/components/responses/Error' } /invoices/{invoice_id}: get: tags: [Invoices] summary: Retrieve an invoice operationId: getInvoice parameters: [ { $ref: '#/components/parameters/InvoiceId' } ] responses: '200': description: The invoice content: { application/json: { schema: { $ref: '#/components/schemas/Invoice' } } } default: { $ref: '#/components/responses/Error' } /invoices/{invoice_id}/pdf: get: tags: [Invoices] summary: Download the invoice PDF description: Business accounts only. The same PDF the company's accounts payable contact gets by email. operationId: getInvoicePdf parameters: [ { $ref: '#/components/parameters/InvoiceId' } ] responses: '200': description: The PDF content: { application/pdf: { schema: { type: string, format: binary } } } default: { $ref: '#/components/responses/Error' } /webhook_endpoints: post: tags: [Webhooks] summary: Create a webhook endpoint description: | Business accounts only. Public HTTPS on port 443, by host name (422 webhook_url_not_allowed otherwise). Up to 3 endpoints for test keys and 3 for live keys (409 webhook_endpoint_limit; turned-off endpoints count until deleted). The secret is returned once; a repeat with the same Idempotency-Key returns the endpoint without it. Deliveries are signed the Standard Webhooks way (headers webhook-id, webhook-timestamp, webhook-signature). operationId: createWebhookEndpoint parameters: [ { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] requestBody: required: true content: application/json: schema: type: object required: [url, events] properties: url: { type: string, format: uri, maxLength: 500 } events: type: array minItems: 1 description: Event types to receive (any type except webhook.test), or ["*"] for all. items: { type: string, enum: ['*', order.booked, order.quoted, order.declined, order.refused, order.carrier_assigned, order.picked_up, order.in_transit, order.delivered, order.cancelled, order.updated, message.created, document.created] } example: { url: 'https://example.com/shifthaul/webhooks', events: ['*'] } responses: '201': description: The endpoint, with its secret (shown once) content: application/json: schema: allOf: - $ref: '#/components/schemas/WebhookEndpoint' - type: object properties: secret: { type: string, description: 'whsec_ followed by base64. Shown once.' } default: { $ref: '#/components/responses/Error' } get: tags: [Webhooks] summary: List webhook endpoints operationId: listWebhookEndpoints responses: '200': description: Endpoints for the key's mode content: application/json: schema: type: object properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/WebhookEndpoint' } } has_more: { type: boolean } default: { $ref: '#/components/responses/Error' } /webhook_endpoints/{endpoint_id}: delete: tags: [Webhooks] summary: Delete a webhook endpoint operationId: deleteWebhookEndpoint parameters: [ { $ref: '#/components/parameters/EndpointId' } ] responses: '200': description: Deleted content: application/json: schema: type: object properties: id: { type: string } object: { type: string, const: webhook_endpoint } deleted: { type: boolean, const: true } default: { $ref: '#/components/responses/Error' } /webhook_endpoints/{endpoint_id}/test: post: tags: [Webhooks] summary: Send a webhook.test event to this endpoint operationId: testWebhookEndpoint parameters: [ { $ref: '#/components/parameters/EndpointId' }, { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] responses: '202': description: The test event, queued content: { application/json: { schema: { $ref: '#/components/schemas/Event' } } } default: { $ref: '#/components/responses/Error' } /webhook_endpoints/{endpoint_id}/rotate_secret: post: tags: [Webhooks] summary: Rotate the signing secret description: The new secret is returned once. For 7 days deliveries are signed with both secrets; rotate twice within 7 days and only the two newest work. operationId: rotateWebhookSecret parameters: [ { $ref: '#/components/parameters/EndpointId' }, { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] responses: '200': description: The endpoint with the new secret content: application/json: schema: allOf: - $ref: '#/components/schemas/WebhookEndpoint' - type: object properties: secret: { type: string } previous_secret_expires_at: { type: string, format: date-time } default: { $ref: '#/components/responses/Error' } /events: get: tags: [Webhooks] summary: List events description: Business accounts only. The last 30 days, newest first, for the key's mode. operationId: listEvents parameters: - { name: type, in: query, schema: { type: string } } - { name: order_id, in: query, schema: { type: string, pattern: '^ord_[A-Za-z0-9]{16}$' } } - $ref: '#/components/parameters/Limit' - { name: starting_after, in: query, schema: { type: string, pattern: '^evt_[A-Za-z0-9]{24}$' } } responses: '200': description: A page of events content: application/json: schema: type: object properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Event' } } has_more: { type: boolean } default: { $ref: '#/components/responses/Error' } /events/{event_id}: get: tags: [Webhooks] summary: Retrieve an event operationId: getEvent parameters: [ { $ref: '#/components/parameters/EventId' } ] responses: '200': description: The event content: { application/json: { schema: { $ref: '#/components/schemas/Event' } } } default: { $ref: '#/components/responses/Error' } /events/{event_id}/redeliver: post: tags: [Webhooks] summary: Send an event again description: To your enabled endpoints that take this type, or only to endpoint_id. No such endpoint → 409 no_webhook_endpoint. operationId: redeliverEvent parameters: [ { $ref: '#/components/parameters/EventId' }, { $ref: '#/components/parameters/IdempotencyKeyRequired' } ] requestBody: required: false content: application/json: schema: type: object properties: endpoint_id: { type: string, pattern: '^we_[A-Za-z0-9]{16}$' } responses: '202': description: Queued content: application/json: schema: type: object properties: object: { type: string, const: redelivery } event_id: { type: string } webhook_endpoint_ids: { type: array, items: { type: string } } default: { $ref: '#/components/responses/Error' } /test/orders/{order_id}/advance: post: tags: [Sandbox] summary: Move a test order one step description: Business test keys only (404 for live keys). pricing → quoted with a sample price, or one step along the trip. 409 cannot_advance when there is none. operationId: advanceTestOrder parameters: [ { $ref: '#/components/parameters/OrderId' } ] responses: '200': description: The test order content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } /test/orders/{order_id}/refuse: post: tags: [Sandbox] summary: Play "ShiftHaul turned it down" description: Business test keys only. From pricing, quoted or declined to refused_by_shifthaul. operationId: refuseTestOrder parameters: [ { $ref: '#/components/parameters/OrderId' } ] responses: '200': description: The test order content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } default: { $ref: '#/components/responses/Error' } components: securitySchemes: apiKey: type: http scheme: bearer description: 'Authorization: Bearer shk_live_… or shk_test_…' parameters: IdempotencyKey: name: Idempotency-Key in: header required: false description: | Optional here. A unique value per request, kept 24 hours (business keys: shared by all keys of the company, test and live apart). Same key + same body returns the first answer again (Idempotent-Replayed: true). Same key + different body returns idempotency_key_reused; the first request still running returns idempotency_in_progress with Retry-After. 5xx and 429 answers are not stored, so a retry with the same key runs again; a quote that comes back unavailable (201) is stored, so retry it with a new key. The same key on a different call also returns idempotency_key_reused. A key that breaks the format returns 422 validation_failed with errors[].field "Idempotency-Key". Printable characters, no spaces. A UUID works. schema: { type: string, minLength: 8, maxLength: 255, pattern: '^[\x21-\x7E]+$' } IdempotencyKeyRequired: name: Idempotency-Key in: header required: true description: Required here (422 validation_failed, errors[].code required, without it). Same rules as the optional key. schema: { type: string, minLength: 8, maxLength: 255, pattern: '^[\x21-\x7E]+$' } QuoteId: name: quote_id in: path required: true schema: { type: string, pattern: '^qt_[A-Za-z0-9]{16}$', examples: [qt_5nO6HmVFwPzQuYPQ] } OrderId: name: order_id in: path required: true schema: { type: string, pattern: '^ord_[A-Za-z0-9]{16}$', examples: [ord_3fJk9QwL2mNp7RtX] } InvoiceId: name: invoice_id in: path required: true schema: { type: string, pattern: '^inv_[A-Za-z0-9]{16}$', examples: [inv_TESTSAMPLE000001] } EndpointId: name: endpoint_id in: path required: true schema: { type: string, pattern: '^we_[A-Za-z0-9]{16}$' } EventId: name: event_id in: path required: true schema: { type: string, pattern: '^evt_[A-Za-z0-9]{24}$' } Limit: name: limit in: query schema: { type: integer, minimum: 1, maximum: 100, default: 50 } headers: RequestId: description: Sent with every response (errors repeat it as request_id). Send it to partners@shifthaul.com if something looks wrong. schema: { type: string, examples: [req_ONgoEuIM1RPoxh6G8bu2] } IdempotentReplayed: description: true when this is the stored answer of an earlier request with the same Idempotency-Key. schema: { type: string, const: 'true' } SamplePrice: description: 'Publisher test keys only: true on a sample price.' schema: { type: string, const: 'true' } RetryAfter: description: Seconds to wait. Sent with every 429 (for the daily limits, the time until midnight US Eastern), with idempotency_in_progress and with most 503 answers. schema: { type: integer } RateLimitPolicy: description: | The limits for this kind of request. Publisher keys: "minute";q=20;w=60, "daily";q=100;w=86400, "routes";q=50;w=86400. Business keys: "minute";q=20 (quotes) or q=120 (other requests);w=60, "daily";q=500;w=86400. schema: { type: string, examples: ['"minute";q=20;w=60, "daily";q=100;w=86400, "routes";q=50;w=86400', '"minute";q=120;w=60, "daily";q=500;w=86400'] } RateLimit: description: 'What is left: r = remaining, t = seconds until it resets.' schema: { type: string, examples: ['"minute";r=19;t=56, "daily";r=98;t=4076, "routes";r=49;t=4076'] } responses: Error: description: | RFC 9457 problem details (application/problem+json) with code and request_id. The type URL https://shifthaul.com/developers/api/errors# opens that code in the docs. Some business errors add current_price, fee or order_id. 401 unauthorized, key_revoked · 403 forbidden_scope, company_paused, orders_closed, invoices_past_due · 404 not_found · 405 method_not_allowed · 409 idempotency_in_progress, duplicate_partner_reference, price_changed, quote_not_priced, order_not_quoted, fee_not_accepted, order_not_cancellable, order_changed, document_not_allowed, cannot_advance, webhook_endpoint_limit, webhook_endpoint_disabled, no_webhook_endpoint · 411 length_required · 413 file_too_large · 415 unsupported_media_type · 422 validation_failed, zip_not_found, vehicle_type_needed, idempotency_key_reused, file_type, webhook_url_not_allowed · 429 rate_limited, daily_quote_limit, new_routes_limit, daily_order_limit, pending_limit · 500 internal_error · 503 temporarily_unavailable. headers: Request-Id: { $ref: '#/components/headers/RequestId' } Retry-After: { $ref: '#/components/headers/RetryAfter' } content: application/problem+json: schema: { $ref: '#/components/schemas/Problem' } example: type: https://shifthaul.com/developers/api/errors#vehicle_type_needed title: Vehicle body type needed status: 422 detail: We could not tell the body type of a vehicle. Send body_type for it. code: vehicle_type_needed request_id: req_dbtH61iiWRmpWdOyWCZd errors: [ { field: 'vehicles[0].body_type', code: vehicle_type_needed } ] schemas: Money: type: object required: [amount, currency] properties: amount: { type: integer, description: Whole US dollars } currency: { type: string, const: USD } Place: type: object required: [zip] properties: zip: { type: string, pattern: '^[0-9]{5}$', description: 5-digit US ZIP } city: { type: string, readOnly: true, description: The city we matched } state: { type: string, readOnly: true, minLength: 2, maxLength: 2 } BodyType: type: string description: | When the year, make and model are in our vehicle list we use our body type (the same as shifthaul.com) and return it; it can differ from what you sent. Send body_type only for models we don't know. van is never priced online. enum: [sedan, suv, large_suv, pickup, minivan, coupe_sports, ev, van] VehicleRef: type: object properties: year: { type: integer } make: { type: string } model: { type: string } body_type: { $ref: '#/components/schemas/BodyType' } QuoteVehicle: type: object required: [year, make, model] properties: year: { type: integer, minimum: 1981, description: Up to next year } make: { type: string, minLength: 1, maxLength: 40, description: Short names such as Chevy or VW work } model: { type: string, minLength: 1, maxLength: 60 } body_type: { $ref: '#/components/schemas/BodyType' } inoperable: { type: boolean, default: false, description: true if the car doesn't run } vin: { type: string, pattern: '^[A-HJ-NPR-Za-hj-npr-z0-9]{17}$', description: 17 characters; returned in upper case } PickupDate: type: object required: [type] properties: type: { type: string, enum: [date, asap, flexible] } date: { type: string, format: date, description: 'Required with type date: today up to 12 months ahead (US Eastern, Indiana time). The date does not change the price.' } QuoteRequest: type: object description: Publisher keys. required: [pickup, delivery, vehicles, transport, pickup_date] properties: pickup: { $ref: '#/components/schemas/Place' } delivery: allOf: [ { $ref: '#/components/schemas/Place' } ] description: Must differ from the pickup ZIP (errors[].code same_as_pickup). vehicles: type: array minItems: 1 maxItems: 10 description: 1 to 4 vehicles are priced; 5 to 10 come back as unavailable (too_many_vehicles); more than 10 is an error. items: { $ref: '#/components/schemas/QuoteVehicle' } transport: { type: string, enum: [open, enclosed] } pickup_date: { $ref: '#/components/schemas/PickupDate' } partner_reference: { type: string, maxLength: 64, description: Your own ID for this quote. Returned trimmed; an empty value is left out. } PriceLine: type: object required: [type, amount] description: Publisher quotes. Each line covers all vehicles in the quote. The lines add up to the card total. properties: type: { type: string, enum: [transport, enclosed, not_running] } amount: { type: integer, description: Whole US dollars } PaymentOption: type: object required: [method, total, due_now, booking_payment] properties: method: type: string enum: [card, pay_on_delivery] description: | card: $0 when booking; a $150 booking payment goes on the card when a carrier is assigned, the rest on the same card at pickup. pay_on_delivery: a little lower; the same $150 booking payment by card when a carrier is assigned, the rest to the driver at delivery. total: { $ref: '#/components/schemas/Money' } due_now: { $ref: '#/components/schemas/Money' } booking_payment: allOf: [ { $ref: '#/components/schemas/Money' } ] description: $150 for the order, however many vehicles. Part of the total, not an extra charge. Quote: type: object description: Publisher keys. required: [id, object, mode, status, pickup, delivery, vehicles, transport, pickup_date, created_at] properties: id: { type: string, pattern: '^qt_[A-Za-z0-9]{16}$' } object: { type: string, const: quote } mode: { type: string, enum: [test, live], description: From the key you used } status: { type: string, enum: [priced, unavailable] } sample_price: { type: boolean, const: true, description: 'Test keys only, on a priced quote: this is a sample price, not a real quote. The same route always gets the same sample price.' } pickup: { $ref: '#/components/schemas/Place' } delivery: { $ref: '#/components/schemas/Place' } vehicles: { type: array, items: { $ref: '#/components/schemas/QuoteVehicle' }, description: What we priced, with the body type we used } transport: { type: string, enum: [open, enclosed] } pickup_date: { $ref: '#/components/schemas/PickupDate' } partner_reference: { type: string } created_at: { type: string, format: date-time } price_lines: { type: array, items: { $ref: '#/components/schemas/PriceLine' }, description: Only when status is priced } payment_options: { type: array, items: { $ref: '#/components/schemas/PaymentOption' }, description: Only when status is priced } distance_miles: { type: integer, description: Road miles between the two ZIPs. Only when status is priced } estimated_transit_days: type: object description: Days on the road after pickup. An estimate. Only when status is priced. properties: min: { type: integer } max: { type: integer } checkout_url: type: string format: uri description: | Only when status is priced. Books this price on shifthaul.com (a test key's link opens a test checkout page instead). One link books one order; after a booking or after expires_at it offers the customer a new price. Give it only to the visitor who asked. expires_at: { type: string, format: date-time, description: 'The price is locked until this time, 7 days after created_at. Only when status is priced.' } expired: { type: boolean, const: true, description: Present on a priced quote read after expires_at. } unavailable_reason: type: string description: Only when status is unavailable. enum: [outside_service_area, route_too_long, vehicle_needs_manual_price, too_many_vehicles, temporarily_unavailable, route_needs_manual_price] message: { type: string, description: 'Only when status is unavailable: a message you can show as is (call or email us for a price).' } LocationOrZip: type: object description: Either zip or location_id, not both. properties: zip: { type: string, pattern: '^[0-9]{5}$' } location_id: { type: string, pattern: '^loc_[A-Za-z0-9]{16}$' } BusinessVehicle: type: object required: [year, make, model] properties: year: { type: integer, minimum: 1950, description: Up to two years ahead } make: { type: string, minLength: 1, maxLength: 40 } model: { type: string, minLength: 1, maxLength: 40 } body_type: { $ref: '#/components/schemas/BodyType' } inoperable: { type: boolean, default: false } vin: { type: string, pattern: '^[A-HJ-NPR-Za-hj-npr-z0-9]{17}$', description: Duplicates in one request are rejected } stock: { type: string, maxLength: 30, description: Orders only } description: On an order booked with quote_id, send the same body_type as in the quote. BusinessQuoteRequest: type: object description: Business account keys. required: [pickup, delivery, vehicles, transport] properties: pickup: { $ref: '#/components/schemas/LocationOrZip' } delivery: { $ref: '#/components/schemas/LocationOrZip' } vehicles: { type: array, minItems: 1, maxItems: 10, items: { $ref: '#/components/schemas/BusinessVehicle' } } transport: { type: string, enum: [open, enclosed] } partner_reference: { type: string, maxLength: 64 } BusinessPriceLine: type: object required: [type, amount] properties: type: { type: string, enum: [transport, not_running] } amount: { $ref: '#/components/schemas/Money' } BusinessQuote: type: object description: Business account keys. required: [id, object, mode, status, pickup, delivery, vehicles, transport, sample_price, created_at] properties: id: { type: string, pattern: '^qt_[A-Za-z0-9]{16}$' } object: { type: string, const: quote } mode: { type: string, enum: [test, live] } status: { type: string, enum: [priced, needs_manual_price] } pickup: { allOf: [ { $ref: '#/components/schemas/Place' } ], properties: { location_id: { type: string } } } delivery: { allOf: [ { $ref: '#/components/schemas/Place' } ], properties: { location_id: { type: string } } } vehicles: { type: array, items: { $ref: '#/components/schemas/BusinessVehicle' } } transport: { type: string, enum: [open, enclosed] } sample_price: { type: boolean, const: false, description: Business test keys return the real contract prices too. } partner_reference: { type: string } created_at: { type: string, format: date-time } price_source: { type: string, const: contract_lane, description: Only when status is priced } total: { allOf: [ { $ref: '#/components/schemas/Money' } ], description: Only when status is priced } price_lines: { type: array, items: { $ref: '#/components/schemas/BusinessPriceLine' }, description: Only when status is priced; they add up to total } unavailable_reason: { type: string, enum: [no_contract_lane, no_contract_price, enclosed_needs_manual_price, vehicle_needs_manual_price], description: 'Only when status is needs_manual_price. no_contract_price: contract pricing is switched off on our side.' } message: { type: string, description: Only when status is needs_manual_price } AddressInput: type: object required: [street, city, state, zip] properties: name: { type: string, maxLength: 80 } street: { type: string, minLength: 3, maxLength: 120 } city: { type: string, minLength: 2, maxLength: 60 } state: { type: string, minLength: 2, maxLength: 2, description: A US state or DC } zip: { type: string, pattern: '^[0-9]{5}(-[0-9]{4})?$' } contact_name: { type: string, maxLength: 80 } contact_phone: { type: string, maxLength: 30, description: 10 to 15 digits } hours: { type: string, maxLength: 160 } access: { type: string, enum: [full, small, unknown], default: unknown, description: 'full: a full-size hauler fits; small: small trucks only' } notes: { type: string, maxLength: 500 } save_location: { type: boolean, description: Save this address to your locations. Needs name. } OrderCreate: type: object description: Send one of quote_id and request_price, not both. required: [partner_reference, pickup, delivery, vehicles, ready_date] properties: quote_id: { type: string, pattern: '^qt_[A-Za-z0-9]{16}$', description: A priced business quote. The order must match its ZIPs, trailer, vehicle count and not-running count. } request_price: { type: boolean, const: true } partner_reference: { type: string, minLength: 1, maxLength: 40, description: 'Printable ASCII. Unique among the orders your company creates through the API, never reused (test and live apart).' } pickup: oneOf: - type: object required: [location_id] properties: { location_id: { type: string, pattern: '^loc_[A-Za-z0-9]{16}$' } } - $ref: '#/components/schemas/AddressInput' delivery: oneOf: - type: object required: [location_id] properties: { location_id: { type: string, pattern: '^loc_[A-Za-z0-9]{16}$' } } - $ref: '#/components/schemas/AddressInput' vehicles: { type: array, minItems: 1, maxItems: 10, items: { $ref: '#/components/schemas/BusinessVehicle' } } transport: { type: string, enum: [open, enclosed], default: open } ready_date: { type: string, format: date, description: 'Live: from yesterday up to 120 days ahead (UTC dates). The sandbox checks the format only.' } deliver_by: { type: string, format: date, description: 'Live: not before ready_date, up to 240 days ahead.' } notes: { type: string, maxLength: 600 } OrderStatus: type: string description: | A status can go back (for example carrier_assigned → booked when a carrier drops the load). Use data.sequence of the events and GET /orders/{order_id}, not the order in which you saw statuses. enum: [pricing, quoted, booked, carrier_assigned, picked_up, in_transit, delivered, declined, refused_by_shifthaul, cancelled] Stop: type: object properties: name: { type: [string, 'null'] } street: { type: [string, 'null'] } city: { type: [string, 'null'] } state: { type: [string, 'null'] } zip: { type: [string, 'null'] } contact_name: { type: [string, 'null'] } contact_phone: { type: [string, 'null'] } hours: { type: [string, 'null'] } access: { type: [string, 'null'] } notes: { type: [string, 'null'] } Order: type: object properties: id: { type: string, pattern: '^ord_[A-Za-z0-9]{16}$' } object: { type: string, const: order } mode: { type: string, enum: [test, live] } number: { type: string, description: 'SHB… (TEST-… in the sandbox)' } status: { $ref: '#/components/schemas/OrderStatus' } partner_reference: { type: [string, 'null'] } source: { type: string, enum: [api, dashboard, import] } pickup: { $ref: '#/components/schemas/Stop' } delivery: { $ref: '#/components/schemas/Stop' } vehicles: type: array items: type: object properties: index: { type: integer } vin: { type: [string, 'null'] } year: { type: integer } make: { type: string } model: { type: string } stock: { type: [string, 'null'] } inoperable: { type: boolean } units: { type: integer } transport: { type: string, enum: [open, enclosed] } total: { oneOf: [ { $ref: '#/components/schemas/Money' }, { type: 'null' } ], description: null while waiting for a price } price_source: { type: [string, 'null'], enum: [contract_lane, shifthaul, null] } price_lines: { type: array, items: { $ref: '#/components/schemas/BusinessPriceLine' } } fees: type: array items: type: object properties: type: { type: string, examples: [cancellation] } amount: { $ref: '#/components/schemas/Money' } cancellable: { type: boolean } cancellation_fee_if_cancelled_now: { oneOf: [ { $ref: '#/components/schemas/Money' }, { type: 'null' } ] } ready_date: { type: [string, 'null'], format: date } deliver_by: { type: [string, 'null'], format: date } pickup_date: { type: [string, 'null'], format: date } delivery_date: { type: [string, 'null'], format: date } notes: { type: [string, 'null'] } status_history: type: array items: type: object properties: status: { $ref: '#/components/schemas/OrderStatus' } at: { type: [string, 'null'], format: date-time, description: Can be null for in_transit } buyer_status_url: { type: [string, 'null'], format: uri, description: Set when someone turned on Share status in the dashboard } documents_count: { type: integer } created_at: { type: string, format: date-time } OrderListItem: type: object properties: id: { type: string } object: { type: string, const: order } mode: { type: string, enum: [test, live] } number: { type: string } status: { $ref: '#/components/schemas/OrderStatus' } partner_reference: { type: [string, 'null'] } source: { type: string, enum: [api, dashboard, import] } pickup: { $ref: '#/components/schemas/Stop' } delivery: { $ref: '#/components/schemas/Stop' } units: { type: integer } transport: { type: string } total: { oneOf: [ { $ref: '#/components/schemas/Money' }, { type: 'null' } ] } price_source: { type: [string, 'null'] } ready_date: { type: [string, 'null'] } pickup_date: { type: [string, 'null'] } delivery_date: { type: [string, 'null'] } created_at: { type: string, format: date-time } Location: type: object properties: id: { type: string, pattern: '^loc_[A-Za-z0-9]{16}$' } object: { type: string, const: location } name: { type: [string, 'null'] } kind: { type: [string, 'null'], enum: [lot, auction, customer, body_shop, other, null] } street: { type: [string, 'null'] } city: { type: [string, 'null'] } state: { type: [string, 'null'] } zip: { type: [string, 'null'] } contact_name: { type: [string, 'null'] } contact_phone: { type: [string, 'null'] } hours: { type: [string, 'null'] } access: { type: [string, 'null'] } notes: { type: [string, 'null'] } is_default: { type: boolean } Document: type: object properties: id: { type: string } object: { type: string, const: document } order_id: { type: string } kind: { type: string, enum: [bol, release, gate_pass, other] } file_name: { type: string } content_type: { type: string } size: { type: integer } vehicle_index: { type: [integer, 'null'] } uploaded_by: { type: string, enum: [you, shifthaul] } uploaded_at: { type: string, format: date-time } Message: type: object properties: id: { type: string, pattern: '^msg_[A-Za-z0-9]{16}$' } order_id: { type: string } from: { type: string, enum: [partner, shifthaul] } author_name: { type: string, description: 'ShiftHaul replies: "ShiftHaul dispatch"' } text: { type: string } created_at: { type: string, format: date-time } Invoice: type: object properties: id: { type: string, pattern: '^inv_[A-Za-z0-9]{16}$' } object: { type: string, const: invoice } mode: { type: string, enum: [test, live] } number: { type: string, examples: [SHI-TEST-0001] } status: { type: string, enum: [open, due_today, past_due, processing, paid] } issued_on: { type: string, format: date } period_start: { type: string, format: date } period_end: { type: string, format: date } due_date: { type: string, format: date, description: Follows the payment terms in your agreement } currency: { type: string, const: USD } total_cents: { type: integer } balance_cents: { type: integer } lines: type: array items: type: object properties: type: { type: string, enum: [transport, cancellation, other] } order_number: { type: [string, 'null'] } order_id: { type: [string, 'null'] } vehicles: { type: array, items: { type: object, properties: { name: { type: [string, 'null'] }, vin: { type: [string, 'null'] } } } } amount_cents: { type: integer } account_url: { type: string, format: uri, description: The invoice in the dashboard, where it is paid } WebhookEndpoint: type: object properties: id: { type: string, pattern: '^we_[A-Za-z0-9]{16}$' } object: { type: string, const: webhook_endpoint } mode: { type: string, enum: [test, live] } url: { type: string, format: uri } events: { type: array, items: { type: string } } status: { type: string, enum: [enabled, disabled] } disabled_reason: { type: [string, 'null'], enum: [failing, gone, key_revoked, null] } created_at: { type: string, format: date-time } Event: type: object description: | The body posted to your endpoint (and returned by GET /events). Small on purpose: no prices, addresses, names or message text. webhook-id equals id. data.sequence grows with each event of one order, messages and documents included. properties: id: { type: string, pattern: '^evt_[A-Za-z0-9]{24}$' } object: { type: string, const: event, description: Only in GET /events answers } type: { type: string, enum: [order.booked, order.quoted, order.declined, order.refused, order.carrier_assigned, order.picked_up, order.in_transit, order.delivered, order.cancelled, order.updated, message.created, document.created, webhook.test] } timestamp: { type: string, format: date-time } mode: { type: string, enum: [test, live] } data: type: object properties: order_id: { type: string } order_number: { type: string } partner_reference: { type: [string, 'null'] } status: { $ref: '#/components/schemas/OrderStatus' } sequence: { type: integer } message_id: { type: string, description: message.created only } document_id: { type: string, description: document.created only } webhook_endpoint_id: { type: string, description: webhook.test only } Problem: type: object description: RFC 9457 problem details plus code and request_id. required: [type, title, status, code, request_id] properties: type: { type: string, format: uri, examples: ['https://shifthaul.com/developers/api/errors#vehicle_type_needed'] } title: { type: string } status: { type: integer } detail: { type: string } code: type: string description: The list is in the Error response. New codes may be added; handle unknown ones by HTTP status. examples: [vehicle_type_needed, price_changed] request_id: { type: string } current_price: { oneOf: [ { $ref: '#/components/schemas/Money' }, { type: 'null' } ], description: price_changed only } fee: { allOf: [ { $ref: '#/components/schemas/Money' } ], description: fee_not_accepted only } order_id: { type: [string, 'null'], description: duplicate_partner_reference only } errors: type: array description: "Field problems. field uses dots and brackets (vehicles[0].year); an empty string means the whole body." items: type: object required: [field, code] properties: field: { type: string } code: { type: string, description: 'For example required, invalid, too_many, same_as_pickup, zip_not_found, vehicle_type_needed, quote_mismatch, duplicate_vin, too_long, https_required, port_not_allowed. More may be added.' }