metamap

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 8 Imported by: 0

README

Metamap

A Golang SDK for interacting with the metamap API

Please ensure to create issues in this repo if :

  • You encounter any error while using this package and that issue would be attended to immediately.

Contributions

  • Feel free to contribute to this library by creating PR's ;)

Get Started

  • In other to use this package, you need to first create an account with MetaMap via https://metamap.com to get your Client_Id and Client_Secret

Installation

To install this package, you need to install Go and set your Go workspace first.

  1. You can use the below Go command to install metamap
$ go get -u github.com/iqquee/metamap
  1. Import it in your code:
import "github.com/iqquee/metamap"

Note : All methods in this package returns two (2) things:

  • An object of the response
  • An error (if any)

Quick start

# assume the following codes in example.go file
$ touch example.go
# open the just created example.go file in the text editor of your choice

GovChecks: Argentina

  • ArgentinaDNI

ArgentinaDNI verify a user's DNI (Documento Nacional de Identidad) based on card number and issue date.

This method takes in the ArgentinaDNIRequest{} struct as a parameter.

Use this object payload to implement the ArgentinaDNI() method
type ArgentinaDNIRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	DateOfBirth    string `json:"dateOfBirth"`
	// M for male, F for female.
	Gender string `json:"gender"`
	// Document issue date.
	DateOfIssue string                 `json:"dateOfIssue"`
	CallbackUrl string                 `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata    map[string]interface{} `json:"metadata"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ArgentinaDNIRequest{
		DocumentNumber: "your document number",
		DateOfBirth:      "your data of birth e.g 2023-05-10",
		Gender:       "M", // for male
		DateOfIssue: "your data of issue",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ArgentinaDNI(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ArgentinaRENAPER

ArgentinaRENAPER verify a user's DNI (Documento Nacional de Identidad) number and identity.

NOTE: Use the ArgentinaDNI() to validate the submitted DNI card.

This method takes in the ArgentinaRENAPERRequest{} struct as a parameter.

Use this object payload to implement the ArgentinaRENAPER() method
type ArgentinaRENAPERRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	DateOfBirth    string `json:"dateOfBirth"`
	// M for male, F for female.
	Gender string `json:"gender"`
	// Document issue date.
	DateOfIssue string                 `json:"dateOfIssue"`
	CallbackUrl string                 `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata    map[string]interface{} `json:"metadata"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ArgentinaRENAPERRequest{
		DocumentNumber: "your document number",
		DateOfBirth:      "your data of birth e.g 2023-05-10",
		Gender:       "M", // for male
		DateOfIssue: "your data of issue",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ArgentinaRENAPER(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ArgentinaRENAPERPremium

ArgentinaRENAPERPremium verify a user's DNI (Documento Nacional de Identidad) number and identity.

NOTE: You do not need to validate the submitted DNI card parameters via ArgentinaDNI() as this check is implemented in here.

This method takes in the ArgentinaRENAPERPremiumRequest{} struct as a parameter.

Use this object payload to implement the ArgentinaRENAPERPremium() method
type ArgentinaRENAPERPremiumRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	// E.g "2023-05-10"
	DateOfBirth string `json:"dateOfBirth"`
	// Date of document issue E.g "2023-05-10"
	IssueDate string `json:"issueDate"`
	// M for male, F for female.
	Gender      string `json:"gender"`
	CallbackUrl string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ArgentinaRENAPERPremiumRequest{
		DocumentNumber: "your document number",
		DateOfBirth:      "your data of birth e.g 2023-05-10",
		Gender:       "M", // for male
		IssueDate: "your data of issue",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ArgentinaRENAPERPremium(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ArgentinaRENAPERExtended

ArgentinaRENAPERExtended verify a user's DNI (Documento Nacional de Identidad) number and identity against multiple databases.

NOTE: Use the ArgentinaDNI() to validate the submitted DNI card.

This method takes in the ArgentinaRENAPERExtendedRequest{} struct as a parameter.

Use this object payload to implement the ArgentinaRENAPERExtended() method
type ArgentinaRENAPERExtendedRequest struct {
	// Document number from either a National ID or a driver license
	DocumentNumber string `json:"documentNumber"`
	FullName       string `json:"fullName"`
	CallbackUrl    string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ArgentinaRENAPERExtendedRequest{
		DocumentNumber: "your document number",
		FullName:      "your full name",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ArgentinaRENAPERExtended(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}

GovChecks: Brazil

  • BrazilCNPJValidation

BrazilCNPJValidation validate a business's National Registry of Legal Entities number.

This method takes in the BrazilCNPJValidationRequest{} struct as a parameter.

Use this object payload to implement the BrazilCNPJValidation() method
type BrazilCNPJValidationRequest struct {
	Cnpj        string `json:"cnpj"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.BrazilCNPJValidationRequest{
		Cnpj: "your cnpj number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.BrazilCNPJValidation(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • BrazilCNPJExtendedValidation

BrazilCNPJExtendedValidation validate a business's National Registry of Legal Entities number.

This method takes in the BrazilCNPJExtendedValidationRequest{} struct as a parameter.

Use this object payload to implement the BrazilCNPJExtendedValidation() method
type BrazilCNPJExtendedValidationRequest struct {
	Cnpj        string `json:"cnpj"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.BrazilCNPJExtendedValidationRequest{
		Cnpj: "your cnpj number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.BrazilCNPJExtendedValidation(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • BrazilCPFValidation

BrazilCPFValidation verify a user's CPF number and identity.

This method takes in the BrazilCPFValidationRequest{} struct as a parameter.

Use this object payload to implement the BrazilCPFValidation() method
type BrazilCPFValidationRequest struct {
	CpfNumber   string `json:"cpfNumber"`
	FullName    string `json:"fullName"`
	DateOfBirth string `json:"dateOfBirth"`
	MothersName string `json:"mothersName"`
	FathersName string `json:"fathersName"`
	// nationalId or driving-license
	DocumentType   string `json:"documentType"`
	DocumentNumber string `json:"documentNumber"`
	// M for male, F for female. Returns null if there is no gender data.
	Gender      string `json:"gender"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.BrazilCPFValidationRequest{
		CpfNumber: "012.345.678-90",
		FullName: "JOHN DOE",
		DateOfBirth: "1900-01-01",
		MothersName: "JANE DOE",
		FathersName: "JAMES DOE",
		DocumentType: "national-id",
		DocumentNumber: "0123456789",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.BrazilCPFValidation(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • BrazilCPFLEGACY

BrazilCPFLEGACY verify a user's CPF number and identity.

NOTE: This version of the CPF check only handles individual validation requests. Use the new version of the BrazilCPFValidation() which can handle batch validation requests.

This method takes in the BrazilCPFLEGACYRequest{} struct as a parameter.

Use this object payload to implement the BrazilCPFValidation() method
type BrazilCPFLEGACYRequest struct {
	CpfNumber      string `json:"cpfNumber"`
	FullName       string `json:"fullName"`
	DocumentNumber string `json:"documentNumber"`
	DateOfBirth    string `json:"dateOfBirth"`
	DateOfExpiry   string `json:"dateOfExpiry"`
	DocumentType   string `json:"documentType"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.BrazilCPFLEGACYRequest{
		CpfNumber: "012.345.678-90",
		FullName: "JOHN DOE",
		DateOfBirth: "1900-01-01",
		DateOfExpiry: "2021-12-31",
		DocumentType: "national-id",
		DocumentNumber: "0123456789",
	}
	resp, err := client.BrazilCPFLEGACY(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • BrazilCPFLight

BrazilCPFLight verify a user's CPF number and identity.

This method takes in the BrazilCPFLightRequest{} struct as a parameter.

Use this object payload to implement the BrazilCPFLight() method
type BrazilCPFLightRequest struct {
	Cpf         string `json:"cpf"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.BrazilCPFLightRequest{
		Cpf: "01234567",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.BrazilCPFLight(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}

GovChecks: Chile

  • ChileRegistroCivil

ChileRegistroCivil verify that a user's RUN number against the Chilean Civil Registry database.

This method takes in the ChileRegistroCivilRequest{} struct as a parameter.

Use this object payload to implement the ChileRegistroCivil() method
type ChileRegistroCivilRequest struct {
	RunNumber    string `json:"runNumber"`
	DocumentType string `json:"documentType"`
	Nationality    string `json:"nationality"`
	DocumentNumber string `json:"documentNumber"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ChileRegistroCivilRequest{
		RunNumber: "run number",
		DocumentType : "document type",
		Nationality: "CHL",
		DocumentNumber: "document number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ChileRegistroCivil(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ChileCriminalCertificate

ChileCriminalCertificate verify that a user's background certificate is valid.

This method takes in the ChileCriminalCertificateRequest{} struct as a parameter.

Use this object payload to implement the ChileCriminalCertificate() method
type ChileCriminalCertificateRequest struct {
	SheetNumber      string `json:"sheetNumber"`
	VerificationCode string `json:"verificationCode"`
	CallbackUrl      string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ChileCriminalCertificateRequest{
		SheetNumber: "012345678901",
		VerificationCode: "1ab23cd45e6f",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ChileCriminalCertificate(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}

GovChecks: Colombia

  • ColombiaMigrationInstitute

ColombiaMigrationInstitute verify that a user has a valid immigration status in Colombia.

This method takes in the ColombiaMigrationInstituteRequest{} struct as a parameter.

NOTE: DateOfIssue fieid should be in this format 2022-01-01.

Use this object payload to implement the ColombiaMigrationInstitute() method
type ColombiaMigrationInstituteRequest struct {
	DocumentNumber string `json:"documentNumber"`
	DateOfIssue    string `json:"dateOfIssue"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaMigrationInstituteRequest{
		DocumentNumber: "document number",
		DateOfIssue: "2022-01-01",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaMigrationInstitute(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ColombiaRegistraduria

ColombiaRegistraduria verify a user's ID card against the Colombian Civil Registry.

This method takes in the ColombiaRegistraduriaRequest{} struct as a parameter.

Use this object payload to implement the ColombiaRegistraduria() method
type ColombiaRegistraduriaRequest struct {
	DocumentNumber string `json:"documentNumber"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaRegistraduriaRequest{
		DocumentNumber: "document number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaRegistraduria(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ColombiaRegistraduriaLight

ColombiaMigrationInstitute verify that a user has a valid immigration status in Colombia.

This method takes in the ColombiaRegistraduriaLightRequest{} struct as a parameter.

NOTE: DateOfIssue fieid should be in this format 2022-01-01.

Use this object payload to implement the ColombiaRegistraduriaLight() method
type ColombiaRegistraduriaLightRequest struct {
	DocumentNumber string `json:"documentNumber"`
	DateOfIssue    string `json:"dateOfIssue"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaRegistraduriaLightRequest{
		DocumentNumber: "document number",
		DateOfIssue: "2022-01-01",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaRegistraduriaLight(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ColombiaUnifiedLegalSearch

ColombiaUnifiedLegalSearch check a user's full name against Colombian police records.

This method takes in the ColombiaUnifiedLegalSearchRequest{} struct as a parameter.

Use this object payload to implement the ColombiaUnifiedLegalSearch() method
type ColombiaUnifiedLegalSearchRequest struct {
	FullName    string `json:"fullName"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaUnifiedLegalSearchRequest{
		FullName: "JOHN DOE",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaUnifiedLegalSearch(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ColombiaRUES

ColombiaRUES check a business's national tax ID against Colombian Single Business and Social Registry.

This method takes in the ColombiaRUESRequest{} struct as a parameter.

Use this object payload to implement the ColombiaRUES() method
type ColombiaRUESRequest struct {
	Nit         string `json:"nit"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaRUESRequest{
		Nit: "000000000",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaRUES(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • ColombiaPPT

ColombiaPPT verify the validity of the Colombian PPT (Permiso por protección temporal = Temporary Protection Permit).

This method takes in the ColombiaPPTRequest{} struct as a parameter.

NOTE: Date of Birth format is DD-MM-YYYY

Use this object payload to implement the ColombiaPPT() method
type ColombiaPPTRequest struct {
	Rumv        string `json:"rumv"`     
	Dni         string `json:"dni"`        
	DateOfBirth string `json:"dateOfBirth"`
	CallbackUrl string `json:"callbackUrl"
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.ColombiaPPTRequest{
		Rumv: "your rumv number",
		Dni: "your dni number",
		DateOfBirth: "01-03-2038"
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.ColombiaPPT(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}

GovChecks: Nigeria

  • NigeriaVirtualNIN

NigeriaVirtualNIN verifies NIN(National Identification Number).

NOTE: The MetaData field in the metamap.NigeriaNINRequest{} struct is an optional parameter which can contain extra data to add internal references.

Use this object payload to implement the NigeriaVirtualNIN() method
type NigeriaNINRequest struct {
	VNIN        string `json:"vNIN"`
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	DateOfBirth string `json:"dateOfBirth"`
	Metadata map[string]interface{} `json:"metadata"`
	//CallbackUrl is a required parameter that must be passed in
	CallbackUrl string `json:"callbackUrl"`
}
package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	extraData := make(map[string]interface{})
	extraData["user_id"] = "08992e987"
	extraData["some extra data"] = "some extra data"
	req := metamap.NigeriaNINRequest{
		DocumentNumber: "your national identity number",
		FirstName:   	"John",
		LastName:    	"Doe",
		DateOfBirth: 	"2023-05-01",
		Metadata:    	extraData,
		Phone: 		 	"string"
		CallbackUrl: 	"https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaVirtualNIN(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaVotingIDNumber

NigeriaVotingIDNumber verifies NIN(National Identification Number).

Use this object payload to implement the NigeriaVirtualNIN() method
type NigeriaVotingIDNumberRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	DateOfBirth    string `json:"dateOfBirth"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaVotingIDNumberRequest{
		DocumentNumber: "your voters card number",
		FirstName:      "John",
		LastName:       "Doe",
		DateOfBirth:    "2023-05-01",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaVotingIDNumber(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaDriversLicence

NigeriaDriversLicence verifies drivers licence.

Use this object payload to implement the NigeriaDriversLicence() method
type NigeriaDriversLicenceRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaDriversLicenceRequest{
		DocumentNumber: "your drivers licence",
		FirstName:      "John",
		LastName:       "Doe",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaDriversLicence(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaCAC

NigeriaCAC verifies a company's CAC (Corporate Affairs Commission) number.

Use this object payload to implement the NigeriaCorporateAffairsCommission() method
type NigeriaCACRequest struct {
	RegistrationNumber string `json:"registrationNumber"`
	CallbackUrl        string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaCACRequest{
		RegistrationNumber: "your registration number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaCAC(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaTaxIdentificationNumber

NigeriaTaxIdentificationNumber verifies a company's Tax Identification Number.

Use this object payload to implement the NigeriaCorporateAffairsCommission() method
type NigeriaTaxIdentificationNumberRequest struct {
	TaxNumber   string `json:"taxNumber"`
	CallbackUrl string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaTaxIdentificationNumberRequest{
		TaxNumber: "your tax number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaTaxIdentificationNumber(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaCACAffiliates

NigeriaCACAffiliates verifies a major shareholder names and titles if a company's Corporate Affairs Commission number is valid.

Use this object payload to implement the NigeriaCACAffiliates() method
type NigeriaCACAffiliatesRequest struct {
	RegistrationNumber string `json:"registrationNumber"`
	CallbackUrl        string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaCACAffiliatesRequest{
		RegistrationNumber: "your registration number",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaCACAffiliates(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}
  • NigeriaBVN

verifies a BVN (Bank Verification Number).

Use this object payload to implement the NigeriaBVN() method
type NigeriaBVNRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	CallbackUrl    string `json:"callbackUrl"`
}

package main

import (
	"fmt"
	metamap "github.com/iqquee/metamap"
)

func main() {
	clientId := "your metamap client id"
	clientSecret := "your metamap client secrete"
	httpClient := hhttp.DefaultClient
	client := metamap.New(&httpClient, clientId, clientSecret)

	req := metamap.NigeriaBVNRequest{
		DocumentNumber: "your BVN number",
		FirstName: "John",
		LastName: "Doe",
		CallbackUrl: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
	}
	resp, err := client.NigeriaBVN(req)
	if err != nil {
		fmt.Println("This is the error: ", err)
		return
	}

	fmt.Println("This is the response: ", resp)
}

Documentation

Index

Constants

View Source
const (
	//Http methods for the http request
	MethodPOST = "POST"
	MethodGET  = "GET"
)

Variables

This section is empty.

Functions

func Encode

func Encode(text string) string

Endocode takes in a string and encoded it into a base64 string

Types

type ArgentinaDNIRequest

type ArgentinaDNIRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	// "2023-05-10"
	DateOfBirth string `json:"dateOfBirth"`
	// M for male, F for female.
	Gender string `json:"gender"`
	// Document issue date.
	DateOfIssue string `json:"dateOfIssue"`
	CallbackUrl string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

ArgentinaDNI

type ArgentinaDNIResponse

type ArgentinaDNIResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		DateOfIssue    string `json:"dateOfIssue"`
		DocumentNumber string `json:"documentNumber"`
	} `json:"data"`
}

type ArgentinaRENAPERExtendedRequest

type ArgentinaRENAPERExtendedRequest struct {
	// Document number from either a National ID or a driver license
	DocumentNumber string `json:"documentNumber"`
	FullName       string `json:"fullName"`
	CallbackUrl    string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

ArgentinaRENAPERExtended

type ArgentinaRENAPERExtendedResponse

type ArgentinaRENAPERExtendedResponse struct {
	Resource string `json:"resource"`
	Step     struct {
		Status int         `json:"status"`
		Id     string      `json:"id"`
		Error  interface{} `json:"error"`
		Data   struct {
			DateOfBirth         string      `json:"dateOfBirth"`
			DateOfDeath         string      `json:"dateOfDeath"`
			Email               string      `json:"email"`
			FullName            string      `json:"fullName"`
			FirstName           string      `json:"firstName"`
			Surname             string      `json:"surname"`
			TaxIdType           string      `json:"taxIdType"`
			DniNumber           string      `json:"dniNumber"`
			TaxNumber           string      `json:"taxNumber"`
			ActivityCode        string      `json:"activityCode"`
			ActivityDescription string      `json:"activityDescription"`
			Address             string      `json:"address"`
			Nationality         string      `json:"nationality"`
			Gender              string      `json:"gender"`
			DateOfIssue         string      `json:"dateOfIssue"`
			DateOfExpiry        string      `json:"dateOfExpiry"`
			TransactionNumber   string      `json:"transactionNumber"`
			Version             string      `json:"version"`
			Sanctioned          interface{} `json:"sanctioned"`
			Pep                 interface{} `json:"pep"`
			SujetoObligado      interface{} `json:"sujetoObligado"`
			DocumentNumber      string      `json:"documentNumber"`
			Cuit                string      `json:"cuit"`
			PhoneNumbers        []string    `json:"phoneNumbers"`
			Deceased            bool        `json:"deceased"`
		} `json:"data"`
		DocumentType string `json:"documentType"`
	} `json:"step"`
	Timestamp string `json:"timestamp"`
	EventName string `json:"eventName"`
	FlowId    string `json:"flowId"`
}

type ArgentinaRENAPERPremiumRequest

type ArgentinaRENAPERPremiumRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	// E.g "2023-05-10"
	DateOfBirth string `json:"dateOfBirth"`
	// Date of document issue E.g "2023-05-10"
	IssueDate string `json:"issueDate"`
	// M for male, F for female.
	Gender      string `json:"gender"`
	CallbackUrl string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

ArgentinaRENAPERPremium

type ArgentinaRENAPERPremiumResponse

type ArgentinaRENAPERPremiumResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		IdMainIssue          string `json:"idMainIssue"`
		IdReprint            string `json:"idReprint"`
		CopyCode             string `json:"copyCode"`
		IssueDate            string `json:"issueDate"`
		ExpiryDate           string `json:"expiryDate"`
		LastName             string `json:"lastName"`
		FirstName            string `json:"firstName"`
		DateOfBirth          string `json:"dateOfBirth"`
		StreetName           string `json:"streetName"`
		StreetNumber         string `json:"streetNumber"`
		Floor                string `json:"floor"`
		Apartment            string `json:"apartment"`
		ZipCode              string `json:"zipCode"`
		Neighborhood         string `json:"neighborhood"`
		Monobloc             string `json:"monobloc"`
		City                 string `json:"city"`
		Town                 string `json:"town"`
		State                string `json:"state"`
		Country              string `json:"country"`
		DeathNotice          string `json:"deathNotice"`
		DateOfDeath          string `json:"dateOfDeath"`
		CitizenId            string `json:"citizenId"`
		Nationality          string `json:"nationality"`
		PlaceOfBirth         string `json:"placeOfBirth"`
		Taxid                string `json:"taxid"`
		Gender               string `json:"gender"`
		NationalId           string `json:"nationalId"`
		NationalIdValidation string `json:"nationalIdValidation"`
		IssueDateValidation  string `json:"issueDateValidation"`
		GenderValidation     string `json:"genderValidation"`
	} `json:"data"`
}

type ArgentinaRENAPERRequest

type ArgentinaRENAPERRequest struct {
	// Document number from either a National ID or a driver license.
	DocumentNumber string `json:"documentNumber"`
	// "2023-05-10"
	DateOfBirth string `json:"dateOfBirth"`
	// M for male, F for female.
	Gender string `json:"gender"`
	// Document issue date.
	DateOfIssue string `json:"dateOfIssue"`
	CallbackUrl string `json:"callbackUrl"`
	// Use Metadata to add internal references for your outputs/webhooks.
	Metadata map[string]interface{} `json:"metadata"`
}

ArgentinaRENAPER

type ArgentinaRENAPERResponse

type ArgentinaRENAPERResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		DateOfBirth  string   `json:"dateOfBirth"`
		FullName     string   `json:"fullName"`
		DniNumber    string   `json:"dniNumber"`
		Cuit         string   `json:"cuit"`
		PhoneNumbers []string `json:"phoneNumbers"`
		Deceased     bool     `json:"deceased"`
	} `json:"data"`
}

type AuthorizationRequest

type AuthorizationRequest struct {
	GrantType string `json:"grant_type"` // client_credentials
}

AuthorizationRequest is the authorization request model

type AuthorizationResponse

type AuthorizationResponse struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	Payload     struct {
		User struct {
			ID string `json:"_id"`
		} `json:"user"`
	} `json:"payload"`
}

AuthorizationResponse is the authorization response model

type BrazilCNPJExtendedValidationRequest

type BrazilCNPJExtendedValidationRequest struct {
	Cnpj        string `json:"cnpj"`
	CallbackUrl string `json:"callbackUrl"`
}

BrazilCNPJExtendedValidation

type BrazilCNPJExtendedValidationResponse

type BrazilCNPJExtendedValidationResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		RegistrationNumber  string `json:"registrationNumber"`
		TipoEstabelecimento string `json:"tipoEstabelecimento"`
		CompanyName         string `json:"companyName"`
		LegalName           string `json:"legalName"`
		CadastralStatus     struct {
			RegistrationStatus string `json:"registrationStatus"`
			StatusDate         string `json:"statusDate"`
			Reason             string `json:"reason"`
		} `json:"cadastralStatus"`
		LegalNature struct {
			LegalCode        string `json:"legalCode"`
			LegalDescription string `json:"legalDescription"`
		} `json:"legalNature"`
		RegistrationDate string `json:"registrationDate"`
		CnaePrincipal    struct {
			CnaeCode        string `json:"cnaeCode"`
			CnaeDescription string `json:"cnaeDescription"`
		} `json:"cnaePrincipal"`
		Address struct {
			Street            string `json:"street"`
			Locality          string `json:"locality"`
			AreaNumber        string `json:"areaNumber"`
			AdditionalAddress string `json:"additionalAddress"`
			Postcode          string `json:"postcode"`
			LocalitySector    string `json:"localitySector"`
			FederationUnit    string `json:"federationUnit"`
			Country           struct {
				Code        string `json:"code"`
				Description string `json:"description"`
			} `json:"country"`
			County struct {
				AdministrativeCode string `json:"administrativeCode"`
				AdministrativeName string `json:"administrativeName"`
			} `json:"county"`
		} `json:"address"`
		MunicipalitiesJurisdiction struct {
			Code        string `json:"code"`
			Description string `json:"description"`
		} `json:"municipalitiesJurisdiction"`
		Phones []struct {
			PhoneCode   string `json:"phoneCode"`
			PhoneNumber string `json:"phoneNumber"`
		} `json:"phones"`
		Email                 string `json:"email"`
		CapitalSocial         string `json:"capitalSocial"`
		CompanySize           string `json:"companySize"`
		SituacaoEspecial      string `json:"situacaoEspecial"`
		DataSituacaoEspecial  string `json:"dataSituacaoEspecial"`
		InformacoesAdicionais struct {
			OptanteSimples       string        `json:"optanteSimples"`
			OptanteMei           string        `json:"optanteMei"`
			ListaPeriodosSimples []interface{} `json:"listaPeriodosSimples"`
		} `json:"informacoesAdicionais"`
		ShareholdersInfo []struct {
			ShareholderType string `json:"shareholderType"`
			CpfNumber       string `json:"cpfNumber"`
			ShareholderName string `json:"shareholderName"`
			Qualificacao    string `json:"qualificacao"`
			AssignationDate string `json:"assignationDate"`
			Country         struct {
				Code        string `json:"code"`
				Description string `json:"description"`
			} `json:"country"`
			LegalRepresentation struct {
				RepresentativeCpf  string `json:"representativeCpf"`
				RepresentativeName string `json:"representativeName"`
				Qualificacao       string `json:"qualificacao"`
			} `json:"legalRepresentation"`
		} `json:"shareholdersInfo"`
	} `json:"data"`
}

type BrazilCNPJValidationRequest

type BrazilCNPJValidationRequest struct {
	Cnpj        string `json:"cnpj"`
	CallbackUrl string `json:"callbackUrl"`
}

BrazilCNPJValidation

type BrazilCNPJValidationResponse

type BrazilCNPJValidationResponse struct {
	Status int         `json:"status"`
	Error  interface{} `json:"error"`
	Data   struct {
		CompanyName         string      `json:"companyName"`
		CommercialName      string      `json:"commercialName"`
		Cpnj                string      `json:"cpnj"`
		DateOfOpening       string      `json:"dateOfOpening"`
		CompanySize         string      `json:"companySize"`
		Status              string      `json:"status"`
		StatusReason        interface{} `json:"statusReason"`
		StatusDate          string      `json:"statusDate"`
		SpecialStatus       interface{} `json:"specialStatus"`
		SpecialStatusReason interface{} `json:"specialStatusReason"`
		MainActivity        string      `json:"mainActivity"`
		SecondaryActivities []string    `json:"secondaryActivities"`
		CompanyType         string      `json:"companyType"`
		Address             struct {
			Street       string `json:"street"`
			Number       string `json:"number"`
			ZipCode      string `json:"zipCode"`
			District     string `json:"district"`
			Municipality string `json:"municipality"`
			State        string `json:"state"`
			Details      string `json:"details"`
		} `json:"address"`
		Contact struct {
			Email       string `json:"email"`
			PhoneNumber string `json:"phoneNumber"`
		} `json:"contact"`
		EFR interface{} `json:"EFR"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type BrazilCPFLEGACYRequest

type BrazilCPFLEGACYRequest struct {
	CpfNumber      string `json:"cpfNumber"`
	FullName       string `json:"fullName"`
	DocumentNumber string `json:"documentNumber"`
	DateOfBirth    string `json:"dateOfBirth"`
	DateOfExpiry   string `json:"dateOfExpiry"`
	DocumentType   string `json:"documentType"`
}

BrazilCPFLEGACY

type BrazilCPFLEGACYResponse

type BrazilCPFLEGACYResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		CPFNumber      string `json:"CPFNumber"`
		Gender         string `json:"gender"`
		Nationality    string `json:"nationality"`
		TaxStatus      string `json:"taxStatus"`
		FullName       string `json:"fullName"`
		DateOfBirth    string `json:"dateOfBirth"`
		DocumentType   string `json:"documentType"`
		DocumentNumber string `json:"documentNumber"`
	} `json:"data"`
}

type BrazilCPFLightRequest

type BrazilCPFLightRequest struct {
	// CPF number
	Cpf         string `json:"cpf"`
	CallbackUrl string `json:"callbackUrl"`
}

BrazilCPFLight

type BrazilCPFLightResponse

type BrazilCPFLightResponse struct {
	Status int         `json:"status"`
	Id     string      `json:"id"`
	Error  interface{} `json:"error"`
	Data   struct {
		FullName    string `json:"fullName"`
		DateOfBirth string `json:"dateOfBirth"`
		Cpf         string `json:"cpf"`
		TaxStatus   string `json:"taxStatus"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type BrazilCPFValidationRequest

type BrazilCPFValidationRequest struct {
	CpfNumber   string `json:"cpfNumber"`
	FullName    string `json:"fullName"`
	DateOfBirth string `json:"dateOfBirth"`
	MothersName string `json:"mothersName"`
	FathersName string `json:"fathersName"`
	// nationalId or driving-license
	DocumentType   string `json:"documentType"`
	DocumentNumber string `json:"documentNumber"`
	// M for male, F for female. Returns null if there is no gender data.
	Gender      string `json:"gender"`
	CallbackUrl string `json:"callbackUrl"`
}

BrazilCPFValidationResponse

type BrazilCPFValidationResponse

type BrazilCPFValidationResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		CpfNumberMatched      bool   `json:"cpfNumberMatched"`
		Gender                string `json:"gender"`
		Nationality           string `json:"nationality"`
		TaxStatus             string `json:"taxStatus"`
		FullNameSimilarity    int    `json:"fullNameSimilarity"`
		DateOfBirthMatched    bool   `json:"dateOfBirthMatched"`
		DocumentType          string `json:"documentType"`
		DocumentNumberMatched bool   `json:"documentNumberMatched"`
		MothersNameSimilarity int    `json:"mothersNameSimilarity"`
		FathersNameSimilarity int    `json:"fathersNameSimilarity"`
	} `json:"data"`
}

type ChileCriminalCertificateRequest

type ChileCriminalCertificateRequest struct {
	SheetNumber      string `json:"sheetNumber"`
	VerificationCode string `json:"verificationCode"`
	CallbackUrl      string `json:"callbackUrl"`
}

ChileCriminalCertificate

type ChileCriminalCertificateResponse

type ChileCriminalCertificateResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		FileName string `json:"fileName"`
	} `json:"data"`
}

type ChileRegistroCivilRequest

type ChileRegistroCivilRequest struct {
	RunNumber    string `json:"runNumber"`
	DocumentType string `json:"documentType"`
	// 3-letter country code as per ISO 3166-1 alpha-3. You can visit https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 country code reference
	Nationality    string `json:"nationality"`
	DocumentNumber string `json:"documentNumber"`
	CallbackUrl    string `json:"callbackUrl"`
}

ChileRegistroCivil

type ChileRegistroCivilResponse

type ChileRegistroCivilResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		DocumentType string `json:"documentType"`
	} `json:"data"`
}

type Client

type Client struct {
	Http              *http.Client
	AccessToken       string
	AuthToken         string
	ClientId          string
	ClientSecret      string
	BaseUrl           string
	IsMultipartHeader bool
	/*
		IsBasic is used to determine what kind of request is being being made so that the request header  can be set accordingly.

		This value should be set to true only for if the request header authorization is Basic and for Bearer it should be set to false
	*/
	IsBasic bool

	TokenValidity time.Time // metamap JWT token is only valid for 1hr and afterwards a new JWT token needs to be created intothet to access the resource
}

Client is the struct holding all of the variables to be used

func New

func New(h *http.Client, clientId, clientSecret string) *Client

New is a method that takes in several parameters in other to initiate the metamap configs

func (*Client) ArgentinaDNI

func (c *Client) ArgentinaDNI(req ArgentinaDNIRequest) (*ArgentinaDNIResponse, error)

ArgentinaDNI verify a user's DNI (Documento Nacional de Identidad) based on card number and issue date.

This method takes in the ArgentinaDNIRequest{} struct as a parameter.

MetaMap connects with the Argentinian National Direction of Migration (Dirección Nacional de Migraciones) site to validate that the National Identity Document (Documento Nacional de Identidad / DNI) number present in the ID card exists and its date of issue matches the last one issued to the user.

func (*Client) ArgentinaRENAPER

func (c *Client) ArgentinaRENAPER(req ArgentinaRENAPERRequest) (*ArgentinaRENAPERResponse, error)

ArgentinaRENAPER verify a user's DNI (Documento Nacional de Identidad) number and identity.

NOTE: Use the ArgentinaDNI() to validate the submitted DNI card.

This method takes in the ArgentinaRENAPERRequest{} struct as a parameter.

MetaMap connects with the Argentinian National Registry of Persons (Registro Nacional de la Persona / RENAPER) to validate that the National Identity Document (Documento Nacional de Identidad / DNI) number present in the ID card exists and its owner matches the data obtained from it.

func (*Client) ArgentinaRENAPERExtended

ArgentinaRENAPERExtended verify a user's DNI (Documento Nacional de Identidad) number and identity against multiple databases.

This method takes in the ArgentinaRENAPERExtendedRequest{} struct as a parameter.

NOTE: Use the ArgentinaDNI() to validate the submitted DNI card.

MetaMap connects with the following databases to validate that the National Identity Document (Documento Nacional de Identidad / DNI) number present on the ID card exists:

--Argentinian National Registry of Persons (Registro Nacional de la Persona / RENAPER)

--Federal Administration of Public Income (Administración Federal de Ingresos Públicos / AFIP)

--Politically Exposed Person (Persona Expuesta Políticamente / PEP)

This merit also checks if the user associated with the DNI has any sanctions.

func (*Client) ArgentinaRENAPERPremium

func (c *Client) ArgentinaRENAPERPremium(req ArgentinaRENAPERPremiumRequest) (*ArgentinaRENAPERPremiumResponse, error)

ArgentinaRENAPERPremium verify a user's DNI (Documento Nacional de Identidad) number and identity.

This method takes in the ArgentinaRENAPERPremiumRequest{} struct as a parameter.

NOTE: You do not need to validate the submitted DNI card parameters via ArgentinaDNI() as this check is implemented in here.

MetaMap connects to the Argentinian National Registry of Persons (Registro Nacional de la Persona / RENAPER) to validate that the DNI (Documento Nacional de Identidad / National Identity Document) exists in government DB a date of issue and copy of the card match the last issued to the user. This version complements the response with additional data points compared to the basic Renaper DB.

func (*Client) Authorization

func (c *Client) Authorization() (*AuthorizationResponse, error)

Authorization makes a request to metemap and returns a JWT authorization token to access the rest of metamap services.

func (*Client) BrazilCNPJExtendedValidation

BrazilCNPJExtendedValidation validate a business's National Registry of Legal Entities number.

This method takes in the BrazilCNPJExtendedValidationRequest{} struct as a parameter.

MetaMap connects with the Brazilian Internal Revenue Service (Ministério da Fazenda / Treasury) to validate the National Registry of Legal Entities (Cadastro Nacional de Pessoas Jurídicas / CNPJ) number.

If the CNPJ number is valid, the endpoint will also pull up additional information, including company registration data, type of business, phone, email, physical address, and information about shareholders, including their names and CPF numbers.

func (*Client) BrazilCNPJValidation

func (c *Client) BrazilCNPJValidation(req BrazilCNPJValidationRequest) (*BrazilCNPJValidationResponse, error)

BrazilCNPJValidation validate a business's National Registry of Legal Entities number.

This method takes in the BrazilCNPJValidationRequest{} struct as a parameter.

MetaMap connects with the Brazilian Internal Revenue Service (Ministério da Fazenda / Treasury) to validate the National Registry of Legal Entities (Cadastro Nacional de Pessoas Jurídicas / CNPJ) number.

func (*Client) BrazilCPFLEGACY

func (c *Client) BrazilCPFLEGACY(req BrazilCPFLEGACYRequest) (*BrazilCPFLEGACYResponse, error)

BrazilCPFLEGACY verify a user's CPF number and identity.

This method takes in the BrazilCPFLEGACYRequest{} struct as a parameter.

NOTE: This version of the CPF check only handles individual validation requests. Use the new version of the BrazilCPFValidation() which can handle batch validation requests.

MetaMap connects with the Brazilian IRS (Ministério da Fazenda / Treasury) to validate that the CPF (Cadastro de Pessoas Físicas / Registration of Individuals) number present in the ID card exists and its owner matches the data obtained from it.

func (*Client) BrazilCPFLight

func (c *Client) BrazilCPFLight(req BrazilCPFLightRequest) (*BrazilCPFLightResponse, error)

BrazilCPFLight verify a user's CPF number and identity.

This method takes in the BrazilCPFLightRequest{} struct as a parameter.

MetaMap connects with the Brazilian Internal Revenue Service (Ministério da Fazenda / Treasury) to validate that the Registration of Individuals (Cadastro de Pessoas Físicas / CPF) number present on the national ID card or driver license exists and its owner matches the data obtained from it.

func (*Client) BrazilCPFValidation

func (c *Client) BrazilCPFValidation(req BrazilCPFValidationRequest) (*BrazilCPFValidationResponse, error)

BrazilCPFValidation verify a user's CPF number and identity.

This method takes in the BrazilCPFValidationRequest{} struct as a parameter.

MetaMap connects with the Brazilian Internal Revenue Service (Ministério da Fazenda / Treasury) to validate that the Registration of Individuals (Cadastro de Pessoas Físicas / CPF) number present in the ID card exists and its owner matches the data obtained from it.

func (*Client) ChileCriminalCertificate

ChileCriminalCertificate verify that a user's background certificate is valid.

This method takes in the ChileCriminalCertificateRequest{} struct as a parameter.

MetaMap connects with the Chilean Civil Registry (Servicio de Registro Civil e Identificación / SRCEI) to validate that the user's criminal certificate is valid.

func (*Client) ChileRegistroCivil

func (c *Client) ChileRegistroCivil(req ChileRegistroCivilRequest) (*ChileRegistroCivilResponse, error)

ChileRegistroCivil verify that a user's RUN number against the Chilean Civil Registry database.

This method takes in the ChileRegistroCivilRequest{} struct as a parameter.

NOTE: 3-letter country code as per ISO 3166-1 alpha-3.You can visit https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 for the country code reference.

MetaMap connects with the Chilean Civil Registry (Servicio de Registro Civil e Identificación / SRCEI) to validate that the Rol Único Nacional (RUN) number present in the ID card for foreigners exists and its currently valid.

func (*Client) ColombiaMigrationInstitute

ColombiaMigrationInstitute verify that a user has a valid immigration status in Colombia.

This method takes in the ColombiaMigrationInstituteRequest{} struct as a parameter.

NOTE: DateOfIssue fieid should be in this format 2022-01-01.

MetaMap connects with Colombia Migration (Migración Colombia) to validate that the user's name and ID issue date match the information associated with their residence permit.

func (*Client) ColombiaPPT

func (c *Client) ColombiaPPT(req ColombiaPPTRequest) (*ColombiaPPTResponse, error)

ColombiaPPT verify the validity of the Colombian PPT (Permiso por protección temporal = Temporary Protection Permit).

This method takes in the ColombiaPPTRequest{} struct as a parameter.

NOTE: Date of Birth format is DD-MM-YYYY

MetaMap searches through the Colombian PPT registry to validate the Permiso por protección temporal document against the RUMV Number, the Identity Document Number, and the date of birth.

func (*Client) ColombiaRUES

func (c *Client) ColombiaRUES(req ColombiaRUESRequest) (*ColombiaRUESResponse, error)

ColombiaRUES check a business's national tax ID against Colombian Single Business and Social Registry.

This method takes in the ColombiaRUESRequest{} struct as a parameter.

MetaMap searches through the Colombian Single Business and Social Registry (Registro Unico Empresarial y Social, RUES) to validate a business's national tax ID (Número de Identificación Tributaria, NIT).

func (*Client) ColombiaRegistraduria

func (c *Client) ColombiaRegistraduria(req ColombiaRegistraduriaRequest) (*ColombiaRegistraduriaResponse, error)

ColombiaRegistraduria verify a user's ID card against the Colombian Civil Registry.

This method takes in the ColombiaRegistraduriaRequest{} struct as a parameter.

MetaMap connects with the Colombian Civil Registry (Resgistraduría Nacional del Estado Civil) to validate that the Cédula Number (Rol Único Nacional) and other data present in the ID card corresponds to their database. When validated, this API will also return the user's financial information, including loan counts and bank accounts counts.

func (*Client) ColombiaRegistraduriaLight

ColombiaRegistraduriaLight verify a user's ID card against the Colombian Civil Registry.

This method takes in the ColombiaRegistraduriaLightRequest{} struct as a parameter.

NOTE: DateOfIssue fieid should be in this format 2022-01-01.

MetaMap connects with the Colombian Civil Registry (Resgistraduría Nacional del Estado Civil) to validate that the Cédula Number (Rol Único Nacional) and other data present in the ID card corresponds to their database and is valid.

func (*Client) ColombiaUnifiedLegalSearch

ColombiaUnifiedLegalSearch check a user's full name against Colombian police records.

This method takes in the ColombiaUnifiedLegalSearchRequest{} struct as a parameter.

MetaMap searches through Colombian police records for a user's past or current warrants or arrests cases.

func (*Client) NigeriaBVN

func (c *Client) NigeriaBVN(req NigeriaBVNRequest) (*map[string]interface{}, error)

NigeriaBVN verifies a BVN (Bank Verification Number).

This method takes in the NigeriaBVNRequest{} struct as a parameter.

func (*Client) NigeriaCAC

func (c *Client) NigeriaCAC(req NigeriaCACRequest) (*NigeriaCACResponse, error)

NigeriaCAC verifies a company's CAC (Corporate Affairs Commission) number.

This method takes in the NigeriaCACRequest{} struct as a parameter.

MetaMap checks that a company's Corporate Affairs Commission (CAC) registration number is valid as either a business name (BN) or a registered company (RC) for a limited liability company (LLC).

func (*Client) NigeriaCACAffiliates

func (c *Client) NigeriaCACAffiliates(req NigeriaCACAffiliatesRequest) (*NigeriaCACAffiliatesResponse, error)

NigeriaCACAffiliates verifies a major shareholder names and titles if a company's Corporate Affairs Commission number is valid.

This method takes in the NigeriaCACAffiliatesRequest{} struct as a parameter.

If a company's Corporate Affairs Commission (CAC) registration number is valid, MetaMap will return the names of major shareholders and their titles.

func (*Client) NigeriaDriversLicence

func (c *Client) NigeriaDriversLicence(req NigeriaDriversLicenceRequest) (*NigeriaDriversLicenceResponse, error)

NigeriaDriversLicence verifies drivers licence.

This method takes in the NigeriaDriversLicenceRequest{} struct as a parameter.

MetaMap verifies a user's identity information and their driver license number through the Federal Road Safety Commission (FRSC).

func (*Client) NigeriaTaxIdentificationNumber

NigeriaTaxIdentificationNumber verifies a company's Tax Identification Number.

This method takes in the NigeriaTaxIdentificationNumberRequest{} struct as a parameter.

MetaMap checks that a company's tax ID number (TIN) — issued from either the Federal Inland Revenue Service (FIRS) or Joint Tax Board (JBT) — is valid as either a business name (BN) or registered company (RC) for a limited liability company (LLC).

func (*Client) NigeriaVirtualNIN

func (c *Client) NigeriaVirtualNIN(req NigeriaNINRequest) (*NigeriaNINResponse, error)

NigeriaVirtualNIN verifies NIN(National Identification Number).

This method takes in the NigeriaNINRequest{} struct as a parameter. Both the VNIN and CallbackUrl field are required parameter that must be passed in for the request.

NOTE: The format for the DateOfBirth is yyyy-mm-dd.

It also takes in an optional parameter `metadata` which is a map[string]interface that is passed in to add custom data to the request.

MetaMap takes a user's virtual NIN - one-time verification code from the official NIMC Application or code generated via USSD request *346*3*Your NIN*715461# to verify their identity through the National Identity Management Commission (NIMC) database.

You can reach out to the official NIMC article(https://nimc.gov.ng/nin-tokenization/) to learn more about the tokenization initiative.

func (*Client) NigeriaVotingIDNumber

func (c *Client) NigeriaVotingIDNumber(req NigeriaVotingIDNumberRequest) (*NigeriaVotingIDNumberResponse, error)

NigeriaVotingIDNumber verifies Voting Identity Number.

This method takes in the NigeriaVotingIDNumberRequest{} struct as a parameter.

NOTE: The format for the DateOfBirth is yyyy-mm-dd.

MetaMap verifies a user's identity information and their Voting Identity Number (VIN) through the Independent National Electoral Commission (INEC).

func (*Client) VerifyTokenValidity

func (c *Client) VerifyTokenValidity() error

VerifyTokenValidity is a metjod used to verify the JWT token validity.

Since the JWT token MetaMap gives to have access to it's resources is only valid for 1 hour. The VerifyTokenValidity method verifies the time that the JWT token was created against the the current time to confirm if the its already been a hour or not. If it has, the VerifyTokenValidity method makes a request to MetaMap to get a new JWT token using client.Authorization method.

type ColombiaMigrationInstituteRequest

type ColombiaMigrationInstituteRequest struct {
	DocumentNumber string `json:"documentNumber"`
	DateOfIssue    string `json:"dateOfIssue"`
	CallbackUrl    string `json:"callbackUrl"`
}

ColombiaMigrationInstitute

type ColombiaMigrationInstituteResponse

type ColombiaMigrationInstituteResponse struct {
	Status int         `json:"status"`
	Error  interface{} `json:"error"`
	Data   struct {
		FullName        string `json:"fullName"`
		DateOfBirth     string `json:"dateOfBirth"`
		Nationality     string `json:"nationality"`
		Status          string `json:"status"`
		DateOfExpiry    string `json:"dateOfExpiry"`
		DateOfIssue     string `json:"dateOfIssue"`
		CertificateCode string `json:"certificateCode"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type ColombiaPPTRequest

type ColombiaPPTRequest struct {
	Rumv        string `json:"rumv"`        // User's RUMV number
	Dni         string `json:"dni"`         // User's DNI number
	DateOfBirth string `json:"dateOfBirth"` // Date of Birth format is DD-MM-YYYY
	CallbackUrl string `json:"callbackUrl"` // Callback URL to receive request results.
}

ColombiaPPT

type ColombiaPPTResponse

type ColombiaPPTResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		FullName     string `json:"fullName"`
		Phone        string `json:"phone"`
		Email        string `json:"email"`
		DocumentType string `json:"documentType"`
		Dni          string `json:"dni"`
		Status       string `json:"status"`
	} `json:"data"`
}

type ColombiaRUESRequest

type ColombiaRUESRequest struct {
	Nit         string `json:"nit"`
	CallbackUrl string `json:"callbackUrl"`
}

ColombiaRUES

type ColombiaRUESResponse

type ColombiaRUESResponse struct {
	Status int         `json:"status"`
	Error  interface{} `json:"error"`
	Data   struct {
		CompanyName               string      `json:"companyName"`
		Nit                       string      `json:"nit"`
		ShortName                 interface{} `json:"shortName"`
		Municipality              string      `json:"municipality"`
		Category                  string      `json:"category"`
		Status                    string      `json:"status"`
		EnrollmentNumber          string      `json:"enrollmentNumber"`
		LastRenewal               string      `json:"lastRenewal"`
		RenewalDate               string      `json:"renewalDate"`
		EnrollmentDate            string      `json:"enrollmentDate"`
		ExpirationDate            string      `json:"expirationDate"`
		EnrollmentStatus          string      `json:"enrollmentStatus"`
		AnnullmentReason          string      `json:"annullmentReason"`
		CompanyType               string      `json:"companyType"`
		OrganizationType          string      `json:"organizationType"`
		EnrollmentCategory        string      `json:"enrollmentCategory"`
		LastUpdate                string      `json:"lastUpdate"`
		EconomicActivities        []string    `json:"economicActivities"`
		MainLegalRepresentative   string      `json:"mainLegalRepresentative"`
		OtherLegalRepresentatives []string    `json:"otherLegalRepresentatives"`
		Entities                  []struct {
			EntityName       string `json:"entityName"`
			EnrollmentNumber string `json:"enrollmentNumber"`
			EnrollmentDate   string `json:"enrollmentDate"`
		} `json:"entities"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type ColombiaRegistraduriaLightRequest

type ColombiaRegistraduriaLightRequest struct {
	DocumentNumber string `json:"documentNumber"` // Document number for a National ID
	DateOfIssue    string `json:"dateOfIssue"`    // Document issue date
	CallbackUrl    string `json:"callbackUrl"`
}

ColombiaRegistraduriaLight

type ColombiaRegistraduriaLightResponse

type ColombiaRegistraduriaLightResponse struct {
	Status int         `json:"status"`
	Error  interface{} `json:"error"`
	Id     string      `json:"id"`
	Data   struct {
		FullName       string `json:"fullName"`
		DocumentNumber string `json:"documentNumber"`
		EmissionDate   string `json:"emissionDate"`
		PlaceOfIssue   string `json:"placeOfIssue"`
		Status         string `json:"status"`
	} `json:"data"`
}

type ColombiaRegistraduriaRequest

type ColombiaRegistraduriaRequest struct {
	DocumentNumber string `json:"documentNumber"`
	CallbackUrl    string `json:"callbackUrl"`
}

ColombiaRegistraduria

type ColombiaRegistraduriaResponse

type ColombiaRegistraduriaResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		AgeRange                     string `json:"ageRange"`
		BankAccountsCount            string `json:"bankAccountsCount"`
		CommercialIndustryDebtsCount string `json:"commercialIndustryDebtsCount"`
		DocumentNumber               string `json:"documentNumber"`
		EmissionDate                 string `json:"emissionDate"`
		FinancialIndustryDebtsCount  string `json:"financialIndustryDebtsCount"`
		FullName                     string `json:"fullName"`
		Gender                       string `json:"gender"`
		IssuePlace                   string `json:"issuePlace"`
		Name                         string `json:"name"`
		MiddleName                   string `json:"middleName"`
		Surname                      string `json:"surname"`
		SecondSurname                string `json:"secondSurname"`
		SavingAccountsCount          string `json:"savingAccountsCount"`
		SolidarityIndustryDebtsCount string `json:"solidarityIndustryDebtsCount"`
		ServiceIndustryDebtsCount    string `json:"serviceIndustryDebtsCount"`
	} `json:"data"`
}

type ColombiaUnifiedLegalSearchRequest

type ColombiaUnifiedLegalSearchRequest struct {
	FullName    string `json:"fullName"`
	CallbackUrl string `json:"callbackUrl"`
}

ColombiaUnifiedLegalSearch

type ColombiaUnifiedLegalSearchResponse

type ColombiaUnifiedLegalSearchResponse struct {
	Status int    `json:"status"`
	Id     string `json:"id"`
	Error  struct {
		Type    string `json:"type"`
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
	Data struct {
		Results []struct {
			IdProceso            interface{} `json:"idProceso"`
			LlaveProceso         string      `json:"llaveProceso"`
			FechaProceso         string      `json:"fechaProceso"`
			FechaUltimaActuacion string      `json:"fechaUltimaActuacion"`
			Despacho             string      `json:"despacho"`
			Departamento         string      `json:"departamento"`
			SujetosProcesales    string      `json:"sujetosProcesales"`
		} `json:"results"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type NigeriaBVNRequest

type NigeriaBVNRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	CallbackUrl    string `json:"callbackUrl"`
}

Bank Verification Number

type NigeriaCACAffiliatesRequest

type NigeriaCACAffiliatesRequest struct {
	RegistrationNumber string `json:"registrationNumber"`
	CallbackUrl        string `json:"callbackUrl"`
}

Corporate Affairs Commission Affilaite

type NigeriaCACAffiliatesResponse

type NigeriaCACAffiliatesResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		Shareholders []struct {
			Name                string `json:"name"`
			Position            string `json:"position"`
			Status              string `json:"status"`
			DateOfBirth         string `json:"dateOfBirth"`
			PhoneNumber         string `json:"phoneNumber"`
			Email               string `json:"email"`
			City                string `json:"city"`
			Address             string `json:"address"`
			IdType              string `json:"idType"`
			IdNumber            string `json:"idNumber"`
			Shares              string `json:"shares"`
			AccreditationNumber string `json:"accreditationNumber"`
		} `json:"shareholders"`
	} `json:"data"`
}

type NigeriaCACRequest

type NigeriaCACRequest struct {
	RegistrationNumber string `json:"registrationNumber"`
	CallbackUrl        string `json:"callbackUrl"`
}

Corporate Affairs Commission

type NigeriaCACResponse

type NigeriaCACResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		Type             string `json:"type"`
		CompanyName      string `json:"companyName"`
		CacNumber        string `json:"cacNumber"`
		Status           string `json:"status"`
		CompanyAddress   string `json:"companyAddress"`
		CompanyEmail     string `json:"companyEmail"`
		RegistrationDate string `json:"registrationDate"`
	} `json:"data"`
}

type NigeriaDriversLicenceRequest

type NigeriaDriversLicenceRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	CallbackUrl    string `json:"callbackUrl"`
}

Drivers Licence

type NigeriaDriversLicenceResponse

type NigeriaDriversLicenceResponse struct {
	Status string      `json:"status"`
	ID     string      `json:"id"`
	Error  interface{} `json:"error"`
	Data   struct {
		LicenseNo           string `json:"license_no"`
		FirstName           string `json:"firstName"`
		LastName            string `json:"lastName"`
		IssuedDate          string `json:"issuedDate"`
		ExpirationDate      string `json:"expirationDate"`
		StateOfIssue        string `json:"stateOfIssue"`
		Gender              string `json:"gender"`
		Birthdate           string `json:"birthdate"`
		MiddleName          string `json:"middlename"`
		GovernmentFaceMatch struct {
			Photo   string `json:"photo"`
			Matched bool   `json:"matched"`
			Score   int    `json:"score"`
		} `json:"governmentFaceMatch"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

type NigeriaNINRequest

type NigeriaNINRequest struct {
	//VNIN is a required parameter that must be passed in
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	DateOfBirth    string `json:"dateOfBirth"`
	//Metadata is an optional parameter
	Metadata map[string]interface{} `json:"metadata"`
	Phone    string                 `json:"phone"`
	//CallbackUrl is a required parameter that must be passed in
	CallbackUrl string `json:"callbackUrl"`
}

National ID

type NigeriaNINResponse

type NigeriaNINResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		ID          string `json:"id"`
		FirstName   string `json:"firstName"`
		LastName    string `json:"lastName"`
		DateOfBirth string `json:"dateOfBirth"`
		Gender      string `json:"gender"`
		Phone       string `json:"phone"`
		VNin        string `json:"vNin"`
		Photo       string `json:"photo"`
	} `json:"data"`
}

type NigeriaTaxIdentificationNumberRequest

type NigeriaTaxIdentificationNumberRequest struct {
	TaxNumber   string `json:"taxNumber"`
	CallbackUrl string `json:"callbackUrl"`
}

Tax Identification Number

type NigeriaTaxIdentificationNumberResponse

type NigeriaTaxIdentificationNumberResponse struct {
	Error interface{} `json:"error"`
	Data  struct {
		CompanyName  string `json:"companyName"`
		FirsNumber   string `json:"FirsNumber"`
		CacNumber    string `json:"cacNumber"`
		JtbNumber    string `json:"JtbNumber"`
		TaxOffice    string `json:"taxOffice"`
		CompanyPhone string `json:"companyPhone"`
		CompanyEmail string `json:"companyEmail"`
	} `json:"data"`
}

type NigeriaVotingIDNumberRequest

type NigeriaVotingIDNumberRequest struct {
	DocumentNumber string `json:"documentNumber"`
	FirstName      string `json:"firstName"`
	LastName       string `json:"lastName"`
	DateOfBirth    string `json:"dateOfBirth"`
	CallbackUrl    string `json:"callbackUrl"`
}

Voters Card

type NigeriaVotingIDNumberResponse

type NigeriaVotingIDNumberResponse struct {
	Status string      `json:"status"`
	ID     string      `json:"id"`
	Error  interface{} `json:"error"`
	Data   struct {
		FirstName     string `json:"firstName"`
		LastName      string `json:"lastName"`
		MiddleName    string `json:"middlename"`
		Gender        string `json:"gender"`
		Occupation    string `json:"occupation"`
		StateOfOrigin string `json:"stateOfOrigin"`
		LgaOfOrigin   string `json:"lgaOfOrigin"`
		OnSpokenLang  string `json:"onspokenlang"`
		PollingUnit   string `json:"pollingUnit"`
	} `json:"data"`
	Timestamp string `json:"timestamp"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL