github.com/grokify/go-ringcentral-client@v0.3.31/codegen/specs-engagedigital_v3.0.0/openapi-spec_time-sheets.json (about) 1 { 2 "openapi":"3.0.0", 3 "info":{ 4 "description":"", 5 "version":"1.0", 6 "title":"Engage Digital API", 7 "termsOfService":"https://developer.ringcentral.com" 8 }, 9 "tags":[ 10 { 11 "name":"Time Sheets" 12 } 13 ], 14 "paths":{ 15 "/time_sheets":{ 16 "get":{ 17 "tags":[ 18 "Time Sheets" 19 ], 20 "summary":"Getting all time sheets", 21 "operationId":"getAllTimeSheets", 22 "description":"This method renders time sheets ordered by active and label.", 23 "parameters":[ 24 { 25 "name":"offset", 26 "in":"query", 27 "description":"The record index to start. Default value is 0.", 28 "required":false, 29 "schema":{ 30 "type":"integer", 31 "format":"int32" 32 } 33 }, 34 { 35 "name":"limit", 36 "in":"query", 37 "description":"The max number of records to return. Default value is 30, max value is 150.", 38 "required":false, 39 "schema":{ 40 "type":"integer", 41 "format":"int32" 42 } 43 } 44 ], 45 "responses":{ 46 "200":{ 47 "description":"Success", 48 "content":{ 49 "application/json":{ 50 "schema":{ 51 "$ref":"#/components/schemas/GetAllTimeSheetsResponse" 52 } 53 } 54 } 55 } 56 } 57 }, 58 "post":{ 59 "tags":[ 60 "Time Sheets" 61 ], 62 "summary":"Creating a time sheet", 63 "operationId":"createTimeSheet", 64 "description":"This method creates a time sheet. In case of success it renders the time sheet, otherwise, it renders an error (422 HTTP code).\n\nAuthorization: only users that can create time sheet.", 65 "parameters":[ 66 { 67 "name":"active", 68 "in":"query", 69 "required":false, 70 "description":"true or false, this field is used to enable/disable a time sheet.", 71 "schema":{ 72 "type":"boolean" 73 } 74 }, 75 { 76 "name":"label", 77 "in":"query", 78 "required":true, 79 "description":"The label of the time sheet.", 80 "schema":{ 81 "type":"string" 82 } 83 }, 84 { 85 "name":"source_ids", 86 "in":"query", 87 "required":false, 88 "description":"An array containing id of each source using your time sheet.", 89 "schema":{ 90 "type":"array", 91 "items":{ 92 "type":"string" 93 } 94 } 95 }, 96 { 97 "name":"holidays_region", 98 "in":"query", 99 "required":false, 100 "description":"A string containing the first two letters of your country (example: \"fr\"/\"en\"/\"es\"), useful to bootstrap default holidays following to a country.", 101 "schema":{ 102 "type":"string", 103 "enum":[ 104 "de", 105 "es", 106 "fr", 107 "gb", 108 "it", 109 "nl", 110 "us" 111 ] 112 } 113 }, 114 { 115 "name":"holidays", 116 "in":"query", 117 "required":false, 118 "description":"An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale).", 119 "schema":{ 120 "type":"string" 121 } 122 }, 123 { 124 "name":"monday_hours", 125 "in":"query", 126 "required":false, 127 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day", 128 "schema":{ 129 "type":"string" 130 } 131 }, 132 { 133 "name":"tuesday_hours", 134 "in":"query", 135 "required":false, 136 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 137 "schema":{ 138 "type":"string" 139 } 140 }, 141 { 142 "name":"wednesday_hours", 143 "in":"query", 144 "required":false, 145 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 146 "schema":{ 147 "type":"string" 148 } 149 }, 150 { 151 "name":"thursday_hours", 152 "in":"query", 153 "required":false, 154 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 155 "schema":{ 156 "type":"string" 157 } 158 }, 159 { 160 "name":"friday_hours", 161 "in":"query", 162 "required":false, 163 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 164 "schema":{ 165 "type":"string" 166 } 167 }, 168 { 169 "name":"saturday_hours", 170 "in":"query", 171 "required":false, 172 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 173 "schema":{ 174 "type":"string" 175 } 176 }, 177 { 178 "name":"sunday_hours", 179 "in":"query", 180 "required":false, 181 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 182 "schema":{ 183 "type":"string" 184 } 185 } 186 ], 187 "responses":{ 188 "200":{ 189 "description":"Success", 190 "content":{ 191 "application/json":{ 192 "schema":{ 193 "$ref":"#/components/schemas/TimeSheet" 194 } 195 } 196 } 197 } 198 } 199 } 200 }, 201 "/time_sheets/{timeSheetId}":{ 202 "get":{ 203 "tags":[ 204 "Time Sheets" 205 ], 206 "summary":"Getting a time sheet from its id", 207 "operationId":"getTimeSheet", 208 "description":"This method renders a time sheet from given id.\n\nAuthorization: only users that can see time sheets in administration section.", 209 "parameters":[ 210 { 211 "name":"timeSheetId", 212 "in":"path", 213 "required":true, 214 "schema":{ 215 "type":"string" 216 } 217 } 218 ], 219 "responses":{ 220 "200":{ 221 "description":"Success", 222 "content":{ 223 "application/json":{ 224 "schema":{ 225 "$ref":"#/components/schemas/TimeSheet" 226 } 227 } 228 } 229 } 230 } 231 }, 232 "put":{ 233 "tags":[ 234 "Time Sheets" 235 ], 236 "summary":"Updating a time sheet", 237 "operationId":"updateTimeSheet", 238 "description":"This method updates an existing team from given attributes and renders it in case of success.", 239 "parameters":[ 240 { 241 "name":"timeSheetId", 242 "in":"path", 243 "required":true, 244 "schema":{ 245 "type":"string" 246 } 247 }, 248 { 249 "name":"active", 250 "in":"query", 251 "required":false, 252 "description":"true or false, this field is used to enable/disable a time sheet.", 253 "schema":{ 254 "type":"boolean" 255 } 256 }, 257 { 258 "name":"label", 259 "in":"query", 260 "required":false, 261 "description":"The label of the time sheet.", 262 "schema":{ 263 "type":"string" 264 } 265 }, 266 { 267 "name":"source_ids[]", 268 "in":"query", 269 "required":false, 270 "description":"An array containing id of each source using your time sheet.", 271 "schema":{ 272 "type":"array", 273 "items":{ 274 "type":"string" 275 } 276 } 277 }, 278 { 279 "name":"holidays", 280 "in":"query", 281 "required":false, 282 "description":"An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale).", 283 "schema":{ 284 "type":"string" 285 } 286 }, 287 { 288 "name":"monday_hours", 289 "in":"query", 290 "required":false, 291 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day", 292 "schema":{ 293 "type":"string" 294 } 295 }, 296 { 297 "name":"tuesday_hours", 298 "in":"query", 299 "required":false, 300 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 301 "schema":{ 302 "type":"string" 303 } 304 }, 305 { 306 "name":"wednesday_hours", 307 "in":"query", 308 "required":false, 309 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 310 "schema":{ 311 "type":"string" 312 } 313 }, 314 { 315 "name":"thursday_hours", 316 "in":"query", 317 "required":false, 318 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 319 "schema":{ 320 "type":"string" 321 } 322 }, 323 { 324 "name":"friday_hours", 325 "in":"query", 326 "required":false, 327 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 328 "schema":{ 329 "type":"string" 330 } 331 }, 332 { 333 "name":"saturday_hours", 334 "in":"query", 335 "required":false, 336 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 337 "schema":{ 338 "type":"string" 339 } 340 }, 341 { 342 "name":"sunday_hours", 343 "in":"query", 344 "required":false, 345 "description":"this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format.", 346 "schema":{ 347 "type":"string" 348 } 349 } 350 ], 351 "responses":{ 352 "200":{ 353 "description":"Success", 354 "content":{ 355 "application/json":{ 356 "schema":{ 357 "$ref":"#/components/schemas/TimeSheet" 358 } 359 } 360 } 361 } 362 } 363 }, 364 "delete":{ 365 "tags":[ 366 "Time Sheets" 367 ], 368 "summary":"Deleting a time sheet", 369 "operationId":"deleteTimeSheet", 370 "description":"This method destroys an existing time sheet. It renders time sheet itself. It renders a 404 if id is invalid.", 371 "parameters":[ 372 { 373 "name":"timeSheetId", 374 "in":"path", 375 "required":true, 376 "schema":{ 377 "type":"string" 378 } 379 } 380 ], 381 "responses":{ 382 "200":{ 383 "description":"Success", 384 "content":{ 385 "application/json":{ 386 "schema":{ 387 "$ref":"#/components/schemas/TimeSheet" 388 } 389 } 390 } 391 } 392 } 393 } 394 } 395 }, 396 "servers":[ 397 { 398 "url":"https://DOMAIN.api.engagement.dimelo.com/1.0" 399 } 400 ], 401 "components":{ 402 "schemas":{ 403 "GetAllTimeSheetsResponse":{ 404 "properties":{ 405 "count":{ 406 "type":"integer", 407 "format":"int32" 408 }, 409 "limit":{ 410 "type":"integer", 411 "format":"int32" 412 }, 413 "offset":{ 414 "type":"integer", 415 "format":"int32" 416 }, 417 "records":{ 418 "type":"array", 419 "items":{ 420 "$ref":"#/components/schemas/TimeSheet" 421 } 422 } 423 } 424 }, 425 "TimeSheet":{ 426 "required":[ 427 "id" 428 ], 429 "properties":{ 430 "id":{ 431 "type":"string" 432 }, 433 "created_at":{ 434 "type":"string", 435 "format":"date-time" 436 }, 437 "updated_at":{ 438 "type":"string", 439 "format":"date-time" 440 }, 441 "active":{ 442 "type":"boolean" 443 }, 444 "label":{ 445 "type":"string" 446 }, 447 "source_ids":{ 448 "type":"array", 449 "items":{ 450 "type":"string" 451 } 452 }, 453 "timezone":{ 454 "type":"string" 455 }, 456 "sunday_hours":{ 457 "type":"string" 458 }, 459 "monday_hours":{ 460 "type":"string" 461 }, 462 "tuesday_hours":{ 463 "type":"string" 464 }, 465 "wednesday_hours":{ 466 "type":"string" 467 }, 468 "thursday_hours":{ 469 "type":"string" 470 }, 471 "friday_hours":{ 472 "type":"string" 473 }, 474 "saturday_hours":{ 475 "type":"string" 476 }, 477 "holidays[]":{ 478 "type":"array", 479 "items":{ 480 "$ref":"#/components/schemas/TimeSheetHoliday" 481 } 482 } 483 } 484 }, 485 "TimeSheetHoliday":{ 486 "properties":{ 487 "name":{ 488 "type":"string" 489 }, 490 "date":{ 491 "type":"string" 492 } 493 } 494 } 495 } 496 } 497 }