get onboarded carriers.md
Get Onboarded Carriers
Authentication
- Include your
Access-Tokenin the header of your requests. - Include your
x-api-keyThe API key provided by GenLogs. This header must be included in the request.
Permissions
The external-api-get-onboarded-carrier-contact permission is required to access this endpoint.
Endpoint
- URL:
https://api.genlogs.io/onboarded-carrier/contacts - Method: GET
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_number (string, optional): Carrier USDOT number or numbers comma separated. Must be a non-empty value.
- page (string, optional): Expected page to be listed.
- page_size (string, optional): Amount of items per page.
Request Example:
curl --location 'https://api.genlogs.io/onboarded-carrier/contacts?page=4&page_size=2' \
--header 'access-token: <your-access-token>' \
--header 'x-api-key: <your-x-api-key>'
Response:
- 200 OK: A JSON object containing the information of carrier contacts.
- 400 Bad Request: If the provided parameters are malformed 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 – Contacts listed Successfully
{
"contacts": [
{
"contact_id": "00-11-22-33-44",
"dot_number": "123456",
"customer_id": 3,
"contact_name": "John",
"contact_email": "john@email.com",
"contact_phone": "(555) 555-5555",
"contact_source": "GENLOGS"
},
{
"contact_id": "11-22-33-44-55",
"dot_number": "765432",
"customer_id": 3,
"contact_name": "Mike",
"contact_email": "mike@email.com",
"contact_phone": "(555) 555-5566",
"contact_source": "GENLOGS"
}
],
"pagination": {
"page_size": 2,
"current_page": 4,
"total_pages": 10
}
}
400 Bad RequestReturned when:
usdot_numberis invalid, empty or equal to zeropagevalue is out of bounds or not a valid integerpage_sizevalue is out of bounds or not a valid integer
{
"detail": "usdot_number cannot be empty"
}
{
"detail": "page 2 is out of range. Maximum page is 1"
}
403 Forbidden
{
"detail": "User not allowed to access this endpoint"
}
Retrieve onboarded carrier contacts
Returns a paginated list of onboarded carrier contacts for the authenticated customer. Only contacts belonging to the customer identified in the JWT are returned. Requires the external-api-get-onboarded-carrier-contact permission.
{"openapi":"3.0.3","info":{"title":"Onboarded Carrier Contacts API","version":"1.0.0"},"servers":[{"url":"https://api.genlogs.io"}],"security":[{"Access-Token":[],"X-Api-Key":[]}],"components":{"securitySchemes":{"Access-Token":{"type":"apiKey","in":"header","name":"Access-Token","description":"JWT provided directly in the Access-Token header.\n"}}},"paths":{
"/onboarded-carrier/contacts":{"get":{"summary":"Retrieve onboarded carrier contacts","description":"Returns a paginated list of onboarded carrier contacts for the authenticated customer. Only contacts belonging to the customer identified in the JWT are returned. Requires the external-api-get-onboarded-carrier-contact permission.\n","tags":["Onboarded Carriers"],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number of results to return.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","required":false,"description":"Number of results per page (max 200).","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"usdot_number","in":"query","required":false,"description":"USDOT number(s) to filter by. Supports a single value or a comma-separated list.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Onboarded carrier contacts retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","description":"List of onboarded carrier contacts.","items":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid","description":"Unique identifier of the onboarded carrier contact."},"dot_number":{"type":"string","description":"USDOT number associated with the carrier."},"customer_id":{"type":"integer","description":"Identifier of the customer that owns the contact."},"contact_name":{"type":"string","description":"Full name of the contact."},"contact_email":{"type":"string","description":"Email address of the contact."},"contact_phone":{"type":"string","description":"Phone number of the contact."},"contact_source":{"type":"string","description":"Source of the onboarded contact record."}}}},"pagination":{"type":"object","description":"Pagination metadata.","properties":{"page_size":{"type":"integer","description":"Number of results per page."},"current_page":{"type":"integer","description":"Current page number."},"total_pages":{"type":"integer","description":"Total number of available pages."}}}}}}}}}}}}