API, webhooks and MCP

Everything you can do in Fresh Take TMS, your systems and AI agents can do too. REST, MCP and the in-app assistant all run the same tools, with the same validation and the same events.

Authentication

An owner or admin creates keys at Integrations & API → API keys (read only, or read + write). Send Authorization: Bearer ftk_live_… on every request. Keys belong to one company; every call only sees that company's data.

MCP server

Streamable HTTP endpoint: https://cortraxs.com/api/mcp, same bearer key.

claude mcp add --transport http freshtake https://cortraxs.com/api/mcp \
  --header "Authorization: Bearer ftk_live_..."

REST routes

GET/api/v1/summary
GET/api/v1/customers?search=
POST/api/v1/customers
GET/api/v1/customers/{id}
PATCH/api/v1/customers/{id}
POST/api/v1/leads
GET/api/v1/quotes?status=
POST/api/v1/quotes
GET/api/v1/quotes/{id|number}
POST/api/v1/quotes/{id}/status
POST/api/v1/quotes/{id}/convert
GET/api/v1/lanes/history?originState=OH&destState=IN
GET/api/v1/loads?status=open
POST/api/v1/loads
GET/api/v1/loads/{id|number|PO}
POST/api/v1/loads/{id}/status
POST/api/v1/loads/{id}/check-calls
POST/api/v1/loads/{id}/assign
GET/api/v1/loads/{id}/tracking
POST/api/v1/loads/{id}/post
GET/api/v1/drivers
GET/api/v1/trucks
GET/api/v1/carriers
GET/api/v1/invoices
POST/api/v1/invoices
GET/api/v1/invoices/{id}
POST/api/v1/payments
POST/api/v1/telematics/refresh
GET/api/v1/events?since=ISO
POST/api/v1/tools/{tool_name}
curl -X POST https://cortraxs.com/api/v1/loads/L-10001/check-calls \
  -H "Authorization: Bearer ftk_live_..." -H "content-type: application/json" \
  -d '{"city":"Toledo","state":"OH","message":"Rolling, on time"}'

Webhooks

Add an HTTPS URL at Integrations & API. Each event is POSTed as JSON { id, type, at, orgId, via, data, object } where object is the current record. Verify x-freshtake-signature: sha256=HMAC_SHA256(secret, rawBody). Non-2xx responses retry with backoff (1, 5, 15, 60, 240, 720 minutes).

customer.created · customer.updated · lead.created · lead.updated · quote.created · quote.updated · quote.sent · quote.accepted · quote.declined · quote.converted · load.created · load.updated · load.status_changed · load.assigned · load.check_call · load.delivered · load.document_added · load.cancelled · invoice.created · invoice.sent · invoice.paid · bill.created · bill.paid · carrier.created · carrier.updated

Tools

dashboard_summary (read) — Snapshot of the operation right now: loads by status, open quotes, delivered-not-invoiced, accounts receivable and overdue.
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
list_customers (read) — Search customers by name, code or email.
{
  "type": "object",
  "properties": {
    "search": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "additionalProperties": false
}
get_customer (read) — Full customer record with contacts.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Record id"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
create_customer (write) — Create a customer (shipper) with optional contacts.
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "LEAD",
        "ACTIVE",
        "INACTIVE",
        "HOLD"
      ]
    },
    "email": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "billingAddress": {
      "type": "string"
    },
    "billingCity": {
      "type": "string"
    },
    "billingState": {
      "type": "string"
    },
    "billingZip": {
      "type": "string"
    },
    "billingEmail": {
      "type": "string"
    },
    "payTermsDays": {
      "type": "integer"
    },
    "creditLimit": {
      "type": "number"
    },
    "notes": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "string"
    },
    "contacts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isBilling": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
