Introduction
Welcome to the TalentGarden API! You can use our API to access TalentGarden API endpoints, which can get information on various events and campuses in our database.
We have language bindings in Shell! You can view code examples in the dark area to the right.
Authentication
JSON Web Token
To authorize, use this code:
// Make the api call with this config
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
Make sure to replace
YOUR_JWT
with your JWT.
JSON Web Token (JWT) authentication is used to call API Services personifying a specific logged user. The JWT must be issued from one of our applications registered in our Auth0 tenants.
To make calls to the API, send the JWT in the Authorization HTTP header using the Bearer authentication scheme. Talent Garden expects the JWT to be included in all API requests from the client in a header that looks like the following:
Authorization: Bearer YOUR_JWT
You can request an Auth0 OAuth2 client getting in touch with us.
Bookings
Booking Object
An booking object contain all of information of a book.
Filed | Type | Description |
---|---|---|
resource_id |
integer | Identify the resource of the book. |
user_id |
integer | Identify the user that book a resource. |
from |
timestamp with timezone | Date and time of star of book. |
to |
timestamp with timezone | Date and time of finish book. |
created_at |
timestamp with timezone | Date and time of book creation. |
update_at |
timestamp with timezone | Date and time of last update. |
organization_id |
integer | From which organization you did the booking. |
Get Bookings
HTTP Request
With this request you can get all information about the all booking.
GET https://api.talentgarden.com/v1/bookings
const axios = require('axios');
const url = `https://api.talentgarden.com/v1/bookings`
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
axios.get(url, config)
.then((response) => { console.log(response) })
.catch((error) => { console.log(error) })
The above command returns JSON structured like this:
{
"data": [
{
"id": 64,
"resource_id": "24",
"user_id": "11152",
"from": "2021-02-26T08:30:00.000Z",
"to": "2021-02-26T09:30:00.000Z",
"created_at": "2021-02-15T16:14:19.000Z",
"updated_at": "2021-02-15T16:14:19.000Z",
"organization_id": 1
},
{
"id": 75,
"resource_id": "24",
"user_id": "11152",
"from": "2021-03-09T08:30:00.000Z",
"to": "2021-03-09T09:30:00.000Z",
"created_at": "2021-02-15T17:31:26.000Z",
"updated_at": "2021-02-15T17:31:26.000Z",
"organization_id": 1
}
]
}
Query Parameters
You can use this parameter to filter the bookings or you can sort them.
Parameter | example | Description |
---|---|---|
resource_id |
24 or 24,25,26 | Return only bookings with specified resource_id or multiple resource_id . |
user_id |
1 | Return only bookings with specified user_id . |
from |
2021-11-25T08:00:00.000Z | Return all bookings grater or equal of parameter |
to |
2021-11-25T08:00:00.000Z | Return all bookings less or equal of parameter |
sortby |
from | Return all bookings sorted by the fields of object. |
Get Booking by ID
HTTP Request
With this request you can get all information about specific book.
GET https://api.talentgarden.com/v1/bookings/:id
const axios = require('axios');
const url = `https://api.talentgarden.com/v1/bookings/64`
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
axios.get(url, config)
.then((response) => { console.log(response) })
.catch((error) => { console.log(error) })
The above command returns JSON structured like this:
{
"id": 64,
"resource_id": "24",
"user_id": "11152",
"from": "2021-02-26T08:30:00.000Z",
"to": "2021-02-26T09:30:00.000Z",
"created_at": "2021-02-15T16:14:19.000Z",
"updated_at": "2021-02-15T16:14:19.000Z",
"organization_id": 1
}
URL Parameters
Parameter | Description |
---|---|
id | The id of the book to retrieve. |
Create Booking
HTTP Request
With this request you can create a new book.
POST https://api.talentgarden.com/v1/bookings
const axios = require('axios');
const url = `https://api.talentgarden.com/v1/bookings/64`
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
const data = {
resource_id: 24,
from: "2021-03-09T08:30:00.000Z",
to: "2021-03-09T09:30:00.000Z",
organization: 1,
}
axios.post(url, config)
.then((response) => { console.log(response) })
.catch((error) => { console.log(error) })
The above command returns JSON structured like this:
{
"id": 75,
"resource_id": "24",
"user_id": "11152",
"from": "2021-03-09T08:30:00.000Z",
"to": "2021-03-09T09:30:00.000Z",
"created_at": "2021-02-15T17:31:26.000Z",
"updated_at": "2021-02-15T17:31:26.000Z",
"organization_id": 1
}
Body Parameters
Parameter | Description |
---|---|
resource_id | The id of the resource to book. |
from | booking start date and time. |
to | booking finish date and time. |
organization_id | From which organization you do the booking. |
Delete Booking by ID
HTTP Request
With this request you can delete a book with specific id.
DELETE https://api.talentgarden.com/v1/bookings/:id
const axios = require('axios').default;
const url = `https://api.talentgarden.com/v1/bookings`
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
axios.delete(url, config)
.then((response) => { console.log(response) })
.catch((error) => { console.log(error) })
URL Parameters
Parameter | Description |
---|---|
id | The id of the book to delete. |
Campuses
Campus Object
An booking object contain all of information of a campus.
Filed | Type | Description |
---|---|---|
id |
integer | Identify the campus. |
code |
string | Campus code. |
name |
string | Name of the campus. |
email |
string | Email of the campus. |
address |
string | Address. |
city |
string | City. |
state |
string | State. |
currency |
string | The currency of the campus. |
square_meters |
json | Square Meters. |
desks |
boolean | Status of campus |
zip |
string | Type of campus |
created_at |
timestamp with timezone | Creation date |
updated_at |
timestamp with timezone | Updated date |
latitude |
double | Latitude campus |
longitude |
double | Longitude of campuses |
Get Campuses
HTTP Campuses Request
With this request you can get the information about the campuses
GET https://api.talentgarden.com/v1/campuses
curl "https://api.talentgarden.com/v1/campuses" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
"data": [
{
"id": 59,
"code": "BCT",
"name": "Talent Garden Barcelona Turrò",
"email": "barcelona@talentgarden.com",
"address": "Carrer Ramón Turró 169-A",
"city": "Barcelona",
"state": "CT",
"country": "ES",
"currency": "EUR",
"phone": "+34910780234",
"square_meters": 3010,
"desks": 326,
"zip": "08005",
"created_at": "2021-02-11T11:36:14.416Z",
"updated_at": "2021-02-11T11:36:14.416Z",
"latitude": 41.3986556,
"longitude": 2.2010949,
"sender_name": "TAGBarca",
"short_name": "Barcellona"
},
{
"id": 23,
"code": "BSC",
"name": "Talent Garden Brescia",
"email": "brescia@talentgarden.it",
"address": "Via Cipro 66",
"city": "Brescia",
"state": "BS",
"country": "IT",
"currency": "EUR",
"phone": "+390305537045",
"square_meters": 700,
"desks": 45,
"zip": "25124",
"created_at": "2014-10-09T12:18:53.000Z",
"updated_at": "2019-12-04T10:50:05.000Z",
"latitude": 45.5246252,
"longitude": 10.2102432,
"sender_name": "TAGBrescia",
"short_name": "Brescia"
},
...
]
}
Query Campuses Parameters
You can use this parameter to filter the bookings or you can sort them.
Parameter | example | Description |
---|---|---|
code |
RMO | Return only campus with specified code . |
Get Campuses by ID
HTTP Campuses Request
With this request you can get all information about specific campus.
GET https://api.talentgarden.com/v1/campuses/:id
curl "https://api.talentgarden.com/v1/campuses/48" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id": 48,
"code": "WIL",
"name": "Talent Garden Vienna Liechtensteinstraße",
"email": "vienna@talentgarden.at",
"address": "Liechtensteinstraße 111-115",
"city": "Wien",
"state": "Wien",
"country": "AT",
"currency": "EUR",
"phone": "+4312058183",
"square_meters": 5000,
"desks": 420,
"zip": "1090",
"created_at": "2018-11-28T17:14:57.000Z",
"updated_at": "2020-03-06T15:35:48.000Z",
"latitude": 48.2284578,
"longitude": 16.3558698,
"sender_name": "TAGWien",
"short_name": "Wien"
}
Users
User Object
An user object contain all of information of a user.
Filed | Type | Description |
---|---|---|
id |
integer | Identify the user. |
auth0_id |
string | Identify the user into auth0 system. |
first_name |
string | The first name of the user. |
last_name |
string | The last name of the user. |
full_name |
string | The full name of the user. |
email |
string | The email of the user. |
phone_prefix |
string | The phone prefix of the user's number. |
phone_number |
integer | The phone number of th user. |
created_at |
timestamp with timezone | Date and time of user creation. |
update_at |
timestamp with timezone | Date and time of last update data user. |
date_of_birth |
date | Date of birthday of the user. |
deleted |
boolean | True if the user was deleted. |
last_access |
date | Date of last access. |
last_access_campus |
integer | Identify the campus. |
Get Users
HTTP Users Request
With this request you can get all information about the all users.
Only admin can use this endpoint
GET https://api.talentgarden.com/v1/users
curl "https://api.talentgarden.com/v1/users" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
{
"id":"22",
"auth0_id":"auth0|123456789012345667",
"first_name":"Mario",
"last_name":"Rossi",
"full_name":"Mario Rossi",
"email":"mariorossi@tag.com",
"phone_prefix":"+39",
"phone_number":"2235641240",
"created_at":"2014-10-08T10:20:10.000Z",
"updated_at":"2020-11-16T12:15:42.889Z",
"date_of_birth":"1984-08-28T00:00:00.000Z",
"deleted":false,
"last_access":"2014-10-08T10:20:10.000Z",
"last_access_campus":"12",
},
...
]
}
Query Users Parameters
You can use this parameter to filter the users or you can sort them.
Parameter | example | Description |
---|---|---|
email |
mariorossi@tag.it | Return only user with specified email . |
full_name |
mario rossi | Return only user with specified full_name . |
sort_by |
Return all bookings sorted by email. | |
sort_by_desc |
full_name | Return all bookings sorted by full name in descending order. |
Get User by ID
HTTP Users Request
With this request you can get all information about user selected by id.
GET https://api.talentgarden.com/v1/users/22
curl "https://api.talentgarden.com/v1/users/22" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id":"22",
"auth0_id":"auth0|123456789012345667",
"first_name":"Mario",
"last_name":"Rossi",
"full_name":"Mario Rossi",
"email":"mariorossi@tag.com",
"phone_prefix":"+39",
"phone_number":"2235641240",
"created_at":"2014-10-08T10:20:10.000Z",
"updated_at":"2020-11-16T12:15:42.889Z",
"date_of_birth":"1984-08-28T00:00:00.000Z",
"last_access":"2014-10-08T10:20:10.000Z",
"last_access_campus":"12",
}
Get My User
HTTP Users Request
With this request you can get all information about own user.
GET https://api.talentgarden.com/v1/users/me
curl "https://api.talentgarden.com/v1/users/me" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id":"22",
"auth0_id":"auth0|123456789012345667",
"first_name":"Mario",
"last_name":"Rossi",
"full_name":"Mario Rossi",
"email":"mariorossi@tag.com",
"phone_prefix":"+39",
"phone_number":"2235641240",
"created_at":"2014-10-08T10:20:10.000Z",
"updated_at":"2020-11-16T12:15:42.889Z",
"date_of_birth":"1984-08-28T00:00:00.000Z",
"last_access_at": "1970-01-20T03:08:08.323Z",
"last_access_campus": 59
}
Create User
HTTP Users Request
With this request you can insert a new user.
POST https://api.talentgarden.com/v1/users
Body User Parameters
You can use this parameter to create new user.
Parameter | example |
---|---|
first_name |
mario |
last_name |
rossi |
email |
mariorossi@tag.it |
phone_prefix |
+39 |
phone_number |
3391029463 |
date_of_birth |
1995-10-10 |
Attention
The fields first_name, last_name, email, phone_prefix and phone_number are mandatory.
Update User
HTTP Users Request
With this request you can get all information about specific user.
PATCH https://api.talentgarden.com/v1/users/:id
curl -X PATCH "https://api.talentgarden.com/v1/users/:id" \
-H "Authorization: Bearer YOUR_JWT"
Body Users Parameters
You can use this parameter to update data of specific user.
Parameter | example |
---|---|
first_name |
mario |
last_name |
rossi |
email |
mariorossi@tag.it |
phone_prefix |
+39 |
phone_number |
3391029463 |
password |
123456#„«#“‘#789 |
profile_image |
file.jpg |
Attention
To update user's passwords it is necessary that the email field is not present.
To update your profile image you need to use form-data payload.
Create Device
HTTP Users Request
With this request you can insert new user's device.
POST https://api.talentgarden.com/v1/users/devices
curl -x POST "https://api.talentgarden.com/v1/users/devices" \
-H "Authorization: Bearer YOUR_JWT"
--data {"token": "sdkalsfkhalsfhjalncaukeab","manufacturer": "OnePlus","mac_address": "P1:28:57:13:J2:C4","model": "ONEPLUS A5000","product": "OnePlus5", "platform": "Android"}
Body Device Parameters
You can use this parameter to insert data of specific device.
Parameter | example |
---|---|
token |
sdkalsfkhalsfhjalncaukeabkcjabfkauevbaevkauefkaubvclaevbleaivbalv, |
manufacturer |
OnePlus |
mac_address |
XX:XS:11:11:X1:X1 |
model |
ONEPLUS A5000 |
product |
OnePlus5 |
platform |
Android |
The mac_address parameter is mandatory
Get Devices
HTTP Devices Request
With this request you can get all information about own devices.
GET https://api.talentgarden.com/v1/users/:id/devices
curl "https://api.talentgarden.com/v1/users/00000/devices" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns Array structured like this:
[
{
"id": 1,
"user_id": "00000",
"token": "sdkalsfkhalsfhjalncaukeabkcjv",
"manufacturer": "Iphone XX",
"mac_address": "c6:00:00:00:f2:c4",
"model": "XX",
"product": "OnePlus5",
"platform": "IOS",
"created_at": "2021-04-28T07:59:04.146Z"
}
]
Get Roles
HTTP Devices Request
With this request you can get all information about your roles.
GET https://api.talentgarden.com/v1/users/me/roles
curl "https://api.talentgarden.com/v1/users/me/roles" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns Array structured like this:
{
"data": [
{
"organization_id": "1",
"role": "member"
},
{
"organization_id": "456",
"role": "admin"
},
{
"organization_id": "204",
"role": "owner"
}
]
}
Resources
Resource Object
An booking object contain all of information of a resource.
Filed | Type | Description |
---|---|---|
campus_id |
integer | Identify the campus of the resource. |
image_url |
string | Identify the url of image. |
capacity |
integer | Number of seats in the resource. |
name |
string | Name of the resource. |
description |
string | Description of the resource. |
created_at |
timestamp with timezone | Date and time of book creation. |
update_at |
timestamp with timezone | Date and time of last update. |
floor |
integer | Floor number |
privacy_level |
string | level of privacy inside the resource |
services |
json | Features resource |
available |
boolean | Status of resource |
type |
string | Type of resource |
organizations |
array | Which organization can see get the resources |
purchase_url |
string | url where to buy |
Get Resources
HTTP Resources Request
With this request you can get the information about the resources, you need to be part at least one organization.
Get your organization id from this get roles section.
Return only available resources for your organization
GET https://api.talentgarden.com/v1/organizations/:id/resources
curl "https://api.talentgarden.com/v1/organizations/1/resources" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
{
"id": "119",
"campus_id": 53,
"image_url": null,
"capacity": 8,
"name": "Meeting Room Mezzanine",
"description": null,
"created_at": "2019-06-06T11:55:40.000Z",
"updated_at": "2021-02-12T11:02:44.496Z",
"floor": 0,
"privacy_level": "Private",
"services": {
"natural_light": false,
"hdmi_cable": true,
"air_conditioned": false,
"socket": true,
"whiteboard": false,
"monitor": "43"
},
"available": true,
"type": "meeting_room",
"organizations": [],
"purchase_url": null
},
{
"id": "120",
"campus_id": 53,
"image_url": null,
"capacity": 5,
"name": "Meeting Room Floor 2",
"description": null,
"created_at": "2019-06-06T12:01:44.000Z",
"updated_at": "2021-02-12T11:02:44.496Z",
...
},
{
"id": "121",
"campus_id": 53,
"image_url": null,
"capacity": 5,
"name": "Meeting Room Floor 3",
"description": null,
"created_at": "2019-06-06T12:08:11.000Z",
"updated_at": "2021-02-12T11:02:44.496Z",
...
}
]
}
Query Resources Parameters
You can use this parameter to filter the bookings or you can sort them.
Parameter | example | Description |
---|---|---|
campus_id |
53 | Return only resources with specified campus_id . |
capacity |
4 | Return only resources with capacity 4. |
name |
MR01 | Return only resources with name equal MR01. |
floor |
2 | Return only resources with floor equal to 2. |
privacy_level |
not_very_private | Return only resources with privacy_level 'not very private'. |
type |
meeting_room | Return only resources with type meeting_room. |
Get Resources by ID
HTTP Resources Request
With this request you can get all information about specific book.
GET https://api.talentgarden.com/v1/organizations/:id/resources/:resourceId
curl "https://api.talentgarden.com/v1/organizations/1/resources/119" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id": "119",
"campus_id": 53,
"image_url": null,
"capacity": 8,
"name": "Meeting Room Mezzanine",
"description": null,
"created_at": "2019-06-06T11:55:40.000Z",
"updated_at": "2021-02-12T11:02:44.496Z",
"floor": 0,
"privacy_level": "Private",
"services": {
"natural_light": "FALSE",
"hdmi_cable": "FALSE",
"air_conditioned": "TRUE",
"socket": "TRUE",
"whiteboard": "FALSE",
"monitor": "43"
},
"available": true,
"type": "meeting_room",
"organizations": [],
"purchase_url": null
}
URL Request Parameters
Parameter | Description |
---|---|
id | The id of your organization. |
resourceId | The resource id that you want. |
Organizations
Organization Object
An organization object contain all of information of a organization.
Filed | Type | Description |
---|---|---|
id |
integer | Identify the organization. |
hs_object_id |
integer | Identify the organization into Hubspot system. |
netsuite_id |
string | Identify the organization into Netsuite system. |
name |
string | The name of the organization. |
address |
string | The address of the organization. |
country |
string | The country of the organization. |
state |
string | The state of the organization. |
city |
string | The city of the organization. |
phone_prefix |
string | The phone prefix of the organization's number. |
phone_number |
integer | The phone number of the organization. |
billing_email |
string | Billing email. |
pec_email |
string | Pec email. |
sdi_code |
string | The SdI is a public legal platform for issuing, transmitting and storing invoices. |
postal_code |
string | A postal code is a series of letters for the purpose of sorting mail. |
vat |
string | Vat number. |
fiscal_code |
string | Fiscal code. |
linkedin_url |
string | Linkedin url |
created_at |
timestamp with timezone | Creation date |
updated_at |
timestamp with timezone | Updated date |
expires_at |
timestamp with timezone | Expired date |
type |
string | Which kind of organization |
Get Organization
HTTP Organization Request
With this request you can get all information about own organizations.
Only admin or owner of organization can use this endpoint
GET https://api.talentgarden.com/v1/organizations
Allow query parameters
Query Organizations Parameters
You can use this parameter to filter the organization or you can sort them.
Parameter |
---|
hs_object_id |
name |
address |
state |
city |
postal_code |
vat |
fiscal_code |
phone |
pec |
type |
curl "https://api.talentgarden.com/v1/organizations" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
{
"id": "1",
"hs_object_id": "7036330761",
"netsuite_id": null,
"name": "Talent Garden",
"address": "Via Ostiense 92",
"country": null,
"state": "Italy",
"city": "Milan",
"prefix_number": "+39",
"phone_number": "3339999002",
"billing_email": null,
"pec_email": null,
"code_sdi": null,
"postal_code": null,
"vat": null,
"fiscal_code": null,
"linkedin_url": null,
"type": "company",
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total_elements": 0,
"total_pages": 1
}
}
Get Organization by ID
HTTP Organization Request
With this request you can get all information about user selected by id.
Only admin or owner of organization can use this endpoint
GET https://api.talentgarden.com/v1/organizations/1
curl "https://api.talentgarden.com/v1/organizations/1" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id": "1",
"hs_object_id": "5959981987",
"netsuite_id": null,
"name": "Talent Gardens",
"address": null,
"country": null,
"state": null,
"city": null,
"phone_prefix": null,
"phone_number": null,
"billing_email": null,
"pec_email": null,
"code_sdi": null,
"postal_code": null,
"vat": null,
"fiscal_code": null,
"linkedin_url": null,
"created_at": "2022-03-04T09:21:37.525Z",
"updated_at": "2022-03-10T14:04:59.562Z",
"expires_at": null,
"type": "company",
}
Update Organization
HTTP Organizations Request
With this request you can update the organization data.
Only admin or owner of organization can use this endpoint
PATCH https://api.talentgarden.com/v1/organizations/1
curl -X PATCH "https://api.talentgarden.com/v1/organizations/1" \
-H "Authorization: Bearer YOUR_JWT"
--data {"name": "Talent Garden"}
The above command returns JSON structured like this:
{
"id": "1",
"hs_object_id": "5959981987",
"netsuite_id": null,
"name": "Talent Garden",
"address": null,
"country": null,
"state": null,
"city": null,
"phone_prefix": null,
"phone_number": null,
"billing_email": null,
"pec_email": null,
"code_sdi": null,
"postal_code": null,
"vat": null,
"fiscal_code": null,
"linkedin_url": null,
"created_at": "2022-03-04T09:21:37.525Z",
"updated_at": "2022-03-10T14:04:59.562Z",
"expires_at": null,
"type": "company",
}
Get Organization Members
HTTP Organizations Request
With this request you can get all members include in your organization.
Only admin or owner of organization can use this endpoint
GET https://api.talentgarden.com/v1/organizations/1/members
curl "https://api.talentgarden.com/v1/organizations/1/members" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
{
"id": "101",
"auth0_id": "auth0|5a373783e1ff174",
"first_name": "Alessandro",
"last_name": "Bianchi",
"full_name": "Alessandro Bianchi",
"email": "alessandro.bianchi@talentgarden.com",
"phone_prefix": "+39",
"phone_number": "3338882930",
"created_at": "2015-10-29T09:07:29.000Z",
"updated_at": "2021-07-01T14:12:37.916Z",
"last_access_at": null,
"last_access_campus": null,
"role_id": 1,
"role": "owner"
},
{
"id": "102",
"auth0_id": "auth0|5bfebb81d42c0ab6b8cb",
"first_name": "Giovanni",
"last_name": "Rossi",
"full_name": "Giovanni Rossi",
"email": "giovanni.rossi@talentgarden.com",
"phone_prefix": "+39",
"phone_number": "39123446777",
"created_at": "2018-11-28T17:00:00.000Z",
"updated_at": "2021-07-01T14:12:38.110Z",
"last_access_at": "2021-10-13T12:18:04.000Z",
"last_access_campus": 59,
"role_id": 2,
"role": "admin"
},
{
"id": "103",
"auth0_id": "auth0|5cc068de10e86693a8",
"first_name": "Luca",
"last_name": "Rossi",
"full_name": "Luca Rossi",
"email": "luca.rossi@talentgarden.com",
"phone_prefix": "+39",
"phone_number": "31203945197",
"created_at": "2019-04-24T15:46:52.000Z",
"updated_at": "2021-07-01T14:12:38.229Z",
"last_access_at": null,
"last_access_campus": null,
"role_id": 3,
"role": "member"
},
],
"pagination": {
"page": 1,
"per_page": 50,
"total_elements": 3,
"total_pages": 1
}
}
Update Organization Member Role
HTTP Organizations Request
With this request you can update the role of your members. You can choose admin or member role. The member cannot access to Connect platform, the admin have the access to Connect platform.
Only admin or owner of organization can use this endpoint
PATCH https://api.talentgarden.com/v1/organizations/1/members/:user_id
curl -X PATCH "https://api.talentgarden.com/v1/organizations/1/103" \
-H "Authorization: Bearer YOUR_JWT"
--data {"role": "admin" | "member" }
The above command returns JSON structured like this:
{
"id": "103",
"auth0_id": "auth0|5cc068de10e86693a8",
"first_name": "Luca",
"last_name": "Rossi",
"full_name": "Luca Rossi",
"email": "luca.rossi@talentgarden.com",
"phone_prefix": "+39",
"phone_number": "31203945197",
"created_at": "2019-04-24T15:46:52.000Z",
"updated_at": "2021-07-01T14:12:38.229Z",
"last_access_at": null,
"last_access_campus": null,
"role_id": 2,
"role": "admin"
},
Delete Member
HTTP Organizations Request
With this request you can remove members from your organization.
Only admin or owner of organization can use this endpoint
DELETE https://api.talentgarden.com/v1/organizations/1/members/:user_id
curl -X DELETE "https://api.talentgarden.com/v1/organizations/1/103" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id": "103",
"auth0_id": "auth0|5cc068de10e86693a8",
"first_name": "Luca",
"last_name": "Rossi",
"full_name": "Luca Rossi",
"email": "luca.rossi@talentgarden.com",
"phone_prefix": "+39",
"phone_number": "31203945197",
"created_at": "2019-04-24T15:46:52.000Z",
"updated_at": "2021-07-01T14:12:38.229Z",
"last_access_at": null,
"last_access_campus": null,
"role_id": 2,
"role": "admin"
},
Invitations
Invitation Object
An organization object contain all of information of a organization.
Filed | Type | Description |
---|---|---|
id |
integer | Identify the organization. |
organization_id |
integer | Identify the organization . |
user_id |
integer | Identify the user that create the invitation. |
email |
string | Who receive the invite. |
created_at |
timestamp with timezone | Creation date. |
sent_at |
timestamp with timezone | Sending date. |
registered_at |
timestamp with timezone | Registration date. |
status |
string | Pending/Registered. |
role_id |
integer | Role associates with the invitation. |
Get Invitation
HTTP Invitation Request
With this request you can get all information about your inviatation associate with specific organization.
Only admin or owner of organization can use this endpoint
GET https://api.talentgarden.com/v1/organizations/:id/invitations
Allow query parameters
Query Users Parameters
You can use this parameter to filter the users or you can sort them.
Parameter | example |
---|---|
status |
pending/registered |
curl "https://api.talentgarden.com/v1/organizations/1/invitations" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"data": [
{
"id": "77",
"organization_id": "1",
"user_id": "16925",
"email": "luigi.bianchi@ext.talentgarden.com",
"created_at": "2022-03-13T15:30:45.972Z",
"sent_at": "2022-03-13T15:30:49.495Z",
"registered_at": null,
"status": "pending",
"role_id": 3,
"role": "member"
},
{
"id": "79",
"organization_id": "1",
"user_id": "16925",
"email": "mario.rossi@talentgarden.com",
"created_at": "2022-03-13T16:26:13.476Z",
"sent_at": "2022-03-13T16:26:14.584Z",
"registered_at": null,
"status": "pending",
"role_id": 3,
"role": "member"
},
...
],
"pagination": {
"page": 1,
"per_page": 50,
"total_elements": 30,
"total_pages": 1
}
}
Create Invitation
HTTP Request
With this request you can create a new invitation.
Only admin or owner of organization can use this endpoint
!!!Attention!!!
If the email already exists in our database the invited contact will be automatically add to the organization
POST https://api.talentgarden.com/v1/organizations/:id/invitations
const axios = require('axios');
const url = `https://api.talentgarden.com/v1/organizations/:id/invitations`
const config = {
headers: {
accept: 'application/json',
Authorization: 'Bearer YOUR_JWT'
},
};
const data = {
role: "member",
user_id: 11412,
email: "newinvitation@test.com",
}
axios.post(url, config, data)
.then((response) => { console.log(response) })
.catch((error) => { console.log(error) })
The above command returns JSON structured like this:
{
"id": "77",
"organization_id": "1",
"user_id": "11412",
"email": "newinvitation@test.com",
"created_at": "2022-03-13T15:30:45.972Z",
"sent_at": "2022-03-13T15:30:49.495Z",
"registered_at": null,
"status": "pending",
"role_id": 3,
"role": "member"
},
Body Parameters
Parameter | Description |
---|---|
role | Role type: admin/member. |
user_id | Who creates the invitation. |
The email that receives the invite. |
Delete Invitation
HTTP Organizations Request
With this request you can remove members from your organization.
Only admin or owner of organization can use this endpoint
DELETE https://api.talentgarden.com/v1/organizations/1/invitations/:inv_id
curl -X DELETE "https://api.talentgarden.com/v1/organizations/1/77" \
-H "Authorization: Bearer YOUR_JWT"
The above command returns JSON structured like this:
{
"id": "77",
"organization_id": "1",
"user_id": "16925",
"email": "anita.kristjansdottir@ext.talentgarden.com",
"created_at": "2022-03-13T15:30:45.972Z",
"sent_at": "2022-03-13T15:30:49.495Z",
"registered_at": null,
"status": "pending",
"role_id": 3,
"role": "member"
}
Events
Event Object
An event object contain all of information of a Talent Garden event.
Filed | Type | Description |
---|---|---|
organizer_id |
integer | Identify the creator of the event. |
event_name |
string | Event name |
summary |
string | Event summary. Short summary describing the event and its purpose. |
description |
string | Event description. Description can be lengthy and have significant formatting. |
start_utc |
time-stamp | Event start, date and time. |
end_utc |
time-stamp | Event end, date and time. |
status |
string | The status of event is always live. |
online_event |
boolean | True = Specifies that the Event is online only. |
format_id |
integer | The Format id represents an Event type, for example seminar, workshop or concert. |
category_id |
integer | An overarching category that an event falls into (vertical). Examples are “Music”, and “Endurance”. |
subcategory_id |
integer | A deeper category to describe the event. |
logo_url |
string | The url of event's logo. |
url |
string | The url of event enable on eventbrite. |
locale |
string | Specifies the language of the event. |
listed |
boolean | True = Specifies that the Event is public. |
Get All Events
HTTP Request
With this request you can get all information about the new talent garden events.
GET https://api.talentgarden.net/v1/events
curl "https://api.talentgarden.net/v1/events
The above command returns JSON structured like this:
{
"data": [
{
"id": "126409725893",
"organizer_id": "2888489877",
"event_name": "Build your online course",
"summary": "Come produrre corsi online, dal più semplice al più complesso",
"description": "Come produrre corsi online, dal più semplice al più complesso",
"start_utc": "2020-11-10T17:30:00.000Z",
"end_utc": "2020-11-10T18:30:00.000Z",
"status": "live",
"online_event": true,
"format_id": 2,
"category_id": 101,
"subcategory_id": null,
"url": "https://www.eventbrite.com/e/build-your-online-course-tickets-126409725893",
"logo_url": "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F115511911%2F63152314247%2F1%2Foriginal.20191009-144842?auto=format%2Ccompress&q=75&sharp=10&s=24cc030ffd6e8830d92d84c36e285c9a",
"locale": "en_GB",
"listed": true,
"created_at": "2020-10-27T02:00:48.705Z",
"organizer_name": "Talent Garden Isola - Milano"
},
{
"id": "123482438297",
"organizer_id": "16030478315",
"event_name": "Introduction to Full Stack Development | Online Info Event",
"summary": "Do you want to dive into the world of Coding? Are you ready for a career as a Full Stack Developer?",
"description": "Do you want to dive into the world of Coding? Are you ready for a career as a Full Stack Developer?",
"start_utc": "2020-10-29T16:00:00.000Z",
"end_utc": "2020-10-29T17:00:00.000Z",
"status": "live",
"online_event": true,
"format_id": 9,
"category_id": 101,
"subcategory_id": 1004,
"url": "https://www.eventbrite.com/e/introduction-to-full-stack-development-online-info-event-registration-123482438297",
"logo_url": "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F114522263%2F385833754851%2F1%2Foriginal.20201013-151954?auto=format%2Ccompress&q=75&sharp=10&s=c3a33a5b6b3621d390c37b033590dc65",
"locale": "en_GB",
"listed": true,
"created_at": "2020-10-27T02:00:48.705Z",
"organizer_name": "Talent Garden Austria"
}
],
"pagination": {
"page": 1,
"per_page": 2,
"total_elements": 13,
"total_pages": 7
}
}
Query Parameters
You can use this parameter to filter the events or you can sort them.
Parameter | example | Description |
---|---|---|
organizer_id |
1234567890 | Return only events with specified organizer_id . |
format_id |
1 | Return only events with speecified format_id . |
category_id |
101 | Return only events with speecified category_id . |
sortby |
organizer_id | Return all events sorted by the fields of object. |
Pagination
It is almost never a good idea to return all resources of your database at once. Consequently, you should provide a pagination mechanism. In this case this mechanism is this json object.
{
"pagination": {
"page": 1,
"per_page": 50,
"total_elements": 2,
"total_pages": 1
}
}
It's possible to use the parameters per_page and page, which are well-known from databases.
Filed | Type | Description |
---|---|---|
per_page |
integer | The number of elements in one page. |
page |
integer | The current page. |
total_elements |
integer | Total number of events. |
total_pages |
integer | Total number of pages. |
Errors
When an error occurs during an API request, you will receive:
- An HTTP error status (in the 400-500 range)
- A JSON response containing more information about the error
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The resource requested is hidden for administrators only. |
404 | Not Found -- The specified resource could not be found. |
405 | Method Not Allowed -- You tried to access a resources with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
429 | Too Many Requests -- You're requesting too many Events! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Error Messages
A typical error response is a JSON with many fields.
curl "https://api.talentgarden.com/v1/users?page=asdf&per_page=poasdf
The above command returns JSON structured like this:
{
"message": "Invalid parameters",
"details": [
{
"value": "poasdf",
"msg": "Must Be An Integer",
"param": "per_page",
"location": "query"
},
{
"value": "asdf",
"msg": "Must Be An Integer",
"param": "page",
"location": "query"
}
]
}
Errors fields | Meaning |
---|---|
message | Error description. |
details | Object with more information |
code | Id to identified a spacial error, could not be present |