Create Onboarded Carriers

Create an onboarded carrier contact associated with a specific USDOT. This endpoint allows customers to add their own validated contact information.

Authentication

  • Include your Access-Token in the header of your requests.

  • Include your x-api-key The API key provided by GenLogs. This header must be included in the request.

Permissions

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

Endpoint

  • URL: https://api.genlogs.io/onboarded-carrier/contacts

  • Method: POST

Headers

  • Access-Token: (string, required): Access token obtained from the "Create Access Token" endpoint.

  • x-api-key (string, required): The API key provided by GenLogs.

Request Body:

  • usdot (string, required): Carrier USDOT number. Must be a non-empty value.

  • name (string, optional): Contact name.

  • phone (string, optional): Contact phone number

  • email (string, optional): Contact email address.

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 '{
    "email": "1234567",
    "name": "Peter Parker",
    "phone": "3432434234",
    "usdot": "[email protected]"
}'

Response:

  • 200 OK: A JSON object containing provided information of carrier contacts.

  • 400 Bad Request: If required parameters are missing or invalid.

  • 401 Unauthorized: If the authentication credentials (Access-Token) is missing or incorrect.

  • 403 Forbidden: If the permission has not been added to your user.

  • 500 Internal Server Error: If there is an issue on the server that prevents processing the request.

Response Body:

200 OK – Contact Created Successfully

{
  "contact": {
    "id": "bd849e72-09f0-4d19-8b20-e227cd4ef455",
    "name": "Peter Parker",
    "phone": "3432434234",
    "email": "[email protected]"
  }
}

400 Bad Request

Returned when:

  • usdot is missing.

  • usdot is provided, but all of name, phone, and email are null.

  • usdot is provided, but all of name, phone, and email are empty strings.

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

403 Forbidden

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

Create an onboarded carrier contact

post

Creates a new onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission.

Authorizations
Access-TokenstringRequired

JWT provided directly in the Access-Token header. No "Bearer" prefix.

x-api-keystringRequired

API key provided by GenLogs.

Body
usdotstringRequired

Carrier USDOT number. Must be a non-empty value.

Example: 1234567
namestring | nullableOptional

Contact name.

Example: Peter Parker
phonestring | nullableOptional

Contact phone number.

Example: 3432434234
emailstring | nullableOptional

Contact email address.

Example: [email protected]
Responses
200

Contact created successfully.

application/json
post
/onboarded-carrier/contacts
POST /onboarded-carrier/contacts HTTP/1.1
Host: api.genlogs.io
Access-Token: YOUR_API_KEY
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "usdot": "1234567",
  "name": "Peter Parker",
  "phone": "3432434234",
  "email": "[email protected]"
}
{
  "contact": {
    "id": "bd849e72-09f0-4d19-8b20-e227cd4ef455",
    "name": "Peter Parker",
    "phone": "3432434234",
    "email": "[email protected]"
  }
}

Last updated