The skill object
Every skill record carries these fields in this order, after object, which is always "skill".
| Field | Type |
|---|---|
id | integer |
name | string, up to 255 characters |
Example
{
"object": "skill",
"id": 42,
"name": "Example name"
} List skills
Parameters
| Parameter | In | Description |
|---|---|---|
limit | query | Records per page, 1 to 1000 (default 100). |
offset | query | Records to skip (default 0). |
Returns
A list envelope of skill records (see Pagination).
Request
curl "https://www.bizstim.com/api/v1/skills" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"<?php
$ch = curl_init('https://www.bizstim.com/api/v1/skills');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_API_KEY', 'Accept: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);const response = await fetch('https://www.bizstim.com/api/v1/skills', {
headers: { 'X-API-KEY': 'YOUR_API_KEY', 'Accept': 'application/json' }
});
const data = await response.json();Response
{
"object": "list",
"total": 2,
"limit": 100,
"offset": 0,
"has_more": false,
"data": [
{
"object": "skill",
"id": 42,
"name": "Example name"
},
{
"object": "skill",
"id": 43,
"name": "Example name"
}
]
} Retrieve a skill
Parameters
| Parameter | In | Description |
|---|---|---|
id | path | The record's id. |
Returns
One skill record, or 404 not_found when no record with that id exists on your account.
Request
curl "https://www.bizstim.com/api/v1/skills/42" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"<?php
$ch = curl_init('https://www.bizstim.com/api/v1/skills/42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_API_KEY', 'Accept: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);const response = await fetch('https://www.bizstim.com/api/v1/skills/42', {
headers: { 'X-API-KEY': 'YOUR_API_KEY', 'Accept': 'application/json' }
});
const data = await response.json();Response
{
"object": "skill",
"id": 42,
"name": "Example name"
} Create a skill
Request body
A JSON object (Content-Type: application/json) with these fields.
| Field | Type | Required | Description |
|---|---|---|---|
name | string, up to 255 | yes | The skill name. HTML is cleaned on save; names do not have to be unique. |
Returns
201 with the new skill record. Practitioners and services are tagged with skills in the app. 400 invalid_request names the field to fix.
Request
curl -X POST "https://www.bizstim.com/api/v1/skills" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Algebra"
}'<?php
$ch = curl_init('https://www.bizstim.com/api/v1/skills');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "Algebra"
}',
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_API_KEY', 'Accept: application/json', 'Content-Type: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);const response = await fetch('https://www.bizstim.com/api/v1/skills', {
method: 'POST',
headers: { 'X-API-KEY': 'YOUR_API_KEY', 'Accept': 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "Algebra"
})
});
const data = await response.json();Response (201)
{
"object": "skill",
"id": 42,
"name": "Example name"
} Rename a skill
Parameters
| Parameter | In | Description |
|---|---|---|
id | path | The record's id. |
Request body
A JSON object (Content-Type: application/json) with these fields.
| Field | Type | Required | Description |
|---|---|---|---|
name | string, up to 255 | yes | The new name (cannot be emptied). |
Returns
200 with the updated skill record. Every practitioner and service tagged with the skill keeps it. 400 invalid_request; 404 not_found.
Request
curl -X PATCH "https://www.bizstim.com/api/v1/skills/42" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Algebra 1"
}'<?php
$ch = curl_init('https://www.bizstim.com/api/v1/skills/42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"name": "Algebra 1"
}',
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_API_KEY', 'Accept: application/json', 'Content-Type: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);const response = await fetch('https://www.bizstim.com/api/v1/skills/42', {
method: 'PATCH',
headers: { 'X-API-KEY': 'YOUR_API_KEY', 'Accept': 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "Algebra 1"
})
});
const data = await response.json();Response
{
"object": "skill",
"id": 42,
"name": "Example name"
} Delete a skill
Parameters
| Parameter | In | Description |
|---|---|---|
id | path | The record's id. |
Returns
200 with {"id", "object": "skill", "deleted": true}. As in the app, the skill is removed for good and taken off every practitioner and service tagged with it. 404 not_found.
Request
curl -X DELETE "https://www.bizstim.com/api/v1/skills/42" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"<?php
$ch = curl_init('https://www.bizstim.com/api/v1/skills/42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_API_KEY', 'Accept: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);const response = await fetch('https://www.bizstim.com/api/v1/skills/42', {
method: 'DELETE',
headers: { 'X-API-KEY': 'YOUR_API_KEY', 'Accept': 'application/json' }
});
const data = await response.json();Response
{
"id": 42,
"object": "skill",
"deleted": true
}