update_customer (write) — Update customer fields; contacts are matched by email and added if new.
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "LEAD",
        "ACTIVE",
        "INACTIVE",
        "HOLD"
      ]
    },
    "email": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "billingAddress": {
      "type": "string"
    },
    "billingCity": {
      "type": "string"
    },
    "billingState": {
      "type": "string"
    },
    "billingZip": {
      "type": "string"
    },
    "billingEmail": {
      "type": "string"
    },
    "payTermsDays": {
      "type": "integer"
    },
    "creditLimit": {
      "type": "number"
    },
    "notes": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "string"
    },
    "contacts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isBilling": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "id": {
      "type": "string",
      "description": "Record id"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
create_lead (write) — Record an inbound freight request (company, contact, lane, freight). Staff convert it into a customer + quote.
{
  "type": "object",
  "properties": {
    "company": {
      "type": "string"
    },
    "contactName": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "origin": {
      "type": "string"
    },
    "destination": {
      "type": "string"
    },
    "equipment": {
      "type": "string"
    },
    "freight": {
      "type": "string"
    },
    "weightLbs": {
      "type": "integer"
    },
    "shipDate": {
      "type": "string",
      "format": "date-time"
    },
    "frequency": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "source": {
      "type": "string"
    }
  },
  "required": [
    "company",
    "contactName",
    "email"
  ],
  "additionalProperties": false
}
list_quotes (read) — List quotes, newest first. Filter by status (DRAFT, SENT, ACCEPTED, DECLINED, EXPIRED, CONVERTED) or customer.
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "customerId": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "additionalProperties": false
}
get_quote (read) — Quote detail by id or number (e.g. Q-1001).
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Quote id or number"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
create_quote (write) — Create a quote for a customer with rate lines (kind LINEHAUL|FUEL|ACCESSORIAL|DISCOUNT|OTHER, description, quantity, rate).
{
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string"
    },
    "contactName": {
      "type": "string"
    },
    "contactEmail": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "default": "FTL"
    },
    "equipment": {
      "type": "string",
      "default": "DRY_VAN"
    },
    "originCity": {
      "type": "string"
    },
    "originState": {
      "type": "string"
    },
    "originZip": {
      "type": "string"
    },
    "originAddress": {
      "type": "string"
    },
    "destCity": {
      "type": "string"
    },
    "destState": {
      "type": "string"
    },
    "destZip": {
      "type": "string"
    },
    "destAddress": {
      "type": "string"
    },
    "pickupDate": {
      "type": "string",
      "format": "date-time"
    },
    "deliveryDate": {
      "type": "string",
      "format": "date-time"
    },
    "commodity": {
      "type": "string"
    },
    "weightLbs": {
      "type": "integer"
    },
    "pieces": {
      "type": "integer"
    },
    "pallets": {
      "type": "integer"
    },
    "lengthFt": {
      "type": "number"
    },
    "tempMin": {
      "type": "number"
    },
    "tempMax": {
      "type": "number"
    },
    "hazmat": {
      "type": "boolean"
    },
    "miles": {
      "type": "integer"
    },
    "estCost": {
      "type": "number"
    },
    "validUntil": {
      "type": "string",
      "format": "date-time"
    },
    "notes": {
      "type": "string"
    },
    "internalNotes": {
      "type": "string"
    },
    "requestedVia": {
      "type": "string"
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "default": "LINEHAUL"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "default": 1
          },
          "rate": {
            "type": "number",
            "default": 0
          }
        },
        "required": [
          "description"
        ],
        "additionalProperties": false
      },
      "default": []
    }
  },
  "required": [
    "customerId",
    "originCity",
    "originState",
    "destCity",
    "destState"
  ],
  "additionalProperties": false
}
set_quote_status (write) — Mark a quote SENT, ACCEPTED, DECLINED (with reason) or EXPIRED.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "SENT",
        "ACCEPTED",
        "DECLINED",
        "EXPIRED"
      ]
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "additionalProperties": false
}
convert_quote_to_load (write) — Turn a quote into a load (pickup + delivery stops, quote lines become charges).
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
lane_history (read) — What this company actually billed on a lane before: past loads from origin state to destination state with revenue, miles and revenue per mile. No estimates: only recorded loads.
{
  "type": "object",
  "properties": {
    "originState": {
      "type": "string"
    },
    "destState": {
      "type": "string"
    },
    "equipment": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "required": [
    "originState",
    "destState"
  ],
  "additionalProperties": false
}
list_loads (read) — List loads. status = one LoadStatus or 'open' (not delivered/invoiced/paid/cancelled). search matches load number, PO/customer ref, BOL.
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "customerId": {
      "type": "string"
    },
    "search": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "additionalProperties": false
}
get_load (read) — Load detail by id, load number (L-10001) or customer PO: stops, status history, assignment, tracking link.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
create_load (write) — Create a load with stops (type PICKUP|DELIVERY, name, address, city, state, zip, windowStart/windowEnd ISO) and billable charges.
{
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string"
    },
    "quoteId": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "default": "FTL"
    },
    "equipment": {
      "type": "string",
      "default": "DRY_VAN"
    },
    "customerRef": {
      "type": "string"
    },
    "bolNumber": {
      "type": "string"
    },
    "commodity": {
      "type": "string"
    },
    "weightLbs": {
      "type": "integer"
    },
    "pieces": {
      "type": "integer"
    },
    "pallets": {
      "type": "integer"
    },
    "lengthFt": {
      "type": "number"
    },
    "tempMin": {
      "type": "number"
    },
    "tempMax": {
      "type": "number"
    },
    "hazmat": {
      "type": "boolean"
    },
    "miles": {
      "type": "integer"
    },
    "emptyMiles": {
      "type": "integer"
    },
    "instructions": {
      "type": "string"
    },
    "internalNotes": {
      "type": "string"
    },
    "createdVia": {
      "type": "string"
    },
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PICKUP",
              "DELIVERY"
            ]
          },
          "locationId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "windowStart": {
            "type": "string",
            "format": "date-time"
          },
          "windowEnd": {
            "type": "string",
            "format": "date-time"
          },
          "appointment": {
            "type": "boolean"
          },
          "refNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "city",
          "state"
        ],
        "additionalProperties": false
      },
      "default": []
    },
    "charges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "default": "LINEHAUL"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "default": 1
          },
          "rate": {
            "type": "number",
            "default": 0
          },
          "billable": {
            "type": "boolean"
          }
        },
        "required": [
          "description"
        ],
        "additionalProperties": false
      },
      "default": []
    }
  },
  "required": [
    "customerId"
  ],
  "additionalProperties": false
}
update_load_status (write) — Move a load to a status: PLANNED, ASSIGNED, DISPATCHED, AT_PICKUP, IN_TRANSIT, AT_DELIVERY, DELIVERED, CANCELLED. Optional message and location.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "PLANNED",
        "ASSIGNED",
        "DISPATCHED",
        "AT_PICKUP",
        "IN_TRANSIT",
        "AT_DELIVERY",
        "DELIVERED",
        "INVOICED",
        "PAID",
        "CANCELLED"
      ]
    },
    "message": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "lat": {
      "type": "number"
    },
    "lng": {
      "type": "number"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "additionalProperties": false
}
add_check_call (write) — Log a check call / location update on a load, with optional ETA (ISO datetime).
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "lat": {
      "type": "number"
    },
    "lng": {
      "type": "number"
    },
    "eta": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
