@@ -67,6 +67,13 @@ your integration.
67
67
- ` identity.resolve `
68
68
- ` identity.delete `
69
69
70
+ - _ [ Permission] ( https://platform.fullcontact.com/docs/apis/permission/introduction ) _
71
+ - ` permission.create `
72
+ - ` permission.delete `
73
+ - ` permission.find `
74
+ - ` permission.current `
75
+ - ` permission.verify `
76
+
70
77
## Providing Authentication to FullContact Client
71
78
FullContact client uses ``` CredentialsProvider ``` interface for Authentication. Different ways
72
79
to provide authentication:
@@ -165,6 +172,7 @@ such as:
165
172
- ` PersonId ` : _ string_
166
173
- ` LiNonId ` : _ string_
167
174
- ` PartnerId ` : _ string_
175
+ - ` Placekey ` : _ string_
168
176
169
177
170
178
``` go
@@ -300,6 +308,7 @@ such as:
300
308
- ` PersonId ` : _ string_
301
309
- ` LiNonId ` : _ string_
302
310
- ` PartnerId ` : _ string_
311
+ - ` Placekey ` : _ string_
303
312
304
313
``` go
305
314
resolveRequest , err := fc.NewResolveRequest (
@@ -441,3 +450,159 @@ if resp.IsSuccessful {
441
450
}
442
451
```
443
452
453
+ ## Permission
454
+ [ Permission API Reference] ( https://platform.fullcontact.com/docs/apis/permission/introduction )
455
+ - ` permission.create `
456
+ - ` permission.delete `
457
+ - ` permission.find `
458
+ - ` permission.current `
459
+ - ` permission.verify `
460
+
461
+ #### Permission Request
462
+ Permission uses the following type of parameters for it's requests
463
+
464
+ ` PermissionRequest ` for
465
+ - ` permission.create `
466
+ - ` permission.verify `
467
+
468
+ and ` MultifieldRequest ` for
469
+ - ` permission.delete `
470
+ - ` permission.find `
471
+ - ` permission.current `
472
+
473
+ You can build a Permission Request by using ` NewPermissionRequest `
474
+ and setting different input parameters that you have.
475
+
476
+ All Permission Api requires ` MultifieldRequest ` requests, which can be constructed by using ` NewMultifieldRequest ` and following are it's parameters.
477
+
478
+ - ` Emails ` : _ [ ] string_
479
+ - ` Phones ` : _ [ ] string_
480
+ - ` Location ` : _ * Location_
481
+ - ` AddressLine1 ` : _ string_
482
+ - ` AddressLine2 ` : _ string_
483
+ - ` City ` : _ string_
484
+ - ` Region ` : _ string_
485
+ - ` RegionCode ` : _ string_
486
+ - ` PostalCode ` : _ string_
487
+ - ` Name ` : _ * PersonName_
488
+ - ` Full ` : _ string_
489
+ - ` Given ` : _ string_
490
+ - ` Family ` : _ string_
491
+ - ` Profiles ` : _ [ ] * Profile_
492
+ - ` Service ` : _ string_
493
+ - ` Username ` : _ string_
494
+ - ` Userid ` : _ string_
495
+ - ` Url ` : _ string_
496
+ - ` Maids ` : _ [ ] string_
497
+ - ` RecordId ` : _ string_
498
+ - ` PersonId ` : _ string_
499
+ - ` LiNonId ` : _ string_
500
+ - ` PartnerId ` : _ string_
501
+ - ` Placekey ` : _ string_
502
+
503
+ ``` go
504
+ multifieldRequest , err := fc.NewMultifieldRequest (
505
+ fc.WithEmailForMultifieldRequest (" bart@fullcontact.com" ))
506
+ permissionRequest , err := fc.NewPermissionRequest (
507
+ fc.WithMultifieldRequestForPermission (multifieldRequest))
508
+ ```
509
+
510
+ ### Permission Request
511
+ All permission methods returns a ` channel ` of type ` APIResponse ` from which you can get corresponding response classes.
512
+
513
+ The following are the corresponding response classes
514
+ - ` PermissionCreatedResponse ` - permission.create
515
+ - ` PermissionDeleteResponse ` - permission.delete
516
+ - ` PermissionVerifyResponse ` - permission.verify
517
+ - ` PermissionFindResponse ` - permission.find
518
+ - ` PermissionCurrentResponse ` - permission.current
519
+
520
+ ` PermissionCreate ` and ` PermissionVerify ` requires a ` ResolveRequest ` as parameter while the rest requires ` MultifieldRequest ` as parameter
521
+
522
+ ### Permission Create
523
+
524
+ #### Parameters:
525
+ Supported fields in query:
526
+ - ` query ` : MultifieldRequest - [ required]
527
+ - ` consentPurposes ` : List[ ConsentPurposes] - [ required]
528
+ - ` locale ` : string
529
+ - ` ipAddress ` : string
530
+ - ` language ` : string
531
+ - ` collectionMethod ` : string - [ required]
532
+ - ` collectionLocation ` : string - [ required]
533
+ - ` policyUrl ` : string - [ required]
534
+ - ` termsService ` : string - [ required]
535
+ - ` tcf ` : string
536
+ - ` timestamp ` : int
537
+
538
+ #### Returns:
539
+ class: ` PermissionCreateResponse ` . A basic API response with response code as 202 if successful.
540
+
541
+ ### Permission Verify
542
+ #### Parameters:
543
+ Supported fields in query:
544
+ - ` query ` : MultifieldRequest - [ required]
545
+ - ` purposeId ` : int - [ required]
546
+ - ` channel ` : string - [ required]
547
+
548
+ #### Returns:
549
+ class: ` PermissionVerifyResponse ` with following fields.
550
+
551
+ - ` ttl ` : string
552
+ - ` enabled ` : bool
553
+ - ` channel ` : string
554
+ - ` purposeId ` : int
555
+ - ` purposeName ` : string
556
+ - ` timestamp ` : int
557
+
558
+ ### Permission Delete
559
+ #### Parameters:
560
+ Query takes a ` MultiFieldReq `
561
+
562
+ #### Returns:
563
+ class: ` PermissionDeleteResponse ` . A basic API response with response code as 202 if successful.
564
+
565
+ ### Permission Find
566
+ #### Parameters:
567
+ Query takes a ` MultiFieldReq `
568
+
569
+ #### Returns:
570
+ class: ` PermissionFindResponse ` with list of Permissions.
571
+
572
+ ### Permission Current
573
+ #### Parameters:
574
+ Query takes a ` MultiFieldReq `
575
+
576
+ #### Returns:
577
+ class: ` PermissionCurrentResponse ` with set of current permissions
578
+
579
+ ``` go
580
+ resp := <- fcClient.PermissionCreate (permissionRequest)
581
+ fmt.Printf (" Permission Create API Response: %v " , resp)
582
+ if resp.IsSuccessful {
583
+ fmt.Println (" Permission Created Successfully!" )
584
+ }
585
+ resp = <- fcClient.PermissionVerify (permissionRequest)
586
+ fmt.Printf (" Permission Verify API Response: %v " , resp)
587
+ if resp.IsSuccessful {
588
+ fmt.Printf (" Permissions List: %v " , resp.PermissionVerifyResponse )
589
+ }
590
+
591
+ resp = <- fcClient.PermissionDelete (multifieldRequest)
592
+ fmt.Printf (" Permission Delete API Response: %v " , resp)
593
+ if resp.IsSuccessful {
594
+ fmt.Println (" Permission Deleted Successfully!" )
595
+ }
596
+
597
+ resp = <- fcClient.PermissionFind (multifieldRequest)
598
+ fmt.Printf (" Permission Find API Response: %v " , resp)
599
+ if resp.IsSuccessful {
600
+ fmt.Printf (" Permission Find: %v " , resp.PermissionFindResponse )
601
+ }
602
+
603
+ resp = <- fcClient.PermissionCurrent (multifieldRequest)
604
+ fmt.Printf (" Permission Current API Response: %v " , resp)
605
+ if resp.IsSuccessful {
606
+ fmt.Printf (" Permission Current: %v " , resp.PermissionCurrentResponse )
607
+ }
608
+ ```
0 commit comments