create onboarded carriers.md

Create Onboarded Carriers

Authentication

Permissions

The external-api-create-onboarded-carrier-contact permission is required to access this endpoint.

Endpoint

Headers

Request Body:

Request Example:

curl --location 'https://api.genlogs.io/onboarded-carrier/contacts' \
--header 'access-token: <your-access-token>' \
--header 'x-api-key: <your-x-api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "usdot": "123456789",
    "name": "Peter Parker",
    "phone": "3432434234",
    "email": "peter.parker@marvel.com"
}'

Response:

Response Body:

200 OK – Contact Created Successfully

{
  "contact": {
    "id": "bd849e72-09f0-4d19-8b20-e227cd4ef455",
    "name": "Peter Parker",
    "phone": "3432434234",
    "email": "peter.parker@marvel.com"
  }
}

400 Bad Request

Returned when:

{
    "detail": "Missing required field: usdot"
}
{
    "detail": "Value error, At least one of name, email, or phone must be provided."
}
{
    "detail": "Value error, usdot must be at most 9 digits."
}

403 Forbidden

{
    "detail": "User not allowed to access this endpoint"
}

Create an onboarded carrier contact

Creates a new onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. The usdot value must contain digits only, be greater than zero, and be at most 9 digits after normalization.

{"openapi":"3.0.3","info":{"title":"Onboarded Carrier Contacts API","version":"1.0.0"},"servers":[{"url":"https://api.genlogs.io"}],"security":[{"AccessTokenAuth":[],"ApiKeyAuth":[]}],"components":{"securitySchemes":{"AccessTokenAuth":{"type":"apiKey","in":"header","name":"Access-Token","description":"JWT provided directly in the Access-Token header. No \"Bearer\" prefix.\n"}}},"paths":{"onboarded-carrier/contacts":{"post":{"summary":"Create an onboarded carrier contact","description":"Creates a new onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. The `usdot` value must contain digits only, be greater than zero, and be at most 9 digits after normalization.\n","tags":["Onboarded Carriers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["usdot"],"properties":{"usdot":{"type":"string","description":"Carrier USDOT number. Must contain digits only, be greater than zero, and be at most 9 digits. Leading zeroes are normalized before persistence.\n","minLength":1,"maxLength":9,"pattern":"^[0-9]+$"},"name":{"type":"string","nullable":true,"description":"Contact name."},"phone":{"type":"string","nullable":true,"description":"Contact phone number."},"email":{"type":"string","nullable":true,"description":"Contact email address."}}}}}}}}}}]}}