improved
v2.1.73
4 days ago by Guilherme Soares
Updated Fetch EOR Contract form endpoint
New
- Added dynamic support for all countries available through Deel
- All fields and constraints for the form are now dynamically fetched from our many sources of truth.
- New query parameters
- Added the optional query parameters
state
,work_hours_per_week
andcontract_duration_in_days
.- These fields allow the form to be refreshed with updated validation rules and data.
- For example, work hours can be used on-the-fly to calculate minimum salary requirements for part-time contracts in eligible countries.
state
should only be sent when theGET v2/lookups/countries
route returns a valid list of states.
While refreshing the form with these fields is optional, it is recommended since invalid values might prevent the user from creating new contract quotes.
- Quote form data improvements
rules
added to options within questions. These follow the same behavior as question rules:- When no
rule
passes, the option becomes disabled and its value must not be sent.
- When no
start_date
andend_date
now return the correct allowed date ranges.is_disabled
property added to pages, sections, questions, and options. When set to true:- Users cannot input values or select options.
- The entity and its child entities (e.g., questions within a disabled section) must be excluded from the creation request payload.
- All other properties (like
is_required
for questions) can be ignored. - For questions and options, this matches the behavior when no
rules
pass. - ⚠️ While some properties may still be computed in the API response when
is_disabled
istrue
, these values are not guaranteed valid and should not be used or displayed.
must_request_validation
added to theJob scope
question to indicate whether validation throughPOST v2/eor/job-scopes/validate
is required.
- To cover certain cases whereJob scope
appears asProject description
instead and validation is not mandatory.
- TheCurrencies
question now returns all supported currencies as options
- Added the optional query parameters
Updated
- Form response
- Sections under the Compensation & dates page have been altered to better separate questions in the flow.
Multiple
type has been renamed toNested
to better conform with design practices.- Removed
currency
from questions as it was redundant. Instead, use the currency as selected by the user forCURRENCY
typed questions instead.
Endpoint:GET /rest/v2/forms/eor/create-contract/:country_code
API Reference: Fetch EOR Contract form