vincere-io / restful-api-support

5 stars 0 forks source link

Issue while updating contact info using vincere API #29

Closed abhishek622 closed 2 months ago

abhishek622 commented 2 months ago

I have been trying to update contact information using: PUT /contact/{id} body:

{
    "email": "rkr@gmail.com",
    "phone": "+3582143657890",
    "first_name": "Rajkumar",
    "last_name": "rao",
    "job_title": "Content maker",
    "company_id": 14531,
    "registration_date": "2024-06-14T13:43:54.269Z",
    "gender": "MALE"
    }

here I did not change company_id, just passed the current company_id as it is since it is a required field. But I got this error:

 {
    "message": "Data is invalid",
    "status": "FAILED",
    "httpStatus": "400",
    "errorCode": "CHANGE_COMPANY_BUT_LINKED_JOBS_EXIST",
    "errorId": "34d56007-cd5a-4be8-987d-db57c196ff01",
    "errors": [
        "Cannot change company because contact already has jobs."
    ]
}

Can you help me resolve this issue and let me know exactly what I'm doing wrong here?

Link for the put request that I follow - https://api.vincere.io/#put-/contact/-id-

abhishek622 commented 2 months ago

@vincere-developer please help