Confirm a country is supported, list its leave policies, and fetch one policy's detail.
1 workflow2 source APIs1 provider
View SpecView on GitHubGlobal PayrollEORContractor ManagementContractor of RecordPEOHRISRecruitingBenefitsEmploymentHRComplianceWorkforceMCPAI AgentsArazzoWorkflows
arazzo: 1.0.1
info:
title: Remote Look Up A Country Leave Policy
summary: Confirm a country is supported, list its leave policies, and fetch one policy's detail.
description: >-
Surfaces statutory leave rules for a hiring country. The workflow confirms
the country is supported and reads its profile, lists the leave policies for
that country, and reads the first policy back for its accrual method and
allowance. Every step spells out its request inline so the flow can be read
and executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: countriesApi
url: ../openapi/remote-com-countries-api-openapi.yml
type: openapi
- name: leavePoliciesApi
url: ../openapi/remote-com-leave-policies-api-openapi.yml
type: openapi
workflows:
- workflowId: country-leave-policy
summary: Resolve a country and inspect its first leave policy.
description: >-
Shows a country, lists its leave policies, and reads the first policy back
for its accrual detail.
inputs:
type: object
required:
- accessToken
- countryCode
properties:
accessToken:
type: string
description: Company-scoped bearer access token.
countryCode:
type: string
description: ISO 3166-1 country code to inspect.
steps:
- stepId: showCountry
description: Confirm the country is supported and read its profile.
operationId: showCountry
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
- name: country_code
in: path
value: $inputs.countryCode
successCriteria:
- condition: $statusCode == 200
outputs:
countryName: $response.body#/data/country/name
currency: $response.body#/data/country/currency
- stepId: listLeavePolicies
description: List the leave policies for the country.
operationId: listLeavePolicies
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
- name: country_code
in: query
value: $inputs.countryCode
successCriteria:
- condition: $statusCode == 200
outputs:
leavePolicyId: $response.body#/data/leave_policies/0/id
onSuccess:
- name: hasPolicy
type: goto
stepId: showLeavePolicy
criteria:
- context: $response.body
condition: $.data.leave_policies.length > 0
type: jsonpath
- name: noPolicy
type: end
criteria:
- context: $response.body
condition: $.data.leave_policies.length == 0
type: jsonpath
- stepId: showLeavePolicy
description: Read the first leave policy back for its accrual method and allowance.
operationId: showLeavePolicy
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
- name: leave_policy_id
in: path
value: $steps.listLeavePolicies.outputs.leavePolicyId
successCriteria:
- condition: $statusCode == 200
outputs:
leaveType: $response.body#/data/leave_policy/leave_type
accrualMethod: $response.body#/data/leave_policy/accrual_method
annualAllowance: $response.body#/data/leave_policy/annual_allowance
outputs:
countryName: $steps.showCountry.outputs.countryName
leavePolicyId: $steps.listLeavePolicies.outputs.leavePolicyId
accrualMethod: $steps.showLeavePolicy.outputs.accrualMethod
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.