-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathxero-payroll-au-v2.yaml
More file actions
927 lines (927 loc) · 31 KB
/
xero-payroll-au-v2.yaml
File metadata and controls
927 lines (927 loc) · 31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
openapi: 3.0.0
info:
version: 12.0.2
title: Xero Payroll AU API 2.0
description: This is the Xero Payroll API 2.0 for orgs in Australia region.
termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
name: Xero Platform Team
email: api@xero.com
url: https://developer.xero.com
license:
name: MIT
url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Payroll AU API 2.0
url: https://api.xero.com/payroll.xro/2.0
tags:
- name: PayrollAuV2
description: Operations available to regular developers
paths:
/Timesheets:
parameters:
- $ref: "#/components/parameters/requiredHeader"
get:
security:
- OAuth2:
- payroll.timesheets
- payroll.timesheets.read
tags:
- PayrollAuV2
operationId: getTimesheets
x-hasPayrollUkProblem: true
summary: Retrieves timesheets
parameters:
- in: query
name: page
description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
schema:
type: integer
example: 5
- in: query
name: filter
description: Filter by employeeId and/or payrollCalendarId
schema:
type: string
example: employeeId==00000000-0000-0000-0000-000000000000,payrollCalendarId==00000000-0000-0000-0000-000000000000
- in: query
name: status
description: filter results by any timesheets with a matching timesheet status
schema:
type: string
example: Draft
- in: query
name: startDate
x-snake: start_date
description: filter results by any timesheets with a startDate on or after the provided date
schema:
type: string
example: "2019-01-02"
- in: query
name: endDate
x-snake: end_date
description: filter results by any timesheets with a endDate on or before the provided date
schema:
type: string
example: "2020-01-02"
- in: query
name: sort
description: sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
schema:
type: string
example: startDate
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/Timesheets"
example:
id: d81c2087-3ecb-4d91-b775-73d85f593370
providerName: provider-name
dateTimeUTC: 2020-04-13T21:54:01.8865016
httpStatusCode: OK
pagination:
page: 1
pageSize: 100
pageCount: 1
itemCount: 1
problem: null
timesheets:
- timesheetID: 0c94d453-3d8c-4167-8c25-b4025121d18b
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: 2020-04-13T00:00:00
endDate: 2020-04-19T00:00:00
status: Approved
totalHours: 16
updatedDateUTC: 2020-04-13T21:53:39
post:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: createTimesheet
x-hasPayrollUkProblem: true
x-example:
- startDateValue:
key: startDate
keyPascal: StartDate
keySnake: start_date
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
default: LocalDate.of(2020, Month.OCTOBER, 28)
java: LocalDate.of(2020, Month.OCTOBER, 28)
csharp: new DateTime(2020, 10, 10)
php: new DateTime('2020-10-28')
node: "'2020-10-28'"
python: dateutil.parser.parse('2020-10-28T00:00:00Z')
ruby: "'YYYY-MM-DD'"
- endDateValue:
key: endDate
keyPascal: EndDate
keySnake: end_date
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
default: LocalDate.of(2020, Month.OCTOBER, 30)
java: LocalDate.of(2020, Month.OCTOBER, 30)
csharp: new DateTime(2020, 10, 12)
php: new DateTime('2020-10-30')
node: "'2020-10-30'"
python: dateutil.parser.parse('2020-10-30T00:00:00Z')
ruby: "'YYYY-MM-DD'"
- timesheet:
key: timesheet
keyPascal: Timesheet
keySnake: timesheet
is_object: true
- payrollCalendarID:
key: payrollCalendarID
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheet
- employeeID:
key: employeeID
keyPascal: EmployeeID
keySnake: employee_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheet
- startDate:
is_variable: true
nonString: true
key: startDate
keyPascal: StartDate
keySnake: start_date
default: startDate
python: start_date
ruby: start_date
object: timesheet
- endDate:
is_last: true
is_variable: true
nonString: true
key: endDate
keyPascal: EndDate
keySnake: end_date
default: endDate
python: end_date
ruby: end_date
object: timesheet
summary: Creates a new timesheet
parameters:
- $ref: "#/components/parameters/idempotencyKey"
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetObject"
example:
id: ef0aa7e2-6f7f-43f6-9186-af670dce7c69
providerName: provider-name
dateTimeUTC: 2020-04-21T03:07:37.0148822
httpStatusCode: OK
pagination: null
problem: null
timesheet:
timesheetID: 88d2038a-06f7-4b8a-bdab-809804c0aa1d
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: 2020-04-13T00:00:00
endDate: 2020-04-19T00:00:00
status: Draft
totalHours: 14
updatedDateUTC: 2020-04-21T03:07:36.8132834
timesheetLines:
- timesheetLineID: 03060d0c-b14a-4339-aced-51cb2e5313b7
date: 2020-04-15T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 6
- timesheetLineID: 53ebdb54-b604-4d15-8c42-5162a7fe88e6
date: 2020-04-13T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 8
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Timesheet"
example:
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: "2020-04-13"
endDate: "2020-04-19"
timesheetLines:
- date: "2020-04-13"
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
numberOfUnits: 8
- date: "2020-04-15"
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
numberOfUnits: 6
/Timesheets/{TimesheetID}:
parameters:
- $ref: "#/components/parameters/requiredHeader"
get:
security:
- OAuth2:
- payroll.timesheets
- payroll.timesheets.read
tags:
- PayrollAuV2
operationId: getTimesheet
x-hasPayrollUkProblem: true
summary: Retrieve a specific timesheet by using a unique timesheet ID
parameters:
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetObject"
example:
id: 504259ac-df26-482e-bd0a-d792d96453bb
providerName: provider-name
dateTimeUTC: 2020-04-14T16:41:00.5013526
httpStatusCode: OK
pagination: null
problem: null
timesheet:
timesheetID: 25c59963-5df2-43c3-88f6-25a3caa63084
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: 2020-04-13T00:00:00
endDate: 2020-04-19T00:00:00
status: Draft
totalHours: 14
updatedDateUTC: 2020-04-14T16:31:35
timesheetLines:
- timesheetLineID: 6cc1e5c3-f080-4dbc-a82b-bea256ef939f
date: 2020-04-13T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 8
- timesheetLineID: 3d900df1-9859-492b-9b00-155860158c0d
date: 2020-04-15T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 6
delete:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: deleteTimesheet
summary: Deletes a specific timesheet
parameters:
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLine"
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
/Timesheets/{TimesheetID}/Lines:
parameters:
- $ref: "#/components/parameters/requiredHeader"
post:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: createTimesheetLine
x-hasPayrollUkProblem: true
x-example:
- dateValue:
key: date
keyPascal: Date
keySnake: date
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
default: LocalDate.of(2020, Month.OCTOBER, 28)
java: LocalDate.of(2020, Month.OCTOBER, 28)
csharp: new DateTime(2020, 10, 10)
php: new DateTime('2020-10-28')
node: "'2020-10-28'"
python: dateutil.parser.parse('2020-10-28T00:00:00Z')
ruby: "'YYYY-MM-DD'"
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
keySnake: timesheet_line
is_object: true
- timesheetLineID:
key: timesheetLineID
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
keyPascal: Date
keySnake: date
default: date
python: date
ruby: date
is_variable: true
nonString: true
object: timesheetLine
- earningsRateID:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 6
object: timesheetLine
nonString: true
is_last: true
summary: Creates a new timesheet line for a specific timesheet using a unique timesheet ID
parameters:
- $ref: "#/components/parameters/idempotencyKey"
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLineObject"
example:
id: cf701261-529e-47cd-8156-5ec9ab3394ff
providerName: provider-name
dateTimeUTC: 2020-04-14T17:19:22.8599292
httpStatusCode: OK
pagination: null
problem: null
timesheetLine:
timesheetLineID: 56fce87e-7f0d-4c19-8f74-7f5656651c81
date: 2020-04-14T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 1
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLine"
example:
date: "2020-04-14"
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
numberOfUnits: 1
/Timesheets/{TimesheetID}/Approve:
parameters:
- $ref: "#/components/parameters/requiredHeader"
post:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: approveTimesheet
x-hasPayrollUkProblem: true
summary: Approves a specific timesheet
parameters:
- $ref: "#/components/parameters/idempotencyKey"
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetObject"
example:
id: 94c27148-2749-4d85-bc1a-986e6de230ae
providerName: provider-name
dateTimeUTC: 2020-06-01T20:32:19.7577043
httpStatusCode: OK
pagination: null
problem: null
timesheet:
timesheetID: 62bd8b5f-8e90-4868-a0e6-62f994f7d659
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: 2020-04-13T00:00:00
endDate: 2020-04-19T00:00:00
status: Approved
totalHours: 9
updatedDateUTC: 2020-06-01T20:32:19.9534744
timesheetLines:
- timesheetLineID: ce6db38f-efe9-49dc-ae42-7e6bad3cb167
date: 2020-04-14T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 2
- timesheetLineID: bc8004d2-5965-4f4e-8e46-0519040b4a05
date: 2020-04-15T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 6
- timesheetLineID: fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a
date: 2020-04-14T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 1
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
/Timesheets/{TimesheetID}/RevertToDraft:
parameters:
- $ref: "#/components/parameters/requiredHeader"
post:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: revertTimesheet
x-hasPayrollUkProblem: true
summary: Reverts a specific timesheet to draft
parameters:
- $ref: "#/components/parameters/idempotencyKey"
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetObject"
example:
id: a774530a-a50c-4480-a094-358cf80a7d98
providerName: provider-name
dateTimeUTC: 2020-04-14T17:49:23.1119111
httpStatusCode: OK
pagination: null
problem: null
timesheet:
timesheetID: 0fd483c0-3302-48c6-bbd5-7247c9a02460
payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
startDate: 2020-04-13T00:00:00
endDate: 2020-04-19T00:00:00
status: Draft
totalHours: 15
updatedDateUTC: 2020-04-14T17:49:23.2188538
timesheetLines:
- timesheetLineID: 17a08549-1ed1-416b-83e2-c65040119a02
date: 2020-04-13T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 8
- timesheetLineID: 0e912b7d-dc3f-4b95-a466-3f0f5c8581cb
date: 2020-04-15T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 6
- timesheetLineID: d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a
date: 2020-04-14T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 1
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}:
parameters:
- $ref: "#/components/parameters/requiredHeader"
put:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: updateTimesheetLine
x-hasPayrollUkProblem: true
x-example:
- dateValue:
key: date
keyPascal: Date
keySnake: date
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
default: LocalDate.of(2020, Month.OCTOBER, 28)
java: LocalDate.of(2020, Month.OCTOBER, 28)
csharp: new DateTime(2020, 10, 10)
php: new DateTime('2020-10-28')
node: "'2020-10-28'"
python: dateutil.parser.parse('2020-10-28T00:00:00Z')
ruby: "'YYYY-MM-DD'"
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
keySnake: timesheet_line
is_object: true
- timesheetLineID:
key: timesheetLineID
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
keyPascal: Date
keySnake: date
default: date
python: date
ruby: date
is_variable: true
nonString: true
object: timesheetLine
- earningsRateID:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 6
object: timesheetLine
nonString: true
is_last: true
summary: Updates a specific timesheet line for a specific timesheet
parameters:
- $ref: "#/components/parameters/idempotencyKey"
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
- in: path
name: TimesheetLineID
x-snake: timesheet_line_id
required: true
description: Identifier for the timesheet line
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLineObject"
example:
id: 582b87a6-14f3-409b-be89-f9b9c49db983
providerName: provider-name
dateTimeUTC: 2020-04-14T18:07:30.718153
httpStatusCode: OK
pagination: null
problem: null
timesheetLine:
timesheetLineID: c88edcad-af32-4536-a682-9a4772c21c8d
date: 2020-04-14T00:00:00
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
trackingItemID: null
numberOfUnits: 2
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLine"
example:
date: "2020-04-14"
earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
numberOfUnits: 2
delete:
security:
- OAuth2:
- payroll.timesheets
tags:
- PayrollAuV2
operationId: deleteTimesheetLine
summary: Deletes a specific timesheet line
parameters:
- in: path
name: TimesheetID
x-snake: timesheet_id
required: true
description: Identifier for the timesheet
schema:
type: string
format: uuid
- in: path
name: TimesheetLineID
x-snake: timesheet_line_id
required: true
description: Identifier for the timesheet line
schema:
type: string
format: uuid
responses:
"200":
description: search results matching criteria
content:
application/json:
schema:
$ref: "#/components/schemas/TimesheetLine"
"400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information visit https://developer.xero.com/documentation/oauth2/overview
flows:
authorizationCode:
authorizationUrl: https://login.xero.com/identity/connect/authorize
tokenUrl: https://identity.xero.com/connect/token
scopes:
payroll.timesheets: Grant read-write access to payroll timesheets
payroll.timesheets.read: Grant read-only access to payroll timesheets
parameters:
requiredHeader:
in: header
name: Xero-Tenant-Id
x-snake: xero_tenant_id
description: Xero identifier for Tenant
schema:
type: string
required: true
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
example: KEY_VALUE
schema:
type: string
schemas:
Pagination:
properties:
page:
type: integer
example: 1
pageSize:
type: integer
example: 10
pageCount:
type: integer
example: 1
itemCount:
type: integer
example: 2
Problem:
description: The object returned for a bad request
type: object
properties:
type:
description: The type of error format
type: string
example: application/problem+json
title:
description: The type of the error
type: string
example: BadRequest
status:
description: The error status code
type: string
example: 400
detail:
description: A description of the error
type: string
example: Validation error occurred.
instance:
type: string
invalidFields:
type: array
items:
$ref: "#/components/schemas/InvalidField"
InvalidField:
type: object
properties:
name:
description: The name of the field that caused the error
type: string
example: DateOfBirth
reason:
description: The reason the error occurred
type: string
example: The Date of Birth is required.
Timesheets:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
problem:
$ref: "#/components/schemas/Problem"
timesheets:
type: array
items:
$ref: "#/components/schemas/Timesheet"
TimesheetObject:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
problem:
$ref: "#/components/schemas/Problem"
timesheet:
$ref: "#/components/schemas/Timesheet"
Timesheet:
type: object
required:
- payrollCalendarID
- employeeID
- startDate
- endDate
properties:
timesheetID:
description: The Xero identifier for a Timesheet
type: string
format: uuid
payrollCalendarID:
description: The Xero identifier for the Payroll Calendar that the Timesheet applies to
type: string
format: uuid
employeeID:
description: The Xero identifier for the Employee that the Timesheet is for
type: string
format: uuid
startDate:
description: The Start Date of the Timesheet period (YYYY-MM-DD)
type: string
format: date
x-is-date: true
endDate:
description: The End Date of the Timesheet period (YYYY-MM-DD)
type: string
format: date
x-is-date: true
status:
description: Status of the timesheet
type: string
enum:
- Draft
- Approved
- Completed
totalHours:
description: The Total Hours of the Timesheet
type: number
format: double
updatedDateUTC:
description: The UTC date time that the Timesheet was last updated
type: string
format: date-time
x-is-datetime: true
timesheetLines:
$ref: "#/components/schemas/TimesheetLines"
TimesheetLines:
type: array
items:
$ref: "#/components/schemas/TimesheetLine"
TimesheetLineObject:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
problem:
$ref: "#/components/schemas/Problem"
timesheetLine:
$ref: "#/components/schemas/TimesheetLine"
TimesheetLine:
type: object
required:
- date
- earningsRateID
- numberOfUnits
properties:
timesheetLineID:
description: The Xero identifier for a Timesheet Line
type: string
format: uuid
date:
description: The Date that this Timesheet Line is for (YYYY-MM-DD)
type: string
format: date
x-is-date: true
earningsRateID:
description: The Xero identifier for the Earnings Rate that the Timesheet is for
type: string
format: uuid
trackingItemID:
description: The Xero identifier for the Tracking Item that the Timesheet is for
type: string
format: uuid
numberOfUnits:
description: The Number of Units of the Timesheet Line
type: number
format: double