Skip to content

Latest commit

 

History

History
150 lines (123 loc) · 1.92 KB

readme.md

File metadata and controls

150 lines (123 loc) · 1.92 KB

Linking multiple contact informations to the same person using primary and secondary contacts

To Build

go build -o bitespeed

To Run

./bitespeed

Example Request

{
	"email": "[email protected]",
	"phoneNumber": "898991"
}

Example Response

{
    "primaryContatctId": 46,
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "898991"
    ],
    "secondaryContactIds": []
}

Example Request

{
	"email": "[email protected]",
	"phoneNumber": "898991"
}

Example Response

{
    "primaryContatctId": 51,
    "emails": [
        "[email protected]",
        "[email protected]"
    ],
    "phoneNumbers": [
        "898991",
        "898991"
    ],
    "secondaryContactIds": [
        52
    ]
}

Example Request

{
	"email": "[email protected]",
	"phoneNumber": "123456"
}

Example Response

{
    "primaryContatctId": 52,
    "emails": [
        "[email protected]",
        "[email protected]"
    ],
    "phoneNumbers": [
        "898991",
        "123456"
    ],
    "secondaryContactIds": [
        52,
        53
    ]
}

Example Request

{
	"phoneNumber": "123456"
}

Example Response

{
    "primaryContatctId": 53,
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "123456"
    ],
    "secondaryContactIds": [
        53
    ]
}

Example Request

{
	"email": "[email protected]"
}

Example Response

{
    "primaryContatctId": 51,
    "emails": [
        "[email protected]",
        "[email protected]"
    ],
    "phoneNumbers": [
        "898991",
        "898991"
    ],
    "secondaryContactIds": [
        52
    ]
}