Skip to content

Commit c56ea32

Browse files
authored
Merge pull request #13 from gigapay/amir/employee_invitation_code_field
feat: added documentation for employee invitation_code field
2 parents 5c71c67 + af7c0ff commit c56ea32

File tree

3 files changed

+44
-24
lines changed

3 files changed

+44
-24
lines changed

source/includes/_employees.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ and working permits.
1919
"created_at": "2019-05-22T10:32:36.118753Z",
2020
"notified_at": "2019-05-22T10:32:37.846274Z",
2121
"claimed_at": "2019-05-23T11:56:41.123721Z",
22-
"verified_at": "2019-05-23T11:57:03.742345Z"
22+
"verified_at": "2019-05-23T11:57:03.742345Z",
23+
"invitation_code": null
2324
}
2425
```
2526

@@ -35,6 +36,7 @@ and working permits.
3536
| `notified_at` | Time at which the Employee was notified. Displayed as ISO 8601 string. |
3637
| `claimed_at` | Time at which the Employee consumed the magic link. Displayed as ISO 8601 string. |
3738
| `verified_at` | Time when the Employee was verified. Displayed as ISO 8601 string. |
39+
| `invitation_code` | 8-digit alphanumeric uppercase code available when an employee is invited but not yet claimed. Users can use this code to create a magic link to claim the employee. |
3840

3941

4042

@@ -84,7 +86,8 @@ fetch("https://api.gigapay.se/v2/employees/", {
8486
"created_at": "2019-05-22T10:32:36.118753Z",
8587
"notified_at": "2019-05-22T10:32:37.846274Z",
8688
"claimed_at": "2019-05-23T11:56:41.123721Z",
87-
"verified_at": "2019-05-23T11:57:03.742345Z"
89+
"verified_at": "2019-05-23T11:57:03.742345Z",
90+
"invitation_code": null
8891
}, {
8992
"id": "1848",
9093
"name": "Joakim Olovsson",
@@ -94,8 +97,9 @@ fetch("https://api.gigapay.se/v2/employees/", {
9497
"metadata": {},
9598
"created_at": "2019-05-23T14:45:12.545271Z",
9699
"notified_at": "2019-05-23T14:45:13.374627Z",
97-
"claimed_at": "2019-05-23T14:45:37.282819Z",
98-
"verified_at": "2019-05-24T09:47:02.918264Z"
100+
"claimed_at": null,
101+
"verified_at": null,
102+
"invitation_code": "A1B2C3D4"
99103
}
100104
]
101105
}
@@ -181,11 +185,12 @@ fetch("https://api.gigapay.se/v2/employees/", {
181185
"created_at": "2019-05-22T10:32:36.118753Z",
182186
"notified_at": null,
183187
"claimed_at": null,
184-
"verified_at": null
188+
"verified_at": null,
189+
"invitation_code": "A1B2C3D4"
185190
}
186191
```
187192

188-
This endpoint registers an Employee.
193+
This endpoint registers an Employee. The Employee will be notified with the `invitation_code` that can be used to sign up in Gigapay and accept your invitation.
189194

190195
### HTTP Request
191196

