{"openapi":"3.0.0","paths":{"/openapi/contract/v1/contracts":{"get":{"operationId":"ContractController_getContracts","summary":"Get paginated list of contracts with the given filters","parameters":[{"name":"type","required":false,"in":"query","description":"Filter contracts by their type.","schema":{"enum":["fixed","payg","milestone","full_time","direct_employee"],"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status ID of the contract. You can retrieve the available status IDs from the /status endpoint in the Contracts API","schema":{"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Comma separated list of tags","example":"tag1,tag2","schema":{"type":"string"}},{"name":"attributes","required":false,"in":"query","description":"Comma separated list of attribute values","example":"val1,val2","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ListContractsResponseDto"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/templates":{"get":{"operationId":"ContractController_getTemplates","summary":"Get list of contracts templates","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}":{"get":{"operationId":"ContractController_getContract","summary":"Get contract details","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to get","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]},"patch":{"operationId":"ContractController_updateContract","summary":"Update a contract","description":"Update contract fields. Only contracts with status PENDING_INVITE, PENDING_CONTRACTOR_SIGNATURE, or PENDING_CLIENT_SIGNATURE can be updated.","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to update","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/invite":{"post":{"operationId":"ContractController_inviteContractor","summary":"Invites a contractor to a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to be acted upon","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteContractorDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteContractorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/signatory/assign":{"post":{"operationId":"ContractController_assignSignatory","summary":"Assigns a signatory to a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to be acted upon","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignSignatoryDto"}}}},"responses":{"204":{"description":""},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":403},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Forbidden"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/signatory":{"delete":{"operationId":"ContractController_removeSignatory","summary":"Removes a signatory from a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to be acted upon","schema":{"type":"number"}}],"responses":{"204":{"description":""},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/invitation/cancel":{"post":{"operationId":"ContractController_cancelInvitation","summary":"Cancels an invitation for a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to cancel invitation for","schema":{"type":"number"}}],"responses":{"201":{"description":""},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/cancel":{"post":{"operationId":"ContractController_cancelContract","summary":"Cancels a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to cancel","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelContractDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/terminate":{"post":{"operationId":"ContractController_terminateContract","summary":"Terminates a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to terminate","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateContractDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/preview":{"get":{"operationId":"ContractController_previewContract","summary":"Preview a contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to preview","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/{id}/attributes":{"patch":{"operationId":"ContractController_updateContractAttributes","summary":"Update attributes for contract","description":"Update contract attributes","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to update attributes for","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractAttributesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/UpdateContractAttributesResponseItemDto"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/contracts/files":{"post":{"operationId":"ContractFileController_upload","summary":"Upload a custom contract document","description":"Uploads your own agreement document instead of using a RemotePass template. The returned path is passed as the \"file\" field when creating or updating a contract.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadContractFileDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractFileResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":413},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Payload Too Large"}},"required":["code","message"]}},"required":["error"]}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":415},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unsupported Media Type"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/milestone":{"post":{"operationId":"MilestoneContractController_createMilestoneContract","summary":"Create a new milestone contract","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMilestoneContractRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractBasicResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/milestone/{contractId}/add":{"post":{"operationId":"MilestoneContractController_addMilestoneToContract","summary":"Add a new milestone to a contract","parameters":[{"name":"contractId","required":true,"in":"path","description":"The id of the contract to add milestone to","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMilestoneToContractRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Work"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/milestone/{id}/amendment":{"post":{"operationId":"MilestoneContractController_amendContract","summary":"Amends a milestone contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to amend","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneContractAddAmendmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/fixed":{"post":{"operationId":"FixedContractController_createFixedContract","summary":"Create a new fixed contract","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFixedContractRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractBasicResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/fixed/{id}/amendment":{"post":{"operationId":"FixedContractController_amendContract","summary":"Amends a fixed contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to amend","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixedContractAddAmendmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/payg":{"post":{"operationId":"PaygContractController_createPaygContract","summary":"Create a new PayG contract","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaygContractRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractBasicResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/payg/{id}/amendment":{"post":{"operationId":"PaygContractController_amendContract","summary":"Amends a pay as you go contract","parameters":[{"name":"id","required":true,"in":"path","description":"The id of the contract to amend","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaygContractAddAmendmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/ContractDetailResponseDto"}}}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Contract"]}},"/openapi/contract/v1/status":{"get":{"operationId":"StatusController_getStatusList","summary":"Get the list of contract statuses","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/StatusDto"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Status"]}},"/openapi/contract/v1/attribute":{"get":{"operationId":"AttributeController_getAttributeList","summary":"Get paginated list of attributes with the given filters","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"active","required":false,"in":"query","description":"Filter attributes by active state.","example":true,"schema":{"type":"boolean"}},{"name":"contractType","required":false,"in":"query","description":"Filter attributes by the contract type they apply to.","schema":{"enum":["milestone","payg","fixed","eor","direct_employee"],"type":"string"}},{"name":"area","required":false,"in":"query","description":"Filter attributes by the area they belong to.","schema":{"enum":["contract","work","accounting_categorization"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AttributeDto"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Attribute"]}},"/openapi/contract/v1/attribute/all":{"get":{"operationId":"AttributeController_getAllAttributeList","summary":"Get all attributes without pagination","parameters":[{"name":"active","required":false,"in":"query","description":"Filter attributes by active state.","example":true,"schema":{"type":"boolean"}},{"name":"contractType","required":false,"in":"query","description":"Filter attributes by the contract type they apply to.","schema":{"enum":["milestone","payg","fixed","eor","direct_employee"],"type":"string"}},{"name":"area","required":false,"in":"query","description":"Filter attributes by the area they belong to.","schema":{"enum":["contract","work","accounting_categorization"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/AttributeDto"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Attribute"]}},"/openapi/contract/v1/currencies":{"get":{"operationId":"CurrencyController_getCurrencies","summary":"Get list of all currencies","parameters":[],"responses":{"200":{"description":"Array of available currencies.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Currency"]}},"/openapi/contract/v1/frequencies":{"get":{"operationId":"FrequencyController_getList","summary":"Get the list of frequencies","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/FrequencyDto"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Frequency"]}},"/openapi/contract/v1/occurrences":{"get":{"operationId":"OccurrenceController_getList","summary":"Get list of occurrences with the given filters","parameters":[{"name":"frequency_id","required":false,"in":"query","description":"List occurrences for a specific frequency. List of frequencies can be retrieved from list frequencies endpoint.","example":4,"schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/OccurrenceDto"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Occurrence"]}},"/openapi/contract/v1/countries":{"get":{"operationId":"CountryController_getCountries","summary":"Get list of all countries","parameters":[],"responses":{"200":{"description":"List of all countries.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CountryDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Country"]}},"/openapi/contract/v1/countries/states":{"get":{"operationId":"CountryController_getStates","summary":"Get list of all states","parameters":[{"name":"country_id","required":false,"in":"query","description":"Filter states by country id.","schema":{"type":"number"}}],"responses":{"200":{"description":"List of all states.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StateDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Country"]}},"/openapi/contract/v1/eligibility-questions":{"get":{"operationId":"EligibilityQuestionController_getPaginatedList","summary":"Get paginated list of eligibility questions with the given filters","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/EligibilityQuestion"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EligibilityQuestion"]}},"/openapi/contract/v1/templates":{"get":{"operationId":"TemplateController_getPaginatedList","summary":"Get paginated list of contract templates with the given filters","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Template"]}},"/openapi/contract/v1/rates":{"get":{"operationId":"RateController_getPaginatedList","summary":"Get a paginated list of rates","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":10,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":10},"total_items_count":{"type":"number"},"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["Rate"]}},"/openapi/contract/v1/eor/regional-configs/{country}":{"get":{"operationId":"EorRegionalConfigController_getByCountry","summary":"Get the EOR regional config for a country","description":"Returns the EOR hiring rules for a country: salary/leave/probation bounds, allowed employment terms, the dynamic forms whose fields must be answered on POST /eor (`*_form.form_fields`), and the selectable `insurance_providers`. Use this to build a valid POST /eor request. `{country}` is the internal RemotePass country id.","parameters":[{"name":"country","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/EorRegionalConfigResponseDto"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/eor/regional-configs/{country}/{state}":{"get":{"operationId":"EorRegionalConfigController_getByState","summary":"Get the EOR regional config for a state, falling back to its country","description":"Same as the country endpoint, but resolves the state-level config when one exists, otherwise falls back to the country config (check `region_type`/`region_id` to see which resolved). `{country}` and `{state}` are internal RemotePass ids.","parameters":[{"name":"country","required":true,"in":"path","schema":{"type":"number"}},{"name":"state","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/EorRegionalConfigResponseDto"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/eor":{"post":{"operationId":"EorContractController_create","summary":"Create a new EOR (full-time) contract","description":"Creates an EOR full-time contract. First call GET /eor/regional-configs/{country} for the working-from location to discover the region's constraints (salary/leave/probation bounds, allowed employment terms), the dynamic-form fields to answer (`*_form.form_fields`), and the selectable `insurance_providers`, then build this request from that response. Region/business rules are enforced by core and returned as field-level errors.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEorContractRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/CreateEorContractResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/eor/{contractId}/termination-requests":{"post":{"operationId":"EorTerminationController_create","summary":"Create an EOR contract termination request","parameters":[{"name":"contractId","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTerminationRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/TerminationRequestResponseDto"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/eor/{contractId}/termination-requests/cancel":{"post":{"operationId":"EorTerminationController_cancel","summary":"Cancel the pending EOR termination request for a contract","parameters":[{"name":"contractId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":400},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Bad Request"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/eor/{contractId}/termination-requests/{terminationRequestId}":{"get":{"operationId":"EorTerminationController_getOne","summary":"Get a single EOR termination request","parameters":[{"name":"contractId","required":true,"in":"path","schema":{"type":"number"}},{"name":"terminationRequestId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/TerminationRequestResponseDto"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":401},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unauthorized"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":404},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Not Found"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"number","description":"HTTP status code of the error.","example":422},"message":{"type":"string","description":"Human-readable description of the error."},"errorCode":{"type":"string","description":"Machine-readable error code.","example":"Unprocessable Entity"}},"required":["code","message"]}},"required":["error"]}}}}},"tags":["EOR"]}},"/openapi/contract/v1/server/healthy":{"get":{"operationId":"AppController_checkHealthy","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"info":{"title":"RemotePass Service API","description":"API integration","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"PaginationResponseDto":{"type":"object","properties":{"total_pages_count":{"type":"number"},"items":{"type":"array","items":{"type":"string"}}},"required":["total_pages_count","items"]},"AttributeDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the attribute.","example":1},"name":{"type":"string","description":"Human-readable name of the attribute.","example":"Job Title"},"contract_types":{"description":"Contract types this attribute applies to. Known values: milestone, payg, fixed, eor, direct_employee.","example":["fixed","eor"],"type":"array","items":{"type":"string"}},"required":{"type":"boolean","description":"Whether the attribute must be provided (validation). Distinct from \"active\", which controls whether the attribute is enabled at all.","example":true},"active":{"type":"boolean","description":"Whether the attribute is currently enabled. An inactive attribute is hidden even if it is otherwise required.","example":true},"area":{"type":"string","description":"Functional area the attribute belongs to.","enum":["contract","work","accounting_categorization"],"example":"contract"},"type":{"type":"string","description":"Input type of the attribute, controlling how its value is rendered and validated (e.g. text, number, select).","example":"select"},"values":{"default":[],"description":"Allowed values for the attribute. Populated for selection-type attributes; empty for free-form types.","example":["Engineer","Manager"],"type":"array","items":{"type":"string"}}},"required":["id","name","contract_types","required","active","area","type","values"]},"TagDto":{"type":"object","properties":{"id":{"type":"number","minimum":0,"description":"Unique identifier of the tag.","example":12},"name":{"type":"string","description":"Name of the tag.","example":"priority"}},"required":["id","name"]},"ContractCountryDto":{"type":"object","properties":{"id":{"type":"number","description":"Country ID","example":12},"name":{"type":"string","description":"Country name","example":"Jordan"},"iso2":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 code","example":"JO"},"iso3":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-3 code","example":"JOR"}},"required":["id","name","iso2","iso3"]},"ContractWorkerInfoDto":{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"Worker user ID","example":42},"full_name":{"type":"string","nullable":true,"description":"Full name of the worker (first + middle + last)","example":"John Michael Doe"},"gender":{"type":"string","nullable":true,"description":"Gender of the worker","example":"Male","enum":["Male","Female"]},"nationality":{"nullable":true,"description":"Nationality of the worker (country of citizenship)","allOf":[{"$ref":"#/components/schemas/ContractCountryDto"}]},"location":{"nullable":true,"description":"Current location of the worker (country of residence)","allOf":[{"$ref":"#/components/schemas/ContractCountryDto"}]},"email":{"type":"string","nullable":true,"description":"Email address of the worker","example":"worker@example.com"}},"required":["id","full_name","gender","nationality","location","email"]},"ContractDepartmentDto":{"type":"object","properties":{"id":{"type":"number","description":"Department ID","example":5},"name":{"type":"string","description":"Department name","example":"Engineering"}},"required":["id","name"]},"ListContractsResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier for the contract","example":123},"name":{"type":"string","description":"Name of the contract","example":"Software Development Contract"},"created_at":{"type":"string","description":"Date and time when the contract was created","example":"2023-10-15T08:30:00Z"},"activated_at":{"type":"string","description":"Date and time when the contract was activated","example":"2023-10-16T09:00:00Z"},"contract_type":{"type":"string","description":"Type of the contract","example":"DirectEmployee","enum":["DirectEmployee","Fixed","FullTime","Milestone","Payg"]},"status_id":{"type":"number","description":"Status identifier for the contract","example":1},"ref":{"type":"string","description":"Reference number for the contract","example":"AB17BYOG"},"worker_email":{"type":"string","description":"Email address of the worker","example":"worker@example.com"},"company_id":{"type":"number","description":"Company identifier","example":456},"contract_status":{"type":"string","description":"Current status of the contract","example":"Pending company signature","enum":["Pending invite","Pending worker onboarding","Pending company signature","Ongoing","Ended","Cancelled","Terminated","Amended"]},"company_name":{"type":"string","description":"Name of the company","example":"Test Company"},"attributes":{"description":"List of contract attributes","type":"array","items":{"$ref":"#/components/schemas/AttributeDto"}},"tags":{"description":"List of contract tags","type":"array","items":{"$ref":"#/components/schemas/TagDto"}},"is_monthly_cycle":{"type":"boolean","description":"Whether the contract uses monthly cycle (Fixed contracts only)","example":true},"worker":{"nullable":true,"description":"Worker summary: full name, gender, nationality, and location. Null when no worker has been assigned yet.","allOf":[{"$ref":"#/components/schemas/ContractWorkerInfoDto"}]},"department":{"nullable":true,"description":"Department associated with the contract.","allOf":[{"$ref":"#/components/schemas/ContractDepartmentDto"}]}},"required":["id","name","created_at","activated_at","contract_type","status_id","ref","worker_email","company_id","contract_status","company_name"]},"Template":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the contract template.","example":1},"name":{"type":"string","description":"Human-readable name of the contract template.","example":"Standard Service Agreement"},"active":{"type":"string","description":"Whether the template is active. Stored as a string flag, typically \"1\" (active) or \"0\" (inactive).","example":"1"},"agreement":{"type":"string","description":"Agreement text or reference associated with the template.","example":"This Agreement is entered into between the parties..."},"contract_type":{"type":"string","description":"Type of contract the template applies to. Accepted values: milestone, payg, fixed, eor, direct_employee.","example":"fixed"}},"required":["id","name"]},"ContractStatusResponseDto":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"Pending invite"}},"required":["id","name"]},"UnifiedCurrencyDto":{"type":"object","properties":{"id":{"type":"number","example":1},"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"symbol":{"type":"string","example":"$"}},"required":["id","code","name","symbol"]},"UnifiedUserResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"User id","example":6430},"first_name":{"type":"string","description":"First name","example":"Baha"},"last_name":{"type":"string","description":"Last name","example":"Hijazi"},"email":{"type":"string","description":"Email","example":"baha@remotepass.com"},"contractor_type":{"type":"string","nullable":true,"description":"Contractor type when applicable","example":"individual"}},"required":["id","first_name","last_name","email"]},"UnifiedSignatureDto":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"Client"},"ref":{"type":"string","example":"REF123"},"job_title":{"type":"string","example":"Manager"}},"required":["id","name","ref","job_title"]},"UnifiedCountryDto":{"type":"object","properties":{"id":{"type":"number","example":12},"name":{"type":"string","example":"Armenia"},"iso3":{"type":"string","example":"ARM"},"iso2":{"type":"string","example":"AM"}},"required":["id","name","iso3","iso2"]},"UnifiedFrequencyDto":{"type":"object","properties":{"id":{"type":"number","example":1},"code":{"type":"string","example":"week"},"name":{"type":"string","example":"Every week"}},"required":["id","code","name"]},"UnifiedOccurrenceDto":{"type":"object","properties":{"id":{"type":"number","example":3},"value":{"type":"string","example":"wednesday"},"name":{"type":"string","example":"Every Wednesday"},"frequency_id":{"type":"number","example":1}},"required":["id","value","name","frequency_id"]},"ContractAttributeItemDto":{"type":"object","properties":{"id":{"type":"number","description":"Attribute/field id","example":173},"value":{"type":"string","description":"Value","example":"No"},"name":{"type":"string","description":"Label/name","example":"Worked with us before?"},"required":{"type":"number","description":"Required flag","example":1},"active":{"type":"number","description":"Active flag","example":1}},"required":["id","value","name","required","active"]},"ContractDetailResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Contract id","example":11469},"ref":{"type":"string","description":"Contract reference","example":"R2LP9LFZ"},"name":{"type":"string","description":"Contract name","example":"Senior Developer"},"scope":{"type":"string","description":"Scope of work"},"kyc":{"type":"number","description":"KYC flag indicating whether KYC is required/completed for the contract (0 = no, 1 = yes).","example":1},"notice_period":{"type":"number","description":"Notice period in days","example":15},"extra":{"type":"string","nullable":true,"description":"Extra terms"},"file":{"type":"string","nullable":true,"description":"Contract file"},"status":{"description":"Contract status","allOf":[{"$ref":"#/components/schemas/ContractStatusResponseDto"}]},"currency":{"description":"Currency","allOf":[{"$ref":"#/components/schemas/UnifiedCurrencyDto"}]},"client":{"nullable":true,"description":"Client (owner)","allOf":[{"$ref":"#/components/schemas/UnifiedUserResponseDto"}]},"contractor":{"nullable":true,"description":"Contractor/worker","allOf":[{"$ref":"#/components/schemas/UnifiedUserResponseDto"}]},"client_signed":{"type":"object","description":"Whether the client has signed the contract. Returned as 0/1 or a boolean (0/false = not signed, 1/true = signed).","example":0},"contractor_signed":{"type":"object","description":"Whether the contractor has signed the contract. Returned as 0/1 or a boolean (0/false = not signed, 1/true = signed).","example":0},"amended":{"type":"object","description":"Whether the contract has been amended. Returned as 0/1 or a boolean (0/false = not amended, 1/true = amended).","example":0},"fee_covered":{"type":"object","description":"Whether the processing fee is covered by the client. Returned as 0/1 or a boolean (0/false = not covered, 1/true = covered).","example":0},"vat":{"type":"object","description":"VAT percentage applied to the contract, if any.","nullable":true},"withholding_tax":{"type":"object","description":"Withholding tax percentage applied to the contract, if any."},"withholding_tax_expense":{"type":"number","description":"Withholding tax expense","example":0},"contractor_name":{"type":"string","description":"Contractor display name"},"can_submit":{"type":"boolean","description":"Can submit work","example":false},"read_only":{"type":"boolean","description":"Read only","example":false},"signatures":{"description":"Signatures","example":[],"type":"array","items":{"$ref":"#/components/schemas/UnifiedSignatureDto"}},"signatory":{"nullable":true,"description":"Signatory","allOf":[{"$ref":"#/components/schemas/UnifiedUserResponseDto"}]},"is_cor":{"type":"object","description":"Whether this is a Contractor of Record (COR) contract. Returned as 0/1 or a boolean (0/false = no, 1/true = yes).","example":0},"taxResidence":{"nullable":true,"description":"Tax residence","allOf":[{"$ref":"#/components/schemas/UnifiedCountryDto"}]},"is_scheduled_terminated":{"type":"boolean","description":"Scheduled terminated","example":false},"last_payment_amount":{"type":"number","nullable":true,"description":"Last payment amount"},"next_payment":{"type":"string","description":"Next payment date"},"start_date":{"type":"string","description":"Start date"},"end_date":{"type":"string","description":"End date"},"termination_date":{"type":"string","nullable":true,"description":"Termination date"},"amount":{"type":"number","description":"Amount"},"frequency":{"nullable":true,"description":"Frequency (Fixed/Payg/FullTime/DE)","allOf":[{"$ref":"#/components/schemas/UnifiedFrequencyDto"}]},"occurrence":{"nullable":true,"description":"Occurrence (Fixed/Payg/FullTime/DE)","allOf":[{"$ref":"#/components/schemas/UnifiedOccurrenceDto"}]},"first_payment_date":{"type":"string","description":"First payment date"},"first_payment_prorata":{"type":"boolean","description":"First payment prorata","example":false},"prorata_amount":{"type":"number","nullable":true,"description":"Prorata amount"},"is_monthly_cycle":{"type":"boolean","description":"Monthly cycle (Fixed)","example":false},"first_payment_amount":{"type":"number","description":"First payment amount","example":0},"type":{"type":"string","description":"Contract type.","example":"Fixed","enum":["Fixed","Payg","Milestone","FullTime","DirectEmployee"]},"company_name":{"type":"string","nullable":true,"description":"Company name"},"company_id":{"type":"number","nullable":true,"description":"Company id"},"company_logo":{"type":"string","nullable":true,"description":"Company logo"},"attributes":{"description":"Contract attributes (e.g. Worked with us before?)","example":[{"id":173,"value":"No","name":"Worked with us before?","required":1,"active":1}],"type":"array","items":{"$ref":"#/components/schemas/ContractAttributeItemDto"}},"contractable_type":{"type":"string","description":"Underlying contractable model type label. Usually mirrors `type`, but reflects the internal contractable entity rather than the high-level contract type.","example":"Fixed","enum":["Fixed","Payg","Milestone","FullTime","DirectEmployee"]},"approverInfo":{"nullable":true,"description":"Approver info","allOf":[{"$ref":"#/components/schemas/UnifiedUserResponseDto"}]},"approver2Info":{"nullable":true,"description":"Second approver info","allOf":[{"$ref":"#/components/schemas/UnifiedUserResponseDto"}]},"customFields":{"description":"Custom fields","example":[{"id":173,"value":"No","name":"Worked with us before?","required":1,"active":1}],"type":"array","items":{"$ref":"#/components/schemas/ContractAttributeItemDto"}},"worker":{"nullable":true,"description":"Worker summary: full name, gender, nationality, and location. Null when no worker has been assigned yet.","allOf":[{"$ref":"#/components/schemas/ContractWorkerInfoDto"}]},"department":{"nullable":true,"description":"Department associated with the contract.","allOf":[{"$ref":"#/components/schemas/ContractDepartmentDto"}]}},"required":["id","ref","name","scope","kyc","notice_period","status","currency","client","contractor","client_signed","contractor_signed","amended","contractor_name","can_submit","read_only","signatures","signatory","is_cor","type"]},"InviteContractorDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the contractor to invite"},"customText":{"type":"string","description":"Custom text to be included in the invitation email"}},"required":["email"]},"InviteContractorResponseDto":{"type":"object","properties":{"email":{"type":"string"},"invitationUrl":{"type":"string"}},"required":["email","invitationUrl"]},"AssignSignatoryDto":{"type":"object","properties":{"signatoryId":{"type":"number","minimum":0,"description":"User ID of the signatory to assign"}},"required":["signatoryId"]},"CancelContractDto":{"type":"object","properties":{"termination_date":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"The date the contract is to be terminated. Format: YYYY-MM-DD","example":"2021-01-01"}}},"TerminateContractDto":{"type":"object","properties":{"termination_date":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Format YYYY-MM-DD","example":"2022-12-31"},"amount":{"type":"number","minimum":0,"description":"Amount to be paid to the contractor upon termination. Required for fixed contracts, where `0` is accepted and creates a zero-value last payment.","example":1500.5}}},"UpdateContractAttributesItemDto":{"type":"object","properties":{"id":{"type":"number","description":"Attribute ID to be updated","example":123},"value":{"type":"string","description":"New value for the attribute","example":"New value"}},"required":["id","value"]},"UpdateContractDto":{"type":"object","properties":{"name":{"type":"string","description":"Contract name/role - The job title or role for this contract. This appears as the main contract title.","example":"Senior Developer"},"scope":{"type":"string","description":"Scope of work description - Detailed description of the work to be performed under this contract.","example":"Develop and maintain web applications using React and Node.js"},"tax_residence_iso":{"type":"string","description":"Contractor tax country ISO3 code - The country where the contractor is tax resident (e.g., USA, GBR, DEU). Get available countries from GET /countries endpoint.","example":"USA"},"template_id":{"type":"number","description":"Template ID - The contract template to use for this contract. Get available templates from GET /contracts/templates endpoint. Setting this clears any custom contract document.","example":1},"file":{"type":"string","description":"Custom contract document path - Path of a previously uploaded document, from POST /contracts/files. Setting this clears template_id and resets both signatures.","example":"/contracts/3f2b8c1e-9d4a-4f7b-8c2e-1a5b6d7e8f90.pdf"},"notice_period":{"type":"number","minimum":0,"description":"Notice period in days - How many days notice is required to terminate this contract.","example":30},"contractor_name":{"type":"string","description":"Contractor label/name - The display name for the contractor in this contract.","example":"John Doe"},"start_date":{"type":"string","description":"Start date - The date when contract begins (ISO 8601 format: YYYY-MM-DD). Only applicable for Fixed and PayG contracts.","example":"2024-01-01"},"end_date":{"type":"string","description":"Payment end date - The date when payments end for this contract (ISO 8601 format: YYYY-MM-DD). Must be on or after start_date. Only applicable for Fixed and PayG contracts.","example":"2024-12-31"},"amount":{"type":"number","minimum":0,"description":"Payment amount - The monetary amount for this contract payment. Must be non-negative. Only applicable for Fixed and PayG contracts.","example":5000},"currency_code":{"type":"string","description":"Currency ISO3 code - The currency for contract payments (e.g., USD, EUR, GBP). Get available currencies from GET /currencies endpoint. Only applicable for Fixed and PayG contracts.","example":"USD"},"frequency_id":{"type":"number","description":"Payment frequency ID - How often payments are made (e.g., monthly, weekly). Get available frequencies from GET /frequencies endpoint. Only applicable for Fixed and PayG contracts.","example":1},"occurrence_id":{"type":"number","description":"Occurrence ID - When payments should be processed (e.g., monthly, weekly, on completion). Get available occurrences from GET /occurrences endpoint. Only applicable for Fixed and PayG contracts.","example":1},"first_payment_prorata":{"type":"boolean","description":"Pro-rata is calculated based on the days worked in the 1st cycle [days worked * (amount / days in the 1st cycle)]","example":true,"examples":[false,true]},"prorata_amount":{"type":"number","minimum":0,"description":"Prorata amount - The pro-rata amount for the first payment. Required when first_payment_prorata is true. Must be non-negative. Only applicable for Fixed and PayG contracts.","example":2500},"first_payment_date":{"format":"date-time","type":"string"},"attributes":{"description":"List of attributes to be updated","type":"array","items":{"$ref":"#/components/schemas/UpdateContractAttributesItemDto"}}}},"UpdateContractAttributesResponseItemDto":{"type":"object","properties":{"id":{"type":"number","description":"Attribute ID","example":123},"value":{"type":"string","description":"New value for the attribute","example":"New value"}},"required":["id","value"]},"UpdateContractAttributesDto":{"type":"object","properties":{"attributes":{"description":"List of attributes to be updated","type":"array","items":{"$ref":"#/components/schemas/UpdateContractAttributesItemDto"}}},"required":["attributes"]},"ContractFileResponseDto":{"type":"object","properties":{"path":{"type":"string","description":"Path of the stored document. Pass this as the \"file\" field when creating or updating a contract.","example":"/contracts/3f2b8c1e-9d4a-4f7b-8c2e-1a5b6d7e8f90.pdf"}},"required":["path"]},"UploadContractFileDto":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The custom contract document. Allowed types: application/pdf, image/jpeg, image/png. Maximum size: 5 MB."}},"required":["file"]},"ContractBasicResponseDto":{"type":"object","properties":{"contract_id":{"type":"number","example":123},"contract_ref":{"type":"string","example":"KJQOX7RJ"},"name":{"type":"string","example":"Quality Engineer"},"attributes":{"example":[],"type":"array","items":{"type":"object"}},"scope":{"type":"string","example":"Software Engineer: - Develop and direct software system validation and testing methods.\\n- Direct software programming initiatives\\n- Work closely with clients and cross-functional departments to communicate project statuses and proposals.\\n- Analyze data to effectively coordinate the installation of new systems or the modification of existing systems.\\n- Manage the software development lifecycle.\\n- Monitor system performance.\\n- Develop and execute project plans.\\n- Apply mathematics and statistics to problem-solving initiatives.\\n- Apply best practices and standard operating procedures.\\n- Create innovative solutions to meet our company's technical needs.\\n- Test new software and fix bugs."},"start_date":{"type":"string","example":"2024-01-01"},"amount":{"type":"number","example":5000},"currency_code":{"type":"string","description":"The currency ISO3 code associated with the contract.","example":"USD"},"template_id":{"type":"number","example":1},"owner_id":{"type":"number","example":456},"tax_residence_iso":{"type":"string","description":"The contractor tax country ISO3 code associated with the contract.","example":"ARE"},"frequency_id":{"type":"number","example":1},"occurrence_id":{"type":"number","example":1},"first_payment_date":{"type":"string","example":"2024-01-15"},"first_payment_prorata":{"type":"boolean","example":true},"prorata_amount":{"type":"number","example":1000},"notice_period":{"type":"number","example":30},"is_cor":{"type":"boolean","description":"Whether this is a Contractor of Record (COR) contract.","example":false},"contractor_name":{"type":"string","example":"John Doe"},"tax_residence_id":{"type":"number","description":"Internal database identifier of the contractor tax residence country (see tax_residence_iso for the ISO3 code).","example":1},"currency_id":{"type":"number","description":"Internal database identifier of the contract currency (see currency_code for the ISO3 code).","example":1},"is_monthly_cycle":{"type":"boolean","description":"Whether the contract runs on a calendar-monthly cycle (1st to last day of each month).","example":true}},"required":["contract_id","contract_ref","name","attributes","scope","start_date","amount","currency_code","template_id","owner_id","tax_residence_iso","frequency_id","occurrence_id","first_payment_date","first_payment_prorata","prorata_amount","notice_period","is_cor","contractor_name","tax_residence_id","currency_id"]},"AttributeResponseDto":{"type":"object","properties":{"id":{"type":"number"},"value":{"type":"string","maxLength":100}},"required":["id","value"]},"MilestoneDto":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The amount to be paid for the milestone.","example":500},"name":{"type":"string","description":"The name of the milestone.","example":"Design phase delivery"}},"required":["amount","name"]},"CreateMilestoneContractRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"The role of the contractor or the name of the contract.","example":"Graphic Designer"},"attributes":{"description":"List of attributes (Custom Fields) to associate with the contract.","type":"array","items":{"$ref":"#/components/schemas/AttributeResponseDto"}},"milestones":{"description":"List of milestones to associate with the contract.","type":"array","items":{"$ref":"#/components/schemas/MilestoneDto"}},"scope":{"type":"string","description":"The scope of work for the contract.","example":"Software Engineer: - Develop and direct software system validation and testing methods.\n- Direct software programming initiatives\n- Work closely with clients and cross-functional departments to communicate project statuses and proposals.\n- Analyze data to effectively coordinate the installation of new systems or the modification of existing systems.\n- Manage the software development lifecycle.\n- Monitor system performance.\n- Develop and execute project plans.\n- Apply mathematics and statistics to problem-solving initiatives.\n- Apply best practices and standard operating procedures.\n- Create innovative solutions to meet our company's technical needs.\n- Test new software and fix bugs."},"currency_code":{"type":"string","description":"The currency ISO3 to be associated with the contract.","example":"USD"},"template_id":{"type":"number","description":"The ID of the contract template if applicable. When is_cor is true, it must be a COR template (contract_type \"cor\"). Mutually exclusive with file."},"file":{"type":"string","description":"Path of a previously uploaded custom contract document, from POST /contracts/files. Use this to attach your own agreement instead of a RemotePass template. Mutually exclusive with template_id.","example":"/contracts/3f2b8c1e-9d4a-4f7b-8c2e-1a5b6d7e8f90.pdf"},"owner_id":{"type":"number","description":"The ID of the client to own or be associated within the contract."},"tax_residence_iso":{"type":"string","description":"The Contractor Tax Country ISO3 to be associated with the contract.","example":"USA"},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract","example":15},"is_cor":{"type":"number","description":"Enable Contractor of Record: RemotePass to hire and sign the agreement directly with the contractor.","example":0,"examples":[{"0":false},{"1":true}]},"contractor_name":{"type":"string","description":"Contractor Label: By default this label is set to 'Contractor'. You can change it to; Consultant, Freelancer, Expert, Service provider... etc. If you change this label, the change will be reflected on the Agreement as well as the Contract details. *Avoid using Employee as a label, if you are using our contract template.","example":"Contractor"},"employee_id":{"type":"number","description":"The ID of the employee associated with this contract.","example":1},"signatory_id":{"type":"number","description":"The ID of the signatory user for this contract.","example":123}},"required":["name","attributes","milestones","scope","currency_code","owner_id","tax_residence_iso","notice_period"]},"AddMilestoneToContractRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"The name of the milestone we want to add to the contract.","example":"Phase 1"},"attributes":{"description":"List of attributes (Custom Fields) to associate with the milestone.","type":"array","items":{"$ref":"#/components/schemas/AttributeResponseDto"}},"amount":{"type":"number","minimum":0,"description":"The amount of the payment for this milestone","example":15},"employee_id":{"type":"number","description":"The ID of the employee associated with this contract.","example":1}},"required":["name","attributes","amount"]},"Work":{"type":"object","properties":{}},"MilestoneContractAddAmendmentDto":{"type":"object","properties":{"name":{"type":"string","description":"The role of the contractor or the name of the contract."},"scope":{"type":"string","description":"The scope of work for the contract."},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract."}}},"CreateFixedContractRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"The role of contractor or the name of the contract.","example":"Graphic Designer"},"attributes":{"description":"List of attributes (Custom Fields) to associate with the contract.","example":[{"id":85,"value":"2024-11-15"}],"type":"array","items":{"$ref":"#/components/schemas/AttributeResponseDto"}},"scope":{"type":"string","description":"The scope of work for the contract.","example":"Software Engineer: - Develop and direct software system validation and testing methods.\n- Direct software programming initiatives\n- Work closely with clients and cross-functional departments to communicate project statuses and proposals.\n- Analyze data to effectively coordinate the installation of new systems or the modification of existing systems.\n- Manage the software development lifecycle.\n- Monitor system performance.\n- Develop and execute project plans.\n- Apply mathematics and statistics to problem-solving initiatives.\n- Apply best practices and standard operating procedures.\n- Create innovative solutions to meet our company's technical needs.\n- Test new software and fix bugs."},"start_date":{"type":"string","description":"The start date of the contract in the format YYYY-MM-DD.","example":"2024-05-10"},"amount":{"type":"number","description":"The amount to be paid within the contract.","example":500},"currency_code":{"type":"string","description":"The currency ISO3 to be associated with the contract.","example":"USD"},"template_id":{"type":"number","description":"The ID of the contract template if applicable. Required if is_cor is false/0, unless file is provided. When is_cor is true, it must be a COR template (contract_type \"cor\"). Mutually exclusive with file.","example":1},"file":{"type":"string","description":"Path of a previously uploaded custom contract document, from POST /contracts/files. Use this to attach your own agreement instead of a RemotePass template. Mutually exclusive with template_id.","example":"/contracts/3f2b8c1e-9d4a-4f7b-8c2e-1a5b6d7e8f90.pdf"},"owner_id":{"type":"number","description":"The ID of the client to own or be associated within the contract.","example":6430},"tax_residence_iso":{"type":"string","description":"The Contractor Tax Country ISO3 to be associated with the contract.","example":"USA"},"frequency_id":{"type":"number","description":"The Frequency of payments during the lifetime of contract.","example":3},"occurrence_id":{"type":"number","description":"Identifies when within the cycle payments are processed.","example":15},"first_payment_date":{"type":"string","description":"Date for the first payment.","example":"2024-11-15"},"first_payment_prorata":{"type":"boolean","description":"Pro-rata is calculated based on the days worked in the 1st cycle [days worked * (amount / days in the 1st cycle)]","example":true,"examples":[false,true]},"is_monthly_cycle":{"type":"boolean","description":"Whether the contract runs on a calendar-monthly cycle (1st to last day of each month).","example":true,"examples":[false,true]},"prorata_amount":{"type":"number","minimum":0,"description":"Prorata amount - The pro-rata amount for the first payment. Required when first_payment_prorata is true. Must be non-negative.","example":64.52},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract","example":15},"is_cor":{"type":"number","description":"Enable Contractor of Record: RemotePass to hire and sign the agreement directly with the contractor.","example":1,"examples":[{"0":false},{"1":true}]},"contractor_name":{"type":"string","maxLength":100,"description":"Contractor Label: By default this label is set to 'Contractor'. You can change it to; Consultant, Freelancer, Expert, Service provider... etc. If you change this label, the change will be reflected on the Agreement as well as the Contract details. *Avoid using Employee as a label, if you are using our contract template.","example":"Contractor"},"signatory_id":{"type":"number","description":"The ID of the signatory user for this contract.","example":123}},"required":["name","attributes","scope","start_date","amount","currency_code","owner_id","tax_residence_iso","frequency_id","occurrence_id","first_payment_date","notice_period"]},"FixedContractAddAmendmentDto":{"type":"object","properties":{"name":{"type":"string","description":"The role of the contractor or the name of the contract."},"scope":{"type":"string","description":"The scope of work for the contract."},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract."},"amount":{"type":"number","minimum":0,"description":"The amount to be paid for the contract."},"currency_code":{"type":"string","description":"The currency ISO3 to be associated with the contract.","example":"USD"},"start_date":{"type":"string","description":"The start date of the contract in the format YYYY-MM-DD."},"end_date":{"type":"string","description":"The end date of the contract in the format YYYY-MM-DD."},"frequency_id":{"type":"number","description":"Use list frequencies endpoint to get the available frequencies and the ID to use"},"occurrence_id":{"type":"number","description":"Use list occurrences endpoint to get the available occurrences and the ID to use"},"first_payment_date":{"type":"string","description":"The first payment date in the format YYYY-MM-DD."},"prorata_amount":{"type":"number","minimum":0},"first_payment_prorata":{"type":"boolean","description":"Pro-rata is calculated based on the days worked in the 1st cycle [days worked * (amount / days in the 1st cycle)]","example":true,"examples":[false,true]},"is_monthly_cycle":{"type":"boolean","description":"Whether the contract uses monthly cycle","example":true,"examples":[false,true]}}},"CreatePaygContractRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"The role of the contractor or the name of the contract.","example":"Graphic Designer"},"attributes":{"description":"List of attributes (Custom Fields) to associate with the contract.","type":"array","items":{"$ref":"#/components/schemas/AttributeResponseDto"}},"scope":{"type":"string","description":"The scope of work for the contract.","example":"Software Engineer: - Develop and direct software system validation and testing methods.\n- Direct software programming initiatives\n- Work closely with clients and cross-functional departments to communicate project statuses and proposals.\n- Analyze data to effectively coordinate the installation of new systems or the modification of existing systems.\n- Manage the software development lifecycle.\n- Monitor system performance.\n- Develop and execute project plans.\n- Apply mathematics and statistics to problem-solving initiatives.\n- Apply best practices and standard operating procedures.\n- Create innovative solutions to meet our company's technical needs.\n- Test new software and fix bugs."},"start_date":{"type":"string","description":"The start date of the contract in the format YYYY-MM-DD.","example":"2024-05-10"},"amount":{"type":"number","description":"The amount to be paid within the contract."},"currency_code":{"type":"string","description":"The currency ISO3 to be associated with the contract.","example":"USD"},"template_id":{"type":"number","description":"The ID of the contract template if applicable. When is_cor is true, it must be a COR template (contract_type \"cor\"). Mutually exclusive with file."},"file":{"type":"string","description":"Path of a previously uploaded custom contract document, from POST /contracts/files. Use this to attach your own agreement instead of a RemotePass template. Mutually exclusive with template_id.","example":"/contracts/3f2b8c1e-9d4a-4f7b-8c2e-1a5b6d7e8f90.pdf"},"owner_id":{"type":"number","description":"The ID of the client to own or be associated within the contract."},"tax_residence_iso":{"type":"string","description":"The Contractor Tax Country ISO3 to be associated with the contract.","example":"USA"},"rate_id":{"type":"number","description":"The ID of the rate (work unit) to be associated within the contract."},"frequency_id":{"type":"number","description":"The Frequency of payments during the lifetime of contract.","example":1},"occurrence_id":{"type":"number","description":"Identifies when within the cycle payments are processed.","example":15},"first_payment_date":{"type":"string","description":"Date for the first payment.","example":"2024-05-15"},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract","example":15},"is_cor":{"type":"number","description":"Enable Contractor of Record: RemotePass to hire and sign the agreement directly with the contractor.","example":0,"examples":[{"0":false},{"1":true}]},"contractor_name":{"type":"string","description":"Contractor Label: By default this label is set to 'Contractor'. You can change it to; Consultant, Freelancer, Expert, Service provider... etc. If you change this label, the change will be reflected on the Agreement as well as the Contract details. *Avoid using Employee as a label, if you are using our contract template.","example":"Contractor"},"signatory_id":{"type":"number","description":"The ID of the signatory user for this contract.","example":123}},"required":["name","attributes","scope","start_date","amount","currency_code","owner_id","tax_residence_iso","rate_id","frequency_id","occurrence_id","first_payment_date","notice_period"]},"PaygContractAddAmendmentDto":{"type":"object","properties":{"name":{"type":"string","description":"The role of the contractor or the name of the contract."},"scope":{"type":"string","description":"The scope of work for the contract."},"notice_period":{"type":"number","minimum":0,"description":"Notice period (days) to terminate the contract."},"amount":{"type":"number","minimum":0,"description":"The amount to be paid for the contract."},"currency_code":{"type":"string","description":"The currency ISO3 to be associated with the contract.","example":"USD"},"start_date":{"type":"string","description":"The start date of the contract in the format YYYY-MM-DD."},"end_date":{"type":"string","description":"The end date of the contract in the format YYYY-MM-DD."},"frequency_id":{"type":"number","description":"Use list frequencies endpoint to get the available frequencies and the ID to use"},"occurrence_id":{"type":"number","description":"Use list occurrences endpoint to get the available occurrences and the ID to use"},"first_payment_date":{"type":"string","description":"The first payment date in the format YYYY-MM-DD."},"rate_id":{"type":"number","description":"Use list rates endpoint to get the available rates and the ID to use."}}},"StatusDto":{"type":"object","properties":{"id":{"type":"number","minimum":0,"description":"Unique identifier of the contract status.","example":1},"name":{"type":"string","description":"Human-readable name of the contract status.","example":"Ongoing"}},"required":["id","name"]},"CurrencyDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the currency.","example":1},"name":{"type":"string","description":"Human-readable name of the currency.","example":"US Dollar"},"code":{"type":"string","description":"ISO 4217 currency code.","example":"USD"}},"required":["id","name","code"]},"FrequencyDto":{"type":"object","properties":{"id":{"type":"number","minimum":0,"description":"Unique identifier of the frequency.","example":4},"name":{"type":"string","maxLength":100,"description":"Human-readable name of the frequency.","example":"Every month"},"code":{"type":"string","description":"Identifier of the frequency from a fixed set. Known values: \"every week\", \"every other week\", \"twice a month\", \"every month\".","example":"every month"}},"required":["id","name","code"]},"OccurrenceDto":{"type":"object","properties":{"id":{"type":"number","minimum":0,"description":"Unique identifier of the occurrence.","example":1},"value":{"type":"string","maxLength":100,"description":"Machine-readable code/value identifying the occurrence.","example":"first_working_day"},"name":{"type":"string","maxLength":100,"description":"Human-readable label of the occurrence.","example":"First working day of the month"},"frequency_id":{"type":"number","description":"Identifier of the frequency this occurrence belongs to. List of frequencies can be retrieved from the list frequencies endpoint.","example":4},"pos":{"type":"number"}},"required":["id","value","name","frequency_id","pos"]},"CountryDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the country.","example":1},"name":{"type":"string","description":"Name of the country.","example":"United States"},"iso3":{"type":"string","description":"ISO 3166-1 alpha-3 country code.","example":"USA"}},"required":["id","name","iso3"]},"StateDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the state.","example":1},"name":{"type":"string","description":"Name of the state.","example":"California"},"iso2":{"type":"string","description":"ISO 3166-2 / alpha-2 code for the state.","example":"CA"}},"required":["id","name","iso2"]},"EligibilityQuestion":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the eligibility question.","example":1},"title":{"type":"string","description":"Title of the eligibility question.","example":"Are you legally authorized to work in this country?"},"description":{"type":"string","description":"Detailed description or supporting text for the question.","example":"Confirm the worker holds a valid work authorization."},"options":{"type":"string","description":"Available answer options as stored, a JSON-encoded array of strings.","example":"[\"Yes\", \"No\", \"Not sure\"]"},"response":{"type":"string","description":"Selected or recorded answer to the question, as plain text.","example":"Yes"}},"required":["id","title","description","options","response"]},"Rate":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the rate.","example":1},"code":{"type":"string","description":"Machine-readable code identifying the rate.","example":"hourly"},"name":{"type":"string","description":"Human-readable name of the rate.","example":"Hourly"}},"required":["id","code","name"]},"EorFormFieldResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Use as `form_field_id` in `*_answers`."},"type":{"type":"string","description":"Field input type, e.g. short_text_input, dropdown, date_picker, file_upload."},"title":{"type":"string","nullable":true,"description":"Display label for the field."},"options":{"type":"array","items":{"type":"object"},"nullable":true,"description":"Parsed JSON of selectable options for dropdown/multi-select types; entries may be option objects rather than plain strings."},"is_required":{"type":"boolean","description":"Whether the field must be answered."},"is_full_row":{"type":"boolean","description":"Whether the field spans the full row in the form layout."},"placeholder":{"type":"string","nullable":true,"description":"Placeholder text for the input."},"order":{"type":"number","nullable":true,"description":"Display order of the field within the form."},"configs":{"type":"object","nullable":true,"description":"Parsed JSON of additional field configuration."},"form_id":{"type":"number","description":"Internal id of the parent form."},"form_step_id":{"type":"number","nullable":true,"description":"Set when the parent form is multi-step."}},"required":["id","type","title","options","is_required","is_full_row","placeholder","order","configs","form_id","form_step_id"]},"EorFormResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Internal id of the form."},"name":{"type":"string","nullable":true,"description":"Display name of the form."},"is_multi_step":{"type":"boolean","description":"Whether the form is split into multiple steps."},"is_enabled":{"type":"boolean","description":"Whether the form is currently enabled."},"form_fields":{"description":"The fields that make up this form.","type":"array","items":{"$ref":"#/components/schemas/EorFormFieldResponseDto"}}},"required":["id","name","is_multi_step","is_enabled","form_fields"]},"EorInsuranceProviderTierResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Use as `insurance_provider_tier_id` on POST /eor.","example":5},"name":{"type":"string","example":"Standard"},"description":{"type":"string","nullable":true,"example":"Covers outpatient and inpatient care."}},"required":["id","name","description"]},"EorInsuranceProviderResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Use as `insurance_provider_id` on POST /eor.","example":3},"name":{"type":"string","description":"The provider's internal name.","example":"Acme Health"},"title":{"type":"string","nullable":true,"description":"The provider's display/marketing title shown to users.","example":"Acme Global Health Cover"},"starting_price":{"type":"string","nullable":true,"example":"From $85 per month"},"currency":{"type":"string","nullable":true,"example":"USD"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/EorInsuranceProviderTierResponseDto"}}},"required":["id","name","title","starting_price","currency","tiers"]},"EorRegionalConfigResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Internal id of this regional-config record."},"region_id":{"type":"number","description":"The internal RemotePass id of the resolved region (a country id when `region_type` is \"country\", a state id when \"state\")."},"region_type":{"type":"string","enum":["country","state"],"description":"Which region level this config applies to. When you requested a state but only a country config exists, this is \"country\" — i.e. the state fell back to its country."},"is_enabled":{"type":"boolean","description":"Whether EOR hiring is currently enabled for this region."},"min_annual_salary":{"type":"number","nullable":true,"description":"Minimum allowed annual gross salary, in the region's local currency. Constrains POST /eor `amount` (compared after currency conversion)."},"min_annual_leave_days":{"type":"number","nullable":true,"description":"Minimum annual paid leave days — the floor for POST /eor `annual_leave_days`."},"max_probation_months":{"type":"number","nullable":true,"description":"Maximum probation length in months. Caps POST /eor `trial_period`, which is supplied in days (core compares `trial_period / 30`)."},"work_hours_per_week":{"type":"number","nullable":true,"description":"Standard full-time working hours per week for the region."},"is_immigration_supported":{"type":"boolean","description":"Whether work-visa / immigration sponsorship is available. Gates POST /eor `work_visa`."},"is_healthcare_required":{"type":"boolean","description":"Whether health insurance is mandatory. When true, POST /eor must set `insurance: true` with an `insurance_provider_id` from `insurance_providers` below."},"is_salary_payable_in_usd":{"type":"boolean","description":"Whether salaries may be denominated in USD for this region (affects the choice of POST /eor `currency_id`)."},"is_tax_breakdown_enabled":{"type":"boolean","description":"Whether tax breakdown is enabled for the region."},"available_employment_terms":{"nullable":true,"description":"Employment terms allowed for the region. Use one as POST /eor `employment_term`.","type":"array","items":{"type":"string"}},"min_duration_months":{"type":"number","nullable":true,"description":"Minimum contract duration in months for definite-term contracts (null = no minimum)."},"max_duration_months":{"type":"number","nullable":true,"description":"Maximum contract duration in months for definite-term contracts (null = no maximum)."},"payment_details_form":{"nullable":true,"description":"Fields for the `payment_details_answers` array on POST /eor.","allOf":[{"$ref":"#/components/schemas/EorFormResponseDto"}]},"employee_details_form":{"nullable":true,"description":"Fields for the `employee_details_answers` array on POST /eor.","allOf":[{"$ref":"#/components/schemas/EorFormResponseDto"}]},"compensation_benefit_details_form":{"nullable":true,"description":"Fields for the `compensation_benefit_details_answers` array on POST /eor.","allOf":[{"$ref":"#/components/schemas/EorFormResponseDto"}]},"insurance_providers":{"description":"Insurance providers selectable for this region. Pick an `id` for `insurance_provider_id` (and optionally a tier `id` for `insurance_provider_tier_id`) on POST /eor when `is_healthcare_required` or you opt into `insurance: true`. Empty when the region has no configured provider.","type":"array","items":{"$ref":"#/components/schemas/EorInsuranceProviderResponseDto"}}},"required":["id","region_id","region_type","is_enabled","min_annual_salary","min_annual_leave_days","max_probation_months","work_hours_per_week","is_immigration_supported","is_healthcare_required","is_salary_payable_in_usd","is_tax_breakdown_enabled","available_employment_terms","min_duration_months","max_duration_months","payment_details_form","employee_details_form","compensation_benefit_details_form","insurance_providers"]},"CreateEorContractResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"The internal contract id.","example":12345},"ref":{"type":"string","description":"The contract reference.","example":"RP-12345"},"name":{"type":"string","example":"Software Engineer"},"is_cor":{"type":"boolean","description":"Whether the contract is a Contractor-of-Record contract.","example":false}},"required":["id","ref","name","is_cor"]},"AllowanceDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":20,"description":"Allowance label (e.g. Housing, Transport).","example":"Housing"},"amount":{"type":"number","minimum":0.01,"description":"Allowance amount (> 0), in the contract's `currency_id`.","example":500}},"required":["name","amount"]},"FormAnswerDto":{"type":"object","properties":{"form_field_id":{"type":"number","description":"The `id` of a field from the relevant `*_form.form_fields` array in the GET /eor/regional-configs response.","example":12},"value":{"type":"string","description":"The field's answer, serialized as a string.","example":"some value"}},"required":["form_field_id","value"]},"IntegrationDto":{"type":"object","properties":{"code":{"type":"string","example":"bamboohr"},"worker_id":{"type":"string","example":"worker-123"}},"required":["code","worker_id"]},"CreateEorContractRequestDto":{"type":"object","properties":{"job_title":{"type":"string","description":"The employee's job title.","example":"Software Engineer"},"job_description":{"type":"string","description":"A description of the role and its responsibilities.","example":"Builds and maintains backend services."},"qualification":{"type":"string","enum":["Employee","Manager"],"description":"The worker category / role (e.g. Employee or Manager).","example":"Employee"},"employment_type":{"type":"string","enum":["Full-time","Part-time"],"description":"Full-time or Part-time. `working_hours_per_week` is required for Part-time.","example":"Full-time"},"employment_term":{"type":"string","enum":["Definite","Indefinite"],"description":"Definite (fixed end date) or Indefinite. Must be one of the region's `available_employment_terms` from GET /eor/regional-configs.","example":"Indefinite"},"start_date":{"type":"string","description":"Contract start date (ISO `YYYY-MM-DD`). Must be a few days in the future.","example":"2026-07-01"},"end_date":{"type":"string","description":"Required when employment_term is \"Definite\".","example":"2027-07-01"},"working_hours_per_week":{"type":"number","maximum":168,"description":"Required when employment_type is \"Part-time\".","example":20},"amount":{"type":"number","description":"Annual gross salary, in the currency given by `currency_id`. Must meet the region's `min_annual_salary` from GET /eor/regional-configs (compared after currency conversion).","example":60000},"currency_id":{"type":"number","description":"Internal RemotePass currency id for the salary. To denominate the salary in USD, the region must have `is_salary_payable_in_usd: true`; other currencies are not restricted by this flag.","example":1},"employee_first_name":{"type":"string","description":"The employee's first name.","example":"Jane"},"employee_middle_name":{"type":"string","description":"The employee's middle name, if any.","example":"A."},"employee_last_name":{"type":"string","description":"The employee's last name.","example":"Doe"},"employee_email":{"type":"string","description":"The employee's email address; used to invite them.","example":"jane.doe@example.com"},"employee_country_id":{"type":"number","description":"Internal RemotePass country id (`countries.id`) of the employee's country of residence.","example":1},"employee_nationality_country_id":{"type":"number","description":"Internal RemotePass country id (`countries.id`) of the employee's nationality.","example":1},"working_from_country_id":{"type":"number","description":"Internal RemotePass country id the employee works from. This is the `{country}` used in GET /eor/regional-configs/{country}.","example":1},"working_from_state_id":{"type":"number","description":"Internal RemotePass state id the employee works from, where applicable. Used as `{state}` in GET /eor/regional-configs/{country}/{state}.","example":10},"work_visa":{"type":"boolean","description":"Whether RemotePass should sponsor a work visa / immigration. Only where the region's `is_immigration_supported` is true.","example":false},"trial_period":{"type":"number","minimum":0,"description":"Probation/trial period in days. Capped by the region's `max_probation_months` (core compares `trial_period / 30` against it).","example":90},"annual_leave_days":{"type":"number","maximum":366,"description":"Annual paid leave days. Must be at least the region's `min_annual_leave_days` from GET /eor/regional-configs; max 366.","example":25},"allowances":{"description":"Recurring allowances on top of base salary, in `currency_id`. Must be present (may be an empty array).","example":[],"type":"array","items":{"$ref":"#/components/schemas/AllowanceDto"}},"signing_bonus_amount":{"type":"number","description":"Optional one-off signing bonus, in `currency_id`.","example":5000},"bonus_details":{"type":"string","description":"Optional free-text details for the signing bonus.","example":"Annual performance bonus"},"salary_breakdown_type":{"type":"string","enum":["60_30_10","65_25_10","70_20_10","50_30_20","75_15_10","100_base","custom"],"description":"Optional split of the gross salary into base/allowance components (e.g. `60_30_10`). Defaults to `100_base` (full base salary).","example":"100_base"},"payment_details_answers":{"description":"Answers to the region's payment-details form. Provide one entry per field in `payment_details_form.form_fields` from GET /eor/regional-configs (use each field's `id` as `form_field_id`); required fields must be answered.","type":"array","items":{"$ref":"#/components/schemas/FormAnswerDto"}},"employee_details_answers":{"description":"Answers to the region's employee-details form — one entry per field in `employee_details_form.form_fields` from GET /eor/regional-configs.","type":"array","items":{"$ref":"#/components/schemas/FormAnswerDto"}},"compensation_benefit_details_answers":{"description":"Answers to the region's compensation/benefit-details form — one entry per field in `compensation_benefit_details_form.form_fields` from GET /eor/regional-configs.","type":"array","items":{"$ref":"#/components/schemas/FormAnswerDto"}},"employee_identifier":{"type":"string","description":"Optional external identifier for the employee, unique within your company."},"visa_number":{"type":"string","description":"Optional existing visa number for the employee."},"integration":{"description":"Optional link to a worker in an external HR/integration system.","allOf":[{"$ref":"#/components/schemas/IntegrationDto"}]},"attributes":{"description":"Optional custom contract attributes configured for your company.","type":"array","items":{"type":"object"}},"insurance":{"type":"boolean","description":"Whether to include healthcare insurance. Must be true when the region's config has `is_healthcare_required`.","example":false},"insurance_provider_id":{"type":"number","description":"Required when `insurance` is true. One of the `insurance_providers[].id` values from GET /eor/regional-configs.","example":3},"insurance_provider_tier_id":{"type":"number","description":"A tier `id` belonging to the chosen `insurance_provider_id` (`insurance_providers[].tiers[].id`).","example":5}},"required":["job_title","job_description","qualification","employment_type","employment_term","start_date","amount","currency_id","employee_first_name","employee_last_name","employee_email","employee_country_id","employee_nationality_country_id","working_from_country_id","work_visa","trial_period","annual_leave_days","allowances","insurance"]},"TerminationRequestDocumentDto":{"type":"object","properties":{"name":{"type":"string","example":"resignation-letter.pdf"},"url":{"type":"string","description":"Temporary signed download URL."}},"required":["name","url"]},"TerminationActionedByDto":{"type":"object","properties":{"id":{"type":"number","description":"Internal id of the user who actioned the request.","example":42},"name":{"type":"string","description":"Display name of the user who actioned the request.","example":"John Smith"}},"required":["id","name"]},"TerminationRequestResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Internal id of the termination request.","example":123},"contract_id":{"type":"number","description":"Internal id of the contract being terminated.","example":10206},"termination_type":{"type":"string","description":"The kind of termination requested.","example":"employer termination"},"status":{"type":"string","enum":["Pending","Approved","Declined","Cancelled"],"description":"Current status of the termination request.","example":"Pending"},"tentative_last_day":{"type":"string","nullable":true,"description":"Tentative last working day, if set.","example":"2026-09-01"},"termination_date":{"type":"string","nullable":true,"description":"Confirmed termination (last working) date once approved.","example":"2026-09-01"},"time_off_balance":{"type":"number","nullable":true,"description":"The employee's remaining paid time-off balance, in days.","example":12.5},"equipment_return_required":{"type":"boolean","description":"Whether company equipment must be returned on termination.","example":true},"final_commission_bonus":{"type":"number","nullable":true,"description":"Final commission or bonus to be paid out, in the contract currency.","example":1500},"notice_period":{"type":"string","nullable":true,"description":"Notice period code (resignations only).","example":"yes_full_notice"},"notice_period_label":{"type":"string","nullable":true,"description":"Human-readable label for `notice_period`.","example":"Yes, full notice"},"termination_reason":{"type":"string","nullable":true,"description":"Reason code for an employer termination.","example":"performance"},"termination_reason_other":{"type":"string","nullable":true,"description":"Free-text reason supplied when `termination_reason` is \"other\"."},"context_description":{"type":"string","nullable":true,"description":"Additional context for the termination (employer termination, mutual agreement, and non-renewal)."},"supporting_documents":{"nullable":true,"description":"Supporting documents attached to the request.","type":"array","items":{"$ref":"#/components/schemas/TerminationRequestDocumentDto"}},"actioned_by":{"nullable":true,"description":"The user who approved or declined the request; null while pending.","allOf":[{"$ref":"#/components/schemas/TerminationActionedByDto"}]},"termination_note":{"type":"string","nullable":true,"description":"Note recorded by the approver when the request is approved."},"note":{"type":"string","nullable":true,"description":"The requester's note submitted with an employer termination."},"rejection_note":{"type":"string","nullable":true,"description":"Reason recorded by the approver when the request is declined."},"created_at":{"type":"string","description":"Creation timestamp (ISO 8601 date-time)."},"updated_at":{"type":"string","description":"Last-updated timestamp (ISO 8601 date-time)."}},"required":["id","contract_id","termination_type","status","tentative_last_day","termination_date","time_off_balance","equipment_return_required","final_commission_bonus","notice_period","notice_period_label","termination_reason","termination_reason_other","context_description","supporting_documents","actioned_by","termination_note","note","rejection_note","created_at","updated_at"]},"CreateTerminationRequestDto":{"type":"object","properties":{"termination_type":{"type":"string","enum":["employee resignation","employer termination","mutual termination agreement","non renewal"],"description":"The kind of termination being requested.","example":"employer termination"},"tentative_last_day":{"type":"string","description":"Tentative last working day (must be in the future).","example":"2026-09-01"},"time_off_balance":{"type":"number","minimum":0,"maximum":999999.99,"description":"The employee's remaining paid time-off balance, in days.","example":12.5},"equipment_return_required":{"type":"boolean","description":"Whether company equipment must be returned on termination.","example":true},"final_commission_bonus":{"type":"number","minimum":0,"maximum":999999999999.99,"description":"Optional final commission or bonus to be paid out, in the contract currency.","example":1500},"notice_period":{"type":"string","enum":["yes_full_notice","partial_notice","no_notice","unsure"],"description":"Required when termination_type is \"employee resignation\".","example":"yes_full_notice"},"termination_reason":{"type":"string","enum":["during_probation","performance","serious_misconduct","breach","other"],"description":"Required when termination_type is \"employer termination\".","example":"performance"},"termination_reason_other":{"type":"string","minLength":2,"description":"Required when termination_reason is \"other\"."},"context_description":{"type":"string","minLength":2,"description":"Required for employer termination, mutual agreement, and non-renewal."},"note":{"type":"string","minLength":2,"description":"Required when termination_type is \"employer termination\"."},"supporting_documents":{"description":"Up to 5 storage paths of pre-uploaded supporting documents.","type":"array","items":{"type":"string"}}},"required":["termination_type","tentative_last_day","time_off_balance","equipment_return_required"]}}}}