Skip to main content

Create Lead

POST/api/v1/public/leads/

Used to submit a new lead (a potential order).

Auth: Provider API Key (Bearer). See Authentication.

:::tip Simplified: state & city are auto-detected from ZIP You no longer need to look up numeric state IDs. The backend now automatically detects state and city from the ZIP codes you provide. Just send origin_zip (and optionally destination_zip) — the origin_state / destination_state fields are deprecated and ignored. See Data Models. :::

:::info Idempotency external_id must be unique per provider — this prevents duplicate leads (it is the idempotency key). :::

Body fields​

FieldTypeRequiredDescription
external_idStringRequiredUnique ID on the provider side (must not repeat)
first_nameStringRequiredCustomer's first name
last_nameStringRequiredCustomer's last name
emailString (email)RequiredCustomer's email
phone_numberStringRequiredPrimary phone number
origin_zipStringRequiredPickup ZIP — valid US ZIP. State & city are auto-detected from this.
estimated_ship_dateDate YYYY-MM-DDRequiredEstimated ship date
overseas_typeString (enum)RequiredDOMESTIC or FOREIGN. Selects which ship_via set applies — see below.
ship_viaString (enum)RequiredShipping method. Allowed values depend on overseas_type — see below.
vehiclesArray<Vehicle>RequiredAt least 1 vehicle (see below)
destination_zipStringOptionalRecommended. Delivery ZIP — valid US ZIP. State & city are auto-detected from this.
origin_cityStringOptionalPickup city — auto-filled from origin_zip if omitted
destination_cityStringOptionalDelivery city — auto-filled from destination_zip if omitted
company_nameStringOptionalCompany name
note_from_shipperStringOptionalNote from the customer
origin_stateInteger (ID)DeprecatedOmit. Ignored if sent — auto-detected from origin_zip.
destination_stateInteger (ID)DeprecatedOmit. Ignored if sent — auto-detected from destination_zip.

overseas_type & ship_via​

ship_via accepts a different set of values depending on overseas_type. All values are exact, case-sensitive strings — send them exactly as shown (note the underscore in DRIVE_AWAY and ROLLON_ROLLOFF).

overseas_type: "DOMESTIC" — domestic (ground) shipping:

ship_viaMeaning
OPENOpen carrier (standard)
ENCLOSEDEnclosed carrier
DRIVE_AWAYDriven to destination (drive-away)

overseas_type: "FOREIGN" — overseas leg (container / vessel shipping):

ship_viaMeaning
CONTAINER_20FT20 ft container
CONTAINER_40FT40 ft container
SHAREDShared container
ROLLON_ROLLOFFRoll-on / roll-off (RoRo) vessel

:::warning Match ship_via to overseas_type Send a ship_via value from the set that matches your overseas_type. For example, DRIVE_AWAY is only valid when overseas_type is DOMESTIC; CONTAINER_40FT only when FOREIGN. See the full reference in Data Models. :::

Vehicle object​

vehicles is an array of at least one vehicle. Each element:

FieldTypeRequiredDescription
yearIntegerRequiredModel year
makeStringRequiredMake (Toyota, Tesla…)
modelStringRequiredModel (Camry, Model S…)
typeString (enum)RequiredVehicle type enum
tariffIntegerRequiredShipping price
depositIntegerRequiredDown payment
vehicle_runBooleanOptionalWhether the vehicle is operational / can be driven

Request sample​

With ZIP-based auto-detection, a minimal valid request only needs ZIPs — no state IDs, no cities:

{
"external_id": "lead_998123A",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1234567890",
"origin_zip": "90210",
"destination_zip": "10001",
"estimated_ship_date": "2026-06-15",
"overseas_type": "DOMESTIC",
"ship_via": "OPEN",
"company_name": "Doe Logistics",
"note_from_shipper": "Call before pickup",
"vehicles": [
{
"year": 2023,
"make": "Tesla",
"model": "Model S",
"type": "CAR",
"tariff": 1200,
"deposit": 200,
"vehicle_run": true
}
]
}

Response — 201 Created​

Expected response shape (matches the get-lead response):

{
"id": 1042,
"order_number": "00001042-XT",
"state": "LEAD",
"lead_status": "LEAD",
"external_id": "lead_998123A"
}

:::note TODO: verify — create response body The exact create-response body depends on the backend serializer. If it differs, confirm with the backend team and update this section. :::

Code samples​

curl -X POST https://api.navigocrm.com/api/v1/public/leads/ \
-H "Authorization: Bearer $NAVIGO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "lead_998123A",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1234567890",
"origin_zip": "90210",
"destination_zip": "10001",
"estimated_ship_date": "2026-06-15",
"overseas_type": "DOMESTIC",
"ship_via": "OPEN",
"vehicles": [{"year":2023,"make":"Tesla","model":"Model S","type":"CAR","tariff":1200,"deposit":200,"vehicle_run":true}]
}'

Possible errors​

StatusReason
400Validation error, invalid ZIP, or duplicate external_id
401API key is invalid or expired
429Rate limit exceeded (60/min, 2000/day)

Full format: Errors.