time off create

POST {{baseUrl}}/time-off

Creates a TimeOff object with the given values.

Request Params

KeyDatatypeRequiredDescription
is_debug_modebooleanWhether to include debug fields (such as log file links) in the response.
run_asyncbooleanWhether or not third-party updates should be run asynchronously.

Request Body

[{"name"=>"remote_id", "value"=>"19202938", "datatype"=>"number"}, {"name"=>"employee", "value"=>"d2f972d0-2526-434b-9409-4c3b468e08f0", "datatype"=>"string"}, {"name"=>"approver", "value"=>"9efbc633-3387-4306-aa55-e2c635e6bb4f", "datatype"=>"string"}, {"name"=>"status", "value"=>"DELETED", "datatype"=>"string"}, {"name"=>"employee_note", "value"=>"Moving into the new apartment Kendall Roy gave me!", "datatype"=>"string"}, {"name"=>"units", "value"=>"HOURS", "datatype"=>"string"}, {"name"=>"amount", "value"=>"3", "datatype"=>"number"}, {"name"=>"request_type", "value"=>"BEREAVEMENT", "datatype"=>"string"}, {"name"=>"start_time", "value"=>"2020-11-10T00:00:00Z", "datatype"=>"string"}, {"name"=>"end_time", "value"=>"2020-11-17T00:00:00Z", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
X-Account-Tokenstring(Required) Token identifying the end user.
Content-Typestring
Acceptstring

RESPONSES

status: Created

{"errors":[{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"veniam sed"}},{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"aute proident sed"}}],"model":{"id":"91b2b905-e866-40c8-8be2-efe53827a0aa","remote_id":"19202938","employee":"d2f972d0-2526-434b-9409-4c3b468e08f0","approver":"9efbc633-3387-4306-aa55-e2c635e6bb4f","status":"REQUESTED","employee_note":"Moving into the new apartment Kendall Roy gave me!","units":"DAYS","amount":3,"request_type":"BEREAVEMENT","start_time":"2020-11-10T00:00:00Z","end_time":"2020-11-17T00:00:00Z","remote_data":[{"path":"veniam dolore occaecat","data":{"est_53d":{}}},{"path":"officia in quis elit","data":{"aliqua6":{},"veniam4f9":{},"irure_77":{}}}],"remote_was_deleted":false},"warnings":[{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"est non magna"}},{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"elit occaecat aliqua"}}],"logs":[{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}},{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}}]}