Contacts
The Contact entity in Kojo represents a point of contact that users can send Requisitions, Quotes, Purchases Orders and more.
Schema​
Contact​
| Name | Type | Description | Example |
|---|---|---|---|
| id | string | The unique contact identifier from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| displayName | string | the contact's name | "John Doe" |
string | valid email address | "john.doe@salesforce.com" | |
| phone | string? | A phone number | "+14845691493" |
| orgName | string? | Vendor name | SalesForce Inc. |
| vendorId | string? | Vendor ID from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| createdAt | DateTime | Timestamp from when the contact was created | "2021-03-24 17:26:46.983Z" |
| updatedAt | DateTime | Timestamp 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​
| Name | Description | Example |
|---|---|---|
| id | The ID of the job to fetch | "ckmnpybisiy5x08abky4g2d1f" |
| The 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​
| Name | Type | Description | Example |
|---|---|---|---|
| displayName | string | The contact's name | "John Doe" |
string | Valid email address | "john.doe@salesforce.com" | |
| orgName | string | Vendor name | SalesForce Inc. |
| vendorId | string | Vendor ID from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| phone | string? | 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​
| Name | Type | Description | Example |
|---|---|---|---|
| id | string | Contact'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"
}