delete onboarded carrier.md

Delete Onboarded Carrier

Authentication

Permissions

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

Endpoint

Headers

Path Params

Request Example:

curl --location --request DELETE 'https://api.genlogs.io/onboarded-carrier/contacts/<contact_id>' \
--header 'access-token: <your-api-access-token>' \
--header 'x-api-key: <your-x-api-key>' \
--header 'Content-Type: application/json' \

Response:

Response Body:

200 OK – Contact Deleted Successfully

{
    "contact": {
        "contact_name": "some_name",
        "phone_number": "1-222-333-444",
        "email_address": "some_user@testemail.com",
        "usdot_number": "1324354657",
        "contact_id": <contact_id>,
        "customer_id": <customer_id>,
    },
    "deleted": true
}

400 Bad Request

Returned when:

{
    "detail": "Error deleting onboarded carrier contact: {message}"
}

401 Unauthorized

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

403 Forbidden

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

404 Not Found

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

Delete an onboarded carrier contact

Deletes an existing onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. The contact must belong to the authenticated customer.

{"openapi":"3.0.3","info":{"title":"Onboarded Carrier Contacts API","version":"1.0.0"},"servers":[{"url":"https://api.genlogs.io"}],"security":[{"AccessTokenAuth":[],"ApiKeyAuth":[]}],"paths":{"onboarded-carrier/contacts/{contact_id}":{"delete":{"summary":"Delete an onboarded carrier contact","description":"Deletes an existing onboarded carrier contact for the authenticated customer. Requires a valid JWT token and the appropriate permission. The contact must belong to the authenticated customer.\n","tags":["Onboarded Carriers"],"parameters":[{"name":"contact_id","in":"path","required":true,"description":"Unique identifier of the contact to delete.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Contact deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean"}}}}}}}},"400":{"description":"Bad Request – Invalid contact identifier.","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.\n","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"}}}}}}}}}}