assign_load (write) — Assign a company driver/truck/trailer, or a carrier (brokered) with carrierPay.
{
  "type": "object",
  "properties": {
    "driverId": {
      "type": "string"
    },
    "coDriverId": {
      "type": "string"
    },
    "truckId": {
      "type": "string"
    },
    "trailerId": {
      "type": "string"
    },
    "carrierId": {
      "type": "string"
    },
    "carrierDriverName": {
      "type": "string"
    },
    "carrierDriverPhone": {
      "type": "string"
    },
    "carrierTruckNo": {
      "type": "string"
    },
    "carrierTrailerNo": {
      "type": "string"
    },
    "carrierPay": {
      "type": "number"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
get_tracking_link (read) — Public tracking URL for a load (safe to share with the customer).
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
list_drivers (read) — Drivers with status, phone and current truck.
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
list_trucks (read) — Trucks with status, odometer and last known location.
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
list_carriers (read) — Carriers (for brokered loads) with MC/DOT, equipment and insurance expiry.
{
  "type": "object",
  "properties": {
    "search": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "additionalProperties": false
}
list_invoices (read) — Invoices with balance; status DRAFT, SENT, PARTIAL, PAID, VOID; overdue=true for past-due open invoices.
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "customerId": {
      "type": "string"
    },
    "overdue": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "default": 25
    }
  },
  "additionalProperties": false
}
get_invoice (read) — Invoice detail.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Record id"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
create_invoice (write) — Invoice one or more delivered loads of the same customer.
{
  "type": "object",
  "properties": {
    "loadIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "loadIds"
  ],
  "additionalProperties": false
}
record_payment (write) — Record a customer payment; applied to the oldest open invoices unless allocations are given.
{
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string"
    },
    "amount": {
      "type": "number"
    },
    "date": {
      "type": "string",
      "format": "date-time"
    },
    "method": {
      "type": "string"
    },
    "reference": {
      "type": "string"
    },
    "allocations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "invoiceId",
          "amount"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "customerId",
    "amount",
    "date"
  ],
  "additionalProperties": false
}
post_load_to_board (write) — Post a load to a load board the company has connected: DAT, TRUCKSTOP, SYLECTUS, LOADBOARD_123, DIRECT_FREIGHT.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "provider": {
      "type": "string",
      "enum": [
        "DAT",
        "TRUCKSTOP",
        "SYLECTUS",
        "LOADBOARD_123",
        "DIRECT_FREIGHT"
      ]
    },
    "rate": {
      "type": "number"
    },
    "comments": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "provider"
  ],
  "additionalProperties": false
}
refresh_truck_locations (write) — Pull current truck GPS from connected telematics (Samsara / Motive) and update trucks and their active loads.
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}