update onboarded carrier.md

Update Onboarded Carrier

Authentication

Permissions

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

Endpoint

Headers

Path Params

Request Body:

Request Example:

curl --location --request PATCH 'https://api.genlogs.io/onboarded-carrier/contacts/ca387122-4153-418b-82df-03008cc9af9b' \
--header 'access-token: <your-api-access-token>' \
--header 'x-api-key: <your-x-api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "email": "peter_parker@test_email.com",
    "name": "Peter Parker",
    "phone": "3432434234"
}'

Response:

Response Body:

200 OK – Contact Created Successfully

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

400 Bad Request

Returned when:

{
    "detail": "Value error, at least one of name, email, or phone must be provided for update."
}

401 Unauthorized

{
    "detail": "Token is missing!"
}

403 Forbidden

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

404 Not Found

{
    "detail": "Preferred carrier contact not found."
}

Update an onboarded carrier contact

Updates an existing onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. Only the fields provided in the request body will be updated. USDOT updates are not supported by this endpoint; including usdot in the PATCH body returns Bad Request before any persistence operation.

{"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/{contact_id}":{"patch":{"summary":"Update an onboarded carrier contact","description":"Updates an existing onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. Only the fields provided in the request body will be updated. USDOT updates are not supported by this endpoint; including `usdot` in the PATCH body returns Bad Request before any persistence operation.\n","tags":["Onboarded Carriers"],"parameters":[{"name":"contact_id","in":"path","required":true,"description":"Unique identifier of the contact to update.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Fields to update. At least one must be provided. `usdot` is not accepted in PATCH requests.\n","properties":{"name":{"type":"string","nullable":true,"description":"Contact name."},"email":{"type":"string","nullable":true,"description":"Contact email."},"phone":{"type":"string","nullable":true,"description":"Contact phone number."}},"minProperties":1}}}},"responses":{"200":{"description":"Contact updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}}}}}}},"400":{"description":"Bad Request – Missing or invalid fields.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"401":{"description":"Unauthorized – Invalid or missing Access-Token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"403":{"description":"Forbidden – The user lacks required permission or does not own the contact.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"404":{"description":"Contact not found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}}}}}