Partner API Documentation
This page is intended for NetHunt partners wishing to integrate their applications with NetHunt CRM. We support creating, listing, and updating workspaces via our API. Creation of additional partner accounts is also available for selected partners.
Interaction with NetHunt CRM happens via HTTPS using GET, POST, and PATCH methods and the "application/json" or "application/merge-patch+json" media types for payload. All URLs in this documentation are relative to "https://nethunt.com/api". For access control the "Basic" HTTP authentication scheme is employed, where a Partner ID is used in place of the user name and a special API key in place of the password.
Operations
List all accessible folders
GET /partners/{partnerId}/workspaces
Sample request
GET https://nethunt.com/api/partners/demo/workspaces
Sample result
[
{
"id": "5af033c93012e73192d4fc62",
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User",
"fullAccess": true
},
{
"emailAddress": "second@example.com",
"personalName": "Second User",
"fullAccess": true
}
]
}
]
Result fields | Description | Required |
---|
id | Workspace ID | Required |
name | Workspace name | Required |
phoneNumber | Customer phone number | Optional |
teamSize | Approximate customer team size | Optional |
expirationTime | Until when workspace usage is allowed | Required |
seatNumber | Maximum number of workspace users allowed | Optional |
permissions | Current workspace users | Required |
Find a workspace created by a partner
GET /partners/{partnerId}/workspaces/{workspaceId}
Sample request
GET https://nethunt.com/api/partners/demo/workspaces/5af033c93012e73192d4fc62
Sample result
{
"id": "5af033c93012e73192d4fc62",
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User",
"fullAccess": true
},
{
"emailAddress": "second@example.com",
"personalName": "Second User",
"fullAccess": true
}
]
}
Result fields | Description | Required |
---|
id | Workspace ID | Required |
name | Workspace name | Required |
phoneNumber | Customer phone number | Optional |
teamSize | Approximate customer team size | Optional |
expirationTime | Until when workspace usage is allowed | Required |
seatNumber | Maximum number of workspace users allowed | Optional |
permissions | Current workspace users | Required |
Create a new workspace
POST /partners/{partnerId}/workspaces
Content-Type: application/json
Sample request
POST https://nethunt.com/api/partners/demo/workspaces
Content-Type: application/json
{
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User"
},
{
"emailAddress": "second@example.com",
"personalName": "Second User"
]
}
Request fields | Description | Required |
---|
name | Workspace name | Required |
phoneNumber | Customer phone number | Optional |
teamSize | Approximate customer team size | Optional |
expirationTime | Until when workspace usage is allowed | Required |
seatNumber | Maximum number of workspace users allowed | Optional |
permissions | Current workspace users | Required |
Sample result
{
"id": "5af033c93012e73192d4fc62",
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User",
"fullAccess": true
},
{
"emailAddress": "second@example.com",
"personalName": "Second User",
"fullAccess": true
}
]
}
Result fields | Description | Required |
---|
id | Workspace ID | Required |
name | Workspace name | Required |
phoneNumber | Customer phone number | Optional |
teamSize | Approximate customer team size | Optional |
expirationTime | Until when workspace usage is allowed | Required |
seatNumber | Maximum number of workspace users allowed | Optional |
permissions | Current workspace users | Required |
Create a new workspace
PATCH /partners/{partnerId}/workspaces/{workspaceId}
Content-Type: application/merge-patch+json
Sample request
PATCH https://nethunt.com/api/partners/demo/workspaces/5af033c93012e73192d4fc62
Content-Type: application/merge-patch+json
{
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User"
},
{
"emailAddress": "second@example.com",
"personalName": "Second User"
]
}
All the fields are optional, the fields specified replace existing fields, and missing fields are left intact.
Request fields | Description |
---|
name | Workspace name |
phoneNumber | Customer phone number |
teamSize | Approximate customer team size |
expirationTime | Until when workspace usage is allowed |
seatNumber | Maximum number of workspace users allowed |
permissions | Current workspace users |
Sample result
{
"id": "5af033c93012e73192d4fc62",
"name": "Demo Workspace",
"phoneNumber": "0000000",
"teamSize": "10 - 100",
"expirationTime": "2018-10-11T00:00:00Z",
"seatNumber": 10,
"permissions": [
{
"emailAddress": "first@example.com",
"personalName": "First User",
"fullAccess": true
},
{
"emailAddress": "second@example.com",
"personalName": "Second User",
"fullAccess": true
}
]
}
Result fields | Description | Required |
---|
id | Workspace ID | Required |
name | Workspace name | Required |
phoneNumber | Customer phone number | Optional |
teamSize | Approximate customer team size | Optional |
expirationTime | Until when workspace usage is allowed | Required |
seatNumber | Maximum number of workspace users allowed | Optional |
permissions | Current workspace users | Required |
List all partner accounts created by a partner
GET /partners
Sample request
GET https://nethunt.com/api/partners
Sample result
[
{
"id": "15ce835c-3d23-4e67-beb5-d39f993345b5",
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000"
}
]
Result fields | Description | Required |
---|
id | Partner account ID | Required |
name | Partner name | Required |
logoUrl | Partner logo URL | Optional |
websiteUrl | Partner website URL | Optional |
supportEmailAddress | Partner support email address | Optional |
supportPhoneNumber | Partner support phone number | Optional |
Find a partner account created by a partner
GET /partners/{partnerId}
Sample request
GET https://nethunt.com/api/partners/15ce835c-3d23-4e67-beb5-d39f993345b5
Sample result
{
"id": "15ce835c-3d23-4e67-beb5-d39f993345b5",
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000"
}
Result fields | Description | Required |
---|
id | Partner account ID | Required |
name | Partner name | Required |
logoUrl | Partner logo URL | Optional |
websiteUrl | Partner website URL | Optional |
supportEmailAddress | Partner support email address | Optional |
supportPhoneNumber | Partner support phone number | Optional |
Create a new partner account
POST /partners
Content-Type: application/json
Sample request
POST https://nethunt.com/api/partners
Content-Type: application/json
{
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000",
"apiKey": "secret"
}
Request fields | Description | Required |
---|
name | Partner name | Required |
logoUrl | Partner logo URL | Optional |
websiteUrl | Partner website URL | Optional |
supportEmailAddress | Partner support email address | Optional |
supportPhoneNumber | Partner support phone number | Optional |
apiKey | Partner API key | Required |
Sample result
{
"id": "15ce835c-3d23-4e67-beb5-d39f993345b5",
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000"
}
Result fields | Description | Required |
---|
id | Partner account ID | Required |
name | Partner name | Required |
logoUrl | Partner logo URL | Optional |
websiteUrl | Partner website URL | Optional |
supportEmailAddress | Partner support email address | Optional |
supportPhoneNumber | Partner support phone number | Optional |
Create a new partner account
PATCH /partners/{partnerId}
Content-Type: application/merge-patch+json
Sample request
PATCH https://nethunt.com/api/partners/15ce835c-3d23-4e67-beb5-d39f993345b5
Content-Type: application/merge-patch+json
{
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000",
"apiKey": "secret"
}
All the fields are optional, the fields specified replace existing fields, and missing fields are left intact.
Request fields | Description |
---|
name | Partner name |
logoUrl | Partner logo URL |
websiteUrl | Partner website URL |
supportEmailAddress | Partner support email address |
supportPhoneNumber | Partner support phone number |
apiKey | Partner API key |
Sample result
{
"id": "15ce835c-3d23-4e67-beb5-d39f993345b5",
"name": "Example",
"logoUrl": "http://via.placeholder.com/140x100",
"websiteUrl": "https://example.com",
"supportEmailAddress": "support@example.com",
"supportPhoneNumber": "0000000"
}
Result fields | Description | Required |
---|
id | Partner account ID | Required |
name | Partner name | Required |
logoUrl | Partner logo URL | Optional |
websiteUrl | Partner website URL | Optional |
supportEmailAddress | Partner support email address | Optional |
supportPhoneNumber | Partner support phone number | Optional |