Skip to main content

Contacts

The Contact entity in Kojo represents a point of contact that users can send Requisitions, Quotes, Purchases Orders and more.

Schema​

Contact​

NameTypeDescriptionExample
idstringThe unique contact identifier from Kojo"ckmnpybisiy5x08abky4g2d1f"
displayNamestringthe contact's name"John Doe"
emailstringvalid email address"john.doe@salesforce.com"
phonestring?A phone number"+14845691493"
orgNamestring?Vendor nameSalesForce Inc.
vendorIdstring?Vendor ID from Kojo"ckmnpybisiy5x08abky4g2d1f"
createdAtDateTimeTimestamp from when the contact was created"2021-03-24 17:26:46.983Z"
updatedAtDateTimeTimestamp from the last update"2021-03-24 17:26:46.983Z"

REST Endpoints​

GET /contacts/:idOrEmail​

Fetches a single contact by ID or Email

Parameters​

NameDescriptionExample
idThe ID of the job to fetch"ckmnpybisiy5x08abky4g2d1f"
emailThe email of the contact to be searched"johndoes@salesforce.com"

Response​

The Contact object.

Example Query​

GET https://api.kojo.tech/contact/ckmnpybisiy5x08abky4g2d1f

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe@salesforce.com",
"orgName": "Sales Force",
"phone": "+14845691493",
"vendorId": "ckmnpybisiy5x08abky4g2d1f",
"createdAt": "2021-02-18T20:52:55.395Z",
"updatedAt": "2021-02-18T20:52:55.395Z"
}

POST /contacts​

Creates a new Contact.

Parameters​

NameTypeDescriptionExample
displayNamestringThe contact's name"John Doe"
emailstringValid email address"john.doe@salesforce.com"
orgNamestringVendor nameSalesForce Inc.
vendorIdstringVendor ID from Kojo"ckmnpybisiy5x08abky4g2d1f"
phonestring?Contact phone number"+14845691493"
warning

The contact orgName can not be updated after the contact creation.

Response​

Returns the created Contact.

Example Request​

POST https://api.kojo.tech/contact
{
"email": "johndoe@salesforce.com",
"orgName": "SalesForce",
"vendorId": "ckmnpybisiy5x08abky4g2d1f",
"phone": "+14845691493",
"displayName": "John Doe"
}

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe@salesforce.com",
"orgName": "Sales Force",
"phone": "+14845691493",
"vendorId": "ckmnpybisiy5x08abky4g2d1f",
"createdAt": "2021-02-18T20:52:55.395Z",
"updatedAt": "2021-02-18T20:52:55.395Z"
}

PATCH /contacts/:id​

Updates an existing Contact.

Parameters​

NameTypeDescriptionExample
idstringContact's id from Kojo"ckmnpybisiy5x08abky4g2d1f"

Response​

Returns the updated Contact object.

Example Request​

PATCH https://api.kojo.tech/contact/ckmnpybisiy5x08abky4g2d1f
{
"phone": "+14845691555",
}

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe@salesforce.com",
"orgName": "Sales Force",
"phone": "+14845691555",
"vendorId": "ckmnpybisiy5x08abky4g2d1f",
"createdAt": "2021-02-18T20:52:55.395Z",
"updatedAt": "2021-02-20T20:52:55.395Z"
}