Create EOR endpoint failing on benefit IDs

Hi Team, I was hoping to get some help on an API issue I’m having.
I’m attempting to create an EOR contract through the Deel V2 API for an integration.

Here’s the test request I’m making:

curl --request POST \ --url https://api.letsdeel.com/rest/v2/eor \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "data": { "compensation_details": { "currency": "USD", "salary": 43888.00 }, "employee": { "email": "no-reply@versori.com", "first_name": "Eva", "last_name": "A", "nationality": "United States" }, "employment": { "country": "US", "start_date": "2024-11-17", "work_visa_required": false, "time_off_type": "STANDARD" }, "client": { "legal_entity": { "id": "8836daac-371b-4982-8202-e581043a4900" }, "team": { "id": "3516dee3-f45b-457b-bb8e-eafe6ab5e516" } }, "job_title": "Software Engineer", "seniority": { "id": 1 }, "pension": { "id": "c1631641-1d6e-41ad-bc0c-cbbbe3f565ca", "contribution": "2.00" }, "health_plan_id": "fc027084-c086-444a-b080-b249de2e221e" } } '

ERROR:
{ "request": { "method": "POST", "url": "/eor", "status": 400, "api_req_id": "ce8fca8ead947e261320303f3be25f72", "docs": "no match", "source": "http" }, "errors": { "errors": [ { "message": "Input validation failed: benefits.0.providerId: Required" } ] } }

and I’m getting a validation error on benefits, even though the pension_id and the health_plan_id are taken from the Country Guide endpoint as suggested by the docs. Am I missing a “benefits” objects? the example object in the docs doesn’t show this.

@pm_versori
Can you please try passing the relevant provider_id in the req.body ? You will find this under Country Guide endpoint under health_insurance object.

Thank you

Hi @Anees_Deel

Thank you for getting back to me. I have just tried to query the Country Guide endpoint for the US. However, I’m now seeing that the health insurance object is “Disabled” with no providers showing in the list. This was not happening before. Is this only on my account?

Endpoint:

GET https://api.letsdeel.com/rest/v2/eor/validations/US

Response:

...
		"health_insurance": {
			"status": "DISABLED",
			"providers": []
		}
...

@pm_versori
Apologies for the inconvenience. This has now been fixed, could you please try again?

Thanks

1 Like

Hi @Anees_Deel

No problem at all. I can confirm it’s working for me now. Thank you for the help.