@@ -250,7 +255,8 @@ fetch("https://api.gigapay.se/v2/employees/1847/", {
250255
"created_at": "2019-05-22T10:32:36.118753Z",
251256
"notified_at": "2019-05-22T10:32:37.846274Z",
252257
"claimed_at": "2019-05-23T11:56:41.123721Z",
253-
"verified_at": "2019-05-23T11:57:03.742345Z"
258+
"verified_at": "2019-05-23T11:57:03.742345Z",
259+
"invitation_code": null
254260
}
255261
```
256262

@@ -319,7 +325,8 @@ fetch("https://api.gigapay.se/v2/employees/1847/", {
319325
"created_at": "2019-05-22T10:32:36.118753Z",
320326
"notified_at": "2019-05-22T10:32:37.846274Z",
321327
"claimed_at": "2019-05-23T11:56:41.123721Z",
322-
"verified_at": "2019-05-23T11:57:03.742345Z"
328+
"verified_at": "2019-05-23T11:57:03.742345Z",
329+
"invitation_code": null
323330
}
324331
```
325332

@@ -409,7 +416,8 @@ fetch("https://api.gigapay.se/v2/employees/8472/", {
409416
"created_at": "2019-05-22T10:32:36.118753Z",
410417
"notified_at": null,
411418
"claimed_at": null,
412-
"verified_at": null
419+
"verified_at": null,
420+
"invitation_code": null
413421
}
414422
```
415423

@@ -526,7 +534,7 @@ fetch("https://api.gigapay.se/v2/employees/1847/resend/", {
526534
> The above command returns an empty response.
527535
528536

529-
This endpoint resends an invitation. After resending, you need to wait at least 24 hours before resending again.
537+
This endpoint resends a notification with an invitation code. After resending, you need to wait at least 24 hours before resending again.
530538

531539
### HTTP Request
532540

source/includes/_payouts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ fetch("https://api.gigapay.se/v2/payouts/?expand=employee", {
450450
"created_at": "2019-05-22T10:32:36.118753Z",
451451
"notified_at": null,
452452
"claimed_at": null,
453-
"verified_at": null
453+
"verified_at": null,
454+
"invitation_code": "ABCD1234"
454455
},
455456
"full_salary_specification": true,
456457
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",

source/index.html.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ To change language set the `Accept-Language` header to your preferred language.
185185
"created_at": "2019-05-20T15:33:08.974624Z",
186186
"notified_at": "2019-05-20T15:33:12.581720Z",
187187
"claimed_at": "2019-05-21T09:13:32.575721Z",
188-
"verified_at": "2019-05-21T09:13:48.625263Z"
188+
"verified_at": "2019-05-21T09:13:48.625263Z",
189+
"invitation_code": null
189190
}
190191
```
191192

@@ -221,8 +222,9 @@ Gigapay-Signature: t=1583327301,v1=ad583e2b2093c8d6fb3b65e04b99fc5988e98c0c31290
221222
},
222223
"created_at": "2019-05-20T15:33:08.974624Z",
223224
"notified_at": "2019-05-20T15:33:12.581720Z",
224-
"claimed_at": "2019-05-21T09:13:32.575721Z"
225-
"verified_at": "2019-05-21T09:13:48.625263Z"
225+
"claimed_at": "2019-05-21T09:13:32.575721Z",
226+
"verified_at": "2019-05-21T09:13:48.625263Z",
227+
"invitation_code": null
226228
}
227229
```
228230

@@ -312,7 +314,7 @@ The only valid signature scheme is currently `v1`, which is the HMAC algorithm a
312314

313315
To verify signatures using the v1 scheme, extract the timestamp from the Gigapay-Signature header, and the JSON-encoded
314316
notification from the request body. Join these strings with a period, `.`, as a separator. Compute an HMAC with the
315-
SHA256 hash function using the Webhooks secret key as the key. Lastly ensure that the signature in the header and the
317+
SHA256 hash function using the Webhook's secret key as the key. Lastly ensure that the signature in the header and the
316318
calculated signature matches.
317319

318320
# Errors
@@ -390,7 +392,8 @@ fetch("https://api.gigapay.se/v2/payouts/9472/?expand=employee", {
390392
"created_at": "2019-05-22T10:32:36.118753Z",
391393
"notified_at": null,
392394
"claimed_at": null,
393-
"verified_at": null
395+
"verified_at": null,
396+
"invitation_code": "ABCD1234"
394397
},
395398
"invoice": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
396399
"invoiced_amount": "1000.00",
@@ -460,7 +463,8 @@ fetch("https://api.gigapay.se/v2/employees/?page_size=2&page=2", {
460463
"created_at": "2019-05-20T15:33:08.974624Z",
461464
"notified_at": "2019-05-20T15:33:12.581720Z",
462465
"claimed_at": "2019-05-21T09:13:32.575721Z",
463-
"verified_at": "2019-05-21T09:13:48.625263Z"
466+
"verified_at": "2019-05-21T09:13:48.625263Z",
467+
"invitation_code": null
464468
},
465469
{
466470
"id": "25d2af38-59b9-4f73-9452-51787fed5c84",
@@ -473,7 +477,8 @@ fetch("https://api.gigapay.se/v2/employees/?page_size=2&page=2", {
473477
"created_at": "2019-05-20T15:33:08.974624Z",
474478
"notified_at": "2019-05-20T15:33:12.581720Z",
475479
"claimed_at": null,
476-
"verified_at": null
480+
"verified_at": null,
481+
"invitation_code": "ABCD1234"
477482
}
478483
]
479484
}
@@ -586,7 +591,8 @@ fetch("https://api.gigapay.se/v2/employees/?search=skoog", {
586591
"created_at": "2022-04-11T13:05:27.565954Z",
587592
"notified_at": "2022-04-11T13:05:27.565954Z",
588593
"claimed_at": "2022-04-11T13:05:27.565954Z",
589-
"verified_at": "2022-04-11T14:05:27.565954Z"
594+
"verified_at": "2022-04-11T14:05:27.565954Z",
595+
"invitation_code": null
590596
},
591597
{
592598
"id": "481c3138-5710-4086-9237-a082e87d624f",
@@ -598,7 +604,8 @@ fetch("https://api.gigapay.se/v2/employees/?search=skoog", {
598604
"created_at": "2022-04-11T13:05:27.543935Z",
599605
"notified_at": "2022-04-11T13:05:27.543935Z",
600606
"claimed_at": "2022-04-11T13:05:27.543935Z",
601-
"verified_at": "2022-04-11T14:05:27.543935Z"
607+
"verified_at": "2022-04-11T14:05:27.543935Z",
608+
"invitation_code": null
602609
}
603610
]
604611
}
@@ -663,7 +670,8 @@ fetch("https://api.gigapay.se/v2/payouts/?search=skoog", {
663670
"created_at": "2022-04-14T08:31:11.741713Z",
664671
"notified_at": "2022-04-14T08:31:11.741713Z",
665672
"claimed_at": "2022-04-14T08:31:11.741713Z",
666-
"verified_at": "2022-04-14T09:31:11.741713Z"
673+
"verified_at": "2022-04-14T09:31:11.741713Z",
674+
"invitation_code": null
667675
},
668676
"invoice": "f4377884-e4c0-4e65-bbd1-24f52973b933",
669677
"full_salary_specification": false
@@ -691,7 +699,8 @@ fetch("https://api.gigapay.se/v2/payouts/?search=skoog", {
691699
"created_at": "2022-04-14T08:31:11.741713Z",
692700
"notified_at": "2022-04-14T08:31:11.741713Z",
693701
"claimed_at": "2022-04-14T08:31:11.741713Z",
694-
"verified_at": "2022-04-14T09:31:11.741713Z"
702+
"verified_at": "2022-04-14T09:31:11.741713Z",
703+
"invitation_code": null
695704
},
696705
"invoice": "b749b0fd-a82a-4644-a7c8-e89ae891cc23",
697706
"full_salary_specification": false
@@ -719,7 +728,8 @@ fetch("https://api.gigapay.se/v2/payouts/?search=skoog", {
719728
"created_at": "2022-04-14T08:31:11.707438Z",
720729
"notified_at": "2022-04-14T08:31:11.707438Z",
721730
"claimed_at": "2022-04-14T08:31:11.707438Z",
722-
"verified_at": "2022-04-14T09:31:11.707438Z"
731+
"verified_at": "2022-04-14T09:31:11.707438Z",
732+
"invitation_code": null
723733
},
724734
"invoice": "e5647953-4df7-4166-9066-f9dea11b66f3",
725735
"full_salary_specification": false
@@ -896,7 +906,8 @@ fetch("https://api.gigapay.se/v2/employees/", {
896906
"created_at": "2019-05-22T10:32:36.118753Z",
897907
"notified_at": null,
898908
"claimed_at": null,
899-
"verified_at": null
909+
"verified_at": null,
910+
"invitation_code": "ABCD1234"
900911
}
901912
```
902913

0 commit comments

Comments
 (0)