Introduction
API documentation for developers
This documentation aims to provide all the information you need to work with the Smarter Launch API.
Base URL
https://staging.api.smarterlaunch.com/
Authenticating requests
Authenticate requests to this API's endpoints by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
Our API is currently not available for external access outside of the Smarter Launch application.
App Data
API for app data such as: countries, states, roles, statuses, etc.
Application Settings.
requires authentication
Show the list of application data: [roles, company_locations, statuses, countries[states], client_version]
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/app-data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/app-data',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/app-data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Automation
API for Automation
List
requires authentication
Shows the list of Automations with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/automations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created Automation.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"type\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"actions\": [
\"fugiat\"
],
\"filters\": [
\"perspiciatis\"
],
\"triggers\": [
\"modi\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'type' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'actions' => [
'fugiat',
],
'filters' => [
'perspiciatis',
],
'triggers' => [
'modi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"type": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"actions": [
"fugiat"
],
"filters": [
"perspiciatis"
],
"triggers": [
"modi"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Display the specified Automation.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Modify the specified Automation.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"type\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"actions\": [
\"et\"
],
\"filters\": [
\"et\"
],
\"triggers\": [
\"eligendi\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'type' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'actions' => [
'et',
],
'filters' => [
'et',
],
'triggers' => [
'eligendi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"type": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"actions": [
"et"
],
"filters": [
"et"
],
"triggers": [
"eligendi"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Perform patches for the specified Automation.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"type\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"actions\": [
\"dolorum\"
],
\"filters\": [
\"sit\"
],
\"triggers\": [
\"consequatur\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'type' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'actions' => [
'dolorum',
],
'filters' => [
'sit',
],
'triggers' => [
'consequatur',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"type": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"actions": [
"dolorum"
],
"filters": [
"sit"
],
"triggers": [
"consequatur"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified Automation.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/automations/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Category
API for Category
List
requires authentication
Shows the list of Categories with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/categories" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/categories',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created Category.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/categories" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"category_group\": \"SERVICE_PLAN\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/categories',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'category_group' => 'SERVICE_PLAN',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"category_group": "SERVICE_PLAN"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Display the specified Category.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Modify the specified Category.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"category_group\": \"DRAWING_SYMBOL\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'category_group' => 'DRAWING_SYMBOL',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"category_group": "DRAWING_SYMBOL"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Perform patches for the specified Category.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Small Pests\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"category_group\": \"SERVICE_PLAN\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Small Pests',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'category_group' => 'SERVICE_PLAN',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Small Pests",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"category_group": "SERVICE_PLAN"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified Category.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company
API for company details
List / Fetch.
requires authentication
Shows the list of company or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store company logo.
requires authentication
This endpoint lets company to upload or update their logo.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "image_url=@/tmp/phpYe3WRv"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/image',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'image_url',
'contents' => fopen('/tmp/phpYe3WRv', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('image_url', document.querySelector('input[name="image_url"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update Company
requires authentication
This endpoint lets user to update a company.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Smarter Launch\",
\"phone\": \"5554448888\",
\"email\": \"hello@smarterlaunch.com\",
\"address1\": \"\'123 Smarter Launch Way\'\",
\"address2\": \"\'Suite 101\'\",
\"city\": \"Queen Creek\",
\"country_state_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"postal_code\": \"85410\",
\"latitude\": \"23.0396\",
\"longitude\": \"72.566\",
\"primary_color\": \"#009CFF\",
\"secondary_color\": \"#FFFFFF\",
\"custom_settings\": [
\"fugit\"
],
\"settings\": {
\"available_integration_uuids\": [
\"exercitationem\"
]
},
\"image_url\": \"vero\",
\"company_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"description\": \"We are helping take your business to the next level. Hop in!\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Smarter Launch',
'phone' => '5554448888',
'email' => 'hello@smarterlaunch.com',
'address1' => '\'123 Smarter Launch Way\'',
'address2' => '\'Suite 101\'',
'city' => 'Queen Creek',
'country_state_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'postal_code' => '85410',
'latitude' => '23.0396',
'longitude' => '72.566',
'primary_color' => '#009CFF',
'secondary_color' => '#FFFFFF',
'custom_settings' => [
'fugit',
],
'settings' => [
'available_integration_uuids' => [
'exercitationem',
],
],
'image_url' => 'vero',
'company_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'description' => 'We are helping take your business to the next level. Hop in!',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Smarter Launch",
"phone": "5554448888",
"email": "hello@smarterlaunch.com",
"address1": "'123 Smarter Launch Way'",
"address2": "'Suite 101'",
"city": "Queen Creek",
"country_state_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"postal_code": "85410",
"latitude": "23.0396",
"longitude": "72.566",
"primary_color": "#009CFF",
"secondary_color": "#FFFFFF",
"custom_settings": [
"fugit"
],
"settings": {
"available_integration_uuids": [
"exercitationem"
]
},
"image_url": "vero",
"company_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"description": "We are helping take your business to the next level. Hop in!"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch Company
requires authentication
This endpoint lets user to update a company.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Smarter Launch\",
\"phone\": \"5554448888\",
\"email\": \"hello@smarterlaunch.com\",
\"address1\": \"\'123 Smarter Launch Way\'\",
\"address2\": \"\'Suite 101\'\",
\"city\": \"Queen Creek\",
\"country_state_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"postal_code\": \"85410\",
\"latitude\": \"23.0396\",
\"longitude\": \"72.566\",
\"primary_color\": \"#009CFF\",
\"secondary_color\": \"#FFFFFF\",
\"custom_settings\": [
\"sint\"
],
\"settings\": {
\"available_integration_uuids\": [
\"molestiae\"
]
},
\"website_url\": \"http:\\/\\/www.ferry.com\\/quia-deleniti-tempore-fugit-nobis-ut-vero\",
\"google_my_business_listing\": \"http:\\/\\/www.schinner.com\\/cum-enim-fugiat-corporis-ipsa-odit-et-dignissimos-eius\",
\"image_url\": \"tenetur\",
\"company_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"description\": \"We are helping take your business to the next level. Hop in!\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Smarter Launch',
'phone' => '5554448888',
'email' => 'hello@smarterlaunch.com',
'address1' => '\'123 Smarter Launch Way\'',
'address2' => '\'Suite 101\'',
'city' => 'Queen Creek',
'country_state_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'postal_code' => '85410',
'latitude' => '23.0396',
'longitude' => '72.566',
'primary_color' => '#009CFF',
'secondary_color' => '#FFFFFF',
'custom_settings' => [
'sint',
],
'settings' => [
'available_integration_uuids' => [
'molestiae',
],
],
'website_url' => 'http://www.ferry.com/quia-deleniti-tempore-fugit-nobis-ut-vero',
'google_my_business_listing' => 'http://www.schinner.com/cum-enim-fugiat-corporis-ipsa-odit-et-dignissimos-eius',
'image_url' => 'tenetur',
'company_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'description' => 'We are helping take your business to the next level. Hop in!',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Smarter Launch",
"phone": "5554448888",
"email": "hello@smarterlaunch.com",
"address1": "'123 Smarter Launch Way'",
"address2": "'Suite 101'",
"city": "Queen Creek",
"country_state_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"postal_code": "85410",
"latitude": "23.0396",
"longitude": "72.566",
"primary_color": "#009CFF",
"secondary_color": "#FFFFFF",
"custom_settings": [
"sint"
],
"settings": {
"available_integration_uuids": [
"molestiae"
]
},
"website_url": "http:\/\/www.ferry.com\/quia-deleniti-tempore-fugit-nobis-ut-vero",
"google_my_business_listing": "http:\/\/www.schinner.com\/cum-enim-fugiat-corporis-ipsa-odit-et-dignissimos-eius",
"image_url": "tenetur",
"company_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"description": "We are helping take your business to the next level. Hop in!"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Remove company logo.
requires authentication
Only self can remove his logo.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/logo" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/logo',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/logo"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get settings JSON file URL
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/settings-json" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"settings_name\": \"odio\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/settings-json',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'settings_name' => 'odio',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/settings-json"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"settings_name": "odio"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
POST Upload Base64 files to S3
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/upload-base64" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
\"at\"
],
\"deleteItems\": [
\"est\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/upload-base64',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'items' => [
'at',
],
'deleteItems' => [
'est',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/upload-base64"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
"at"
],
"deleteItems": [
"est"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
PATCH api/v1/companies/{company_uuid}/update-limit/{entity}
requires authentication
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/update-limit/ut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/update-limit/ut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/update-limit/ut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Field Group
API for Company field group details
List
requires authentication
Shows the list of company custom field groups with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single company custom field group.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/tempora" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/tempora',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/tempora"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created company custom field group.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"delectus\",
\"assignment\": \"alias\",
\"company_custom_fields\": [
\"est\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'delectus',
'assignment' => 'alias',
'company_custom_fields' => [
'est',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "delectus",
"assignment": "alias",
"company_custom_fields": [
"est"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a company custom field group.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/vero" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"est\",
\"assignment\": \"reprehenderit\",
\"company_custom_fields\": [
\"molestiae\"
],
\"deleted_custom_field_uuids\": [
\"odit\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/vero',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'est',
'assignment' => 'reprehenderit',
'company_custom_fields' => [
'molestiae',
],
'deleted_custom_field_uuids' => [
'odit',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/vero"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "est",
"assignment": "reprehenderit",
"company_custom_fields": [
"molestiae"
],
"deleted_custom_field_uuids": [
"odit"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company custom field group.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/quos" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dicta\",
\"assignment\": \"dolorem\",
\"company_custom_fields\": [
\"atque\"
],
\"deleted_custom_field_uuids\": [
\"suscipit\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/quos',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'dicta',
'assignment' => 'dolorem',
'company_custom_fields' => [
'atque',
],
'deleted_custom_field_uuids' => [
'suscipit',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/quos"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dicta",
"assignment": "dolorem",
"company_custom_fields": [
"atque"
],
"deleted_custom_field_uuids": [
"suscipit"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a company custom field group.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/ea" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/ea',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-field-groups/ea"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company File
API for Company File
Store
requires authentication
Upload a file into a company
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/files" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=aut" \
--form "description=quo" \
--form "directory=proposal-template" \
--form "type=document" \
--form "fileUpload=@/tmp/phpwHh0Uz"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/files',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'aut'
],
[
'name' => 'description',
'contents' => 'quo'
],
[
'name' => 'directory',
'contents' => 'proposal-template'
],
[
'name' => 'type',
'contents' => 'document'
],
[
'name' => 'fileUpload',
'contents' => fopen('/tmp/phpwHh0Uz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/files"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'aut');
body.append('description', 'quo');
body.append('directory', 'proposal-template');
body.append('type', 'document');
body.append('fileUpload', document.querySelector('input[name="fileUpload"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a file from a company
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/files" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file_url\": \"dolores\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/files',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'file_url' => 'dolores',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/files"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file_url": "dolores"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Company Integration
API for Company Integration
Generic handler for company integration actions
requires authentication
If the method exists within the CompanyIntegrationController, it will be called, otherwise it will be passed to the integration type if the method exists there.
If the endpoint is a no-auth endpoint, we will allow it to be executed without going through the auth middleware. This is useful for endpoints that are called by customers that aren't logged in. The endpoint must be explicitly defined to be a no-auth endpoint in the integration type.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/suscipit/ut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/suscipit/ut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/suscipit/ut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Generic handler for integration type actions
requires authentication
it will be passed to the integration type if the method exists there.
If the endpoint is a no-auth endpoint, we will allow it to be executed without going through the auth middleware. This is useful for endpoints that are called by customers that aren't logged in. The endpoint must be explicitly defined to be a no-auth endpoint in the integration type.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/integration-types/1/delectus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/integration-types/1/delectus',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/integration-types/1/delectus"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of integrations for a company
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Shows a single item of integrations for a company
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/amet" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/amet',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/amet"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Create a company integration with empty credential values
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"integration_type_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'integration_type_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"integration_type_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
This endpoint updates the company integration and triggers the sync process (if applicable) if the data is verified and the status is set to active.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/maiores" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"credentials\": [
\"et\"
],
\"status_uuid\": \"doloremque\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/maiores',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'credentials' => [
'et',
],
'status_uuid' => 'doloremque',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/maiores"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"credentials": [
"et"
],
"status_uuid": "doloremque"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
This endpoint patch the company integration and triggers the sync process if the data is verified and the status is set to active.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/quis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"credentials\": [
\"ad\"
],
\"status_uuid\": \"minus\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/quis',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'credentials' => [
'ad',
],
'status_uuid' => 'minus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/quis"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"credentials": [
"ad"
],
"status_uuid": "minus"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This endpoint allows user to delete a Company Integration.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/vitae" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/vitae',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/integrations/vitae"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List Integration Types
requires authentication
Shows the list of integration types available for a company.
Note: Only administrators have access to certain integration types.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/integrations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/integrations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/integrations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Location
API for company locations
List
requires authentication
Shows the list of locations with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/locations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Shows the detail of a specific company location.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/dolores" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"withTemplates\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/dolores',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'withTemplates' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/dolores"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"withTemplates": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
This endpoint lets user to create single record using uuid.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Phoenix Metro Area\",
\"description\": \"We do amazing things here.\",
\"phone\": \"5554443333\",
\"email\": \"hello@smarterlaunch.com\",
\"address1\": \"\'123 Smarter Launch Way\'\",
\"address2\": \"\'Suite 101\'\",
\"city\": \"Queen Creek\",
\"country_state_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"postal_code\": \"85410\",
\"latitude\": \"23.0396\",
\"longitude\": \"72.566\",
\"enable_overrides\": true,
\"license_number\": \"lc-123456\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Phoenix Metro Area',
'description' => 'We do amazing things here.',
'phone' => '5554443333',
'email' => 'hello@smarterlaunch.com',
'address1' => '\'123 Smarter Launch Way\'',
'address2' => '\'Suite 101\'',
'city' => 'Queen Creek',
'country_state_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'postal_code' => '85410',
'latitude' => '23.0396',
'longitude' => '72.566',
'enable_overrides' => true,
'license_number' => 'lc-123456',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Phoenix Metro Area",
"description": "We do amazing things here.",
"phone": "5554443333",
"email": "hello@smarterlaunch.com",
"address1": "'123 Smarter Launch Way'",
"address2": "'Suite 101'",
"city": "Queen Creek",
"country_state_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"postal_code": "85410",
"latitude": "23.0396",
"longitude": "72.566",
"enable_overrides": true,
"license_number": "lc-123456"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update All
requires authentication
This endpoint lets user to update multiple record using uuids.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/updateAll" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/updateAll',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/updateAll"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Edit
requires authentication
This endpoint lets user to update single record using uuid (using PUT method).
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/quo" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Phoenix Metro Area\",
\"description\": \"We do amazing things here.\",
\"phone\": \"5554443333\",
\"email\": \"hello@smarterlaunch.com\",
\"address1\": \"\'123 Smarter Launch Way\'\",
\"address2\": \"\'Suite 101\'\",
\"city\": \"Queen Creek\",
\"country_state_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"postal_code\": \"85410\",
\"latitude\": \"23.0396\",
\"longitude\": \"72.566\",
\"enable_overrides\": true,
\"license_number\": \"lc-123456\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/quo',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Phoenix Metro Area',
'description' => 'We do amazing things here.',
'phone' => '5554443333',
'email' => 'hello@smarterlaunch.com',
'address1' => '\'123 Smarter Launch Way\'',
'address2' => '\'Suite 101\'',
'city' => 'Queen Creek',
'country_state_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'postal_code' => '85410',
'latitude' => '23.0396',
'longitude' => '72.566',
'enable_overrides' => true,
'license_number' => 'lc-123456',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/quo"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Phoenix Metro Area",
"description": "We do amazing things here.",
"phone": "5554443333",
"email": "hello@smarterlaunch.com",
"address1": "'123 Smarter Launch Way'",
"address2": "'Suite 101'",
"city": "Queen Creek",
"country_state_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"postal_code": "85410",
"latitude": "23.0396",
"longitude": "72.566",
"enable_overrides": true,
"license_number": "lc-123456"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
This endpoint lets user to update single record using uuid.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/recusandae" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Phoenix Metro Area\",
\"description\": \"We do amazing things here.\",
\"phone\": \"5554443333\",
\"email\": \"hello@smarterlaunch.com\",
\"address1\": \"\'123 Smarter Launch Way\'\",
\"address2\": \"\'Suite 101\'\",
\"city\": \"Queen Creek\",
\"country_state_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"postal_code\": \"85410\",
\"latitude\": \"23.0396\",
\"longitude\": \"72.566\",
\"enable_overrides\": true,
\"license_number\": \"lc-123456\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/recusandae',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Phoenix Metro Area',
'description' => 'We do amazing things here.',
'phone' => '5554443333',
'email' => 'hello@smarterlaunch.com',
'address1' => '\'123 Smarter Launch Way\'',
'address2' => '\'Suite 101\'',
'city' => 'Queen Creek',
'country_state_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'postal_code' => '85410',
'latitude' => '23.0396',
'longitude' => '72.566',
'enable_overrides' => true,
'license_number' => 'lc-123456',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/recusandae"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Phoenix Metro Area",
"description": "We do amazing things here.",
"phone": "5554443333",
"email": "hello@smarterlaunch.com",
"address1": "'123 Smarter Launch Way'",
"address2": "'Suite 101'",
"city": "Queen Creek",
"country_state_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"postal_code": "85410",
"latitude": "23.0396",
"longitude": "72.566",
"enable_overrides": true,
"license_number": "lc-123456"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This endpoint enables user to delete a company location
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/sapiente" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/sapiente',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/sapiente"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Integration Data
requires authentication
Get data from a 3rd party API
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/perferendis/integration-data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/perferendis/integration-data',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/locations/perferendis/integration-data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Location Custom Settings
API for company location custom settings
List
requires authentication
Shows the list of do with filter or single template page data.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"page_size\": 15,
\"sort_by\": \"title\",
\"sort_order\": \"asc\",
\"search\": \"John\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
'json' => [
'page_size' => 15,
'sort_by' => 'title',
'sort_order' => 'asc',
'search' => 'John',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"page_size": 15,
"sort_by": "title",
"sort_order": "asc",
"search": "John"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show detail of a company location setting
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/et" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/et',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/et"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Create a company location custom setting
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Services\",
\"value\": \"Pest control\",
\"company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Services',
'value' => 'Pest control',
'company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Services",
"value": "Pest control",
"company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a company location custom setting
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/eum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Services\",
\"value\": \"Pest control\",
\"company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/eum',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Services',
'value' => 'Pest control',
'company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/eum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Services",
"value": "Pest control",
"company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Deletes a company location custom setting
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/rerum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/rerum',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/custom-settings/rerum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Product
API for company product details
List
requires authentication
Shows the list of company products with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single company product.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/products/veritatis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products/veritatis',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/veritatis"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created company product.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ut\",
\"product_attributes\": {
\"attr\": \"value\"
},
\"label_image_url\": \"http:\\/\\/smarterlaunch.local\\/image1.jpg\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'ut',
'product_attributes' => [
'attr' => 'value',
],
'label_image_url' => 'http://smarterlaunch.local/image1.jpg',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ut",
"product_attributes": {
"attr": "value"
},
"label_image_url": "http:\/\/smarterlaunch.local\/image1.jpg"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a company product.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/ipsam" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"cupiditate\",
\"product_attributes\": {
\"attr\": \"value\"
},
\"label_image_url\": \"http:\\/\\/smarterlaunch.local\\/image1.jpg\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products/ipsam',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'cupiditate',
'product_attributes' => [
'attr' => 'value',
],
'label_image_url' => 'http://smarterlaunch.local/image1.jpg',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/ipsam"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "cupiditate",
"product_attributes": {
"attr": "value"
},
"label_image_url": "http:\/\/smarterlaunch.local\/image1.jpg"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company product.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/quos" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quis\",
\"product_attributes\": {
\"attr\": \"value\"
},
\"label_image_url\": \"http:\\/\\/smarterlaunch.local\\/image1.jpg\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products/quos',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'quis',
'product_attributes' => [
'attr' => 'value',
],
'label_image_url' => 'http://smarterlaunch.local/image1.jpg',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/quos"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quis",
"product_attributes": {
"attr": "value"
},
"label_image_url": "http:\/\/smarterlaunch.local\/image1.jpg"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a product.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/eveniet" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/products/eveniet',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/products/eveniet"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Symbol
API for company symbol details
List
requires authentication
Shows the list of company symbols with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single company symbol.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/animi" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/animi',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/animi"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created company symbol.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=non" \
--form "source=assumenda" \
--form "description=totam" \
--form "icon_url=http://smarterlaunch.local/image1.jpg" \
--form "company_product_uuids[]=ullam" \
--form "icon_file=@/tmp/phpRFl4uy"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'non'
],
[
'name' => 'source',
'contents' => 'assumenda'
],
[
'name' => 'description',
'contents' => 'totam'
],
[
'name' => 'icon_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'company_product_uuids[]',
'contents' => 'ullam'
],
[
'name' => 'icon_file',
'contents' => fopen('/tmp/phpRFl4uy', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'non');
body.append('source', 'assumenda');
body.append('description', 'totam');
body.append('icon_url', 'http://smarterlaunch.local/image1.jpg');
body.append('company_product_uuids[]', 'ullam');
body.append('icon_file', document.querySelector('input[name="icon_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a company symbol.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/voluptates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=et" \
--form "source=voluptates" \
--form "description=maiores" \
--form "icon_url=http://smarterlaunch.local/image1.jpg" \
--form "company_product_uuids[]=dolores" \
--form "icon_file=@/tmp/phpPVCWZx"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/voluptates',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'et'
],
[
'name' => 'source',
'contents' => 'voluptates'
],
[
'name' => 'description',
'contents' => 'maiores'
],
[
'name' => 'icon_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'company_product_uuids[]',
'contents' => 'dolores'
],
[
'name' => 'icon_file',
'contents' => fopen('/tmp/phpPVCWZx', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/voluptates"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'et');
body.append('source', 'voluptates');
body.append('description', 'maiores');
body.append('icon_url', 'http://smarterlaunch.local/image1.jpg');
body.append('company_product_uuids[]', 'dolores');
body.append('icon_file', document.querySelector('input[name="icon_file"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a company symbol.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/accusamus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=quos" \
--form "source=sed" \
--form "description=est" \
--form "icon_url=http://smarterlaunch.local/image1.jpg" \
--form "company_product_uuids[]=doloribus" \
--form "icon_file=@/tmp/php93K8eA"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/accusamus',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'quos'
],
[
'name' => 'source',
'contents' => 'sed'
],
[
'name' => 'description',
'contents' => 'est'
],
[
'name' => 'icon_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'company_product_uuids[]',
'contents' => 'doloribus'
],
[
'name' => 'icon_file',
'contents' => fopen('/tmp/php93K8eA', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/accusamus"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'quos');
body.append('source', 'sed');
body.append('description', 'est');
body.append('icon_url', 'http://smarterlaunch.local/image1.jpg');
body.append('company_product_uuids[]', 'doloribus');
body.append('icon_file', document.querySelector('input[name="icon_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company symbol.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/provident" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=aut" \
--form "source=ut" \
--form "description=ut" \
--form "icon_url=http://smarterlaunch.local/image1.jpg" \
--form "icon_file=@/tmp/php90LIry"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/provident',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'aut'
],
[
'name' => 'source',
'contents' => 'ut'
],
[
'name' => 'description',
'contents' => 'ut'
],
[
'name' => 'icon_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'icon_file',
'contents' => fopen('/tmp/php90LIry', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/provident"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'aut');
body.append('source', 'ut');
body.append('description', 'ut');
body.append('icon_url', 'http://smarterlaunch.local/image1.jpg');
body.append('icon_file', document.querySelector('input[name="icon_file"]').files[0]);
fetch(url, {
method: "PATCH",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a company symbol.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/deleniti" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/deleniti',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/symbols/deleniti"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Tax
API for Company Tax
List
requires authentication
Shows the list of taxes with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Patch Index
requires authentication
Performs specific updates for tax settings
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single tax.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/voluptatem" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/voluptatem',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/voluptatem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created tax.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"country_uuid\": \"dolorem\",
\"country_state_uuids\": [
\"est\"
],
\"name\": \"omnis\",
\"postal_codes\": 85410,
\"cities\": \"Queen Creek\",
\"rate\": \"12.0000\",
\"is_compound\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'country_uuid' => 'dolorem',
'country_state_uuids' => [
'est',
],
'name' => 'omnis',
'postal_codes' => 85410,
'cities' => 'Queen Creek',
'rate' => '12.0000',
'is_compound' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"country_uuid": "dolorem",
"country_state_uuids": [
"est"
],
"name": "omnis",
"postal_codes": 85410,
"cities": "Queen Creek",
"rate": "12.0000",
"is_compound": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a tax.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/deserunt" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"country_uuid\": \"odio\",
\"country_state_uuids\": [
\"odio\"
],
\"name\": \"voluptatem\",
\"postal_codes\": \"85410\",
\"cities\": \"Queen Creek\",
\"rate\": \"12.0000\",
\"is_compound\": true,
\"rank\": 1
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/deserunt',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'country_uuid' => 'odio',
'country_state_uuids' => [
'odio',
],
'name' => 'voluptatem',
'postal_codes' => '85410',
'cities' => 'Queen Creek',
'rate' => '12.0000',
'is_compound' => true,
'rank' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/deserunt"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"country_uuid": "odio",
"country_state_uuids": [
"odio"
],
"name": "voluptatem",
"postal_codes": "85410",
"cities": "Queen Creek",
"rate": "12.0000",
"is_compound": true,
"rank": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a tax.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/similique" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"country_uuid\": \"quaerat\",
\"country_state_uuids\": [
\"ullam\"
],
\"name\": \"velit\",
\"postal_codes\": \"85410\",
\"cities\": \"Queen Creek\",
\"rate\": \"12.0000\",
\"is_compound\": true,
\"rank\": 1
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/similique',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'country_uuid' => 'quaerat',
'country_state_uuids' => [
'ullam',
],
'name' => 'velit',
'postal_codes' => '85410',
'cities' => 'Queen Creek',
'rate' => '12.0000',
'is_compound' => true,
'rank' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/similique"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"country_uuid": "quaerat",
"country_state_uuids": [
"ullam"
],
"name": "velit",
"postal_codes": "85410",
"cities": "Queen Creek",
"rate": "12.0000",
"is_compound": true,
"rank": 1
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a tax.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/facere" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/facere',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/taxes/facere"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Company Users
API for company details
List
requires authentication
Shows the list of company users that the user has access to view.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/users?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_fields\": [
null
],
\"ignore_cached\": true,
\"should_reset_cache\": false,
\"page_size\": 15,
\"sort_by\": \"display_name\",
\"sort_order\": \"asc\",
\"search\": \"John\",
\"filter_by_status_code\": \"STATUS_ACTIVE \\/ [\\\"STATUS_ACTIVE\\\".\\\"STATUS_DISABLED\\\"]\",
\"filter_by_role_code\": \"ROLE_COMPANY_MANAGER\",
\"filter_by_company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
'json' => [
'include_fields' => [
null,
],
'ignore_cached' => true,
'should_reset_cache' => false,
'page_size' => 15,
'sort_by' => 'display_name',
'sort_order' => 'asc',
'search' => 'John',
'filter_by_status_code' => 'STATUS_ACTIVE / ["STATUS_ACTIVE"."STATUS_DISABLED"]',
'filter_by_role_code' => 'ROLE_COMPANY_MANAGER',
'filter_by_company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_fields": [
null
],
"ignore_cached": true,
"should_reset_cache": false,
"page_size": 15,
"sort_by": "display_name",
"sort_order": "asc",
"search": "John",
"filter_by_status_code": "STATUS_ACTIVE \/ [\"STATUS_ACTIVE\".\"STATUS_DISABLED\"]",
"filter_by_role_code": "ROLE_COMPANY_MANAGER",
"filter_by_company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Shows detail of a specific company user
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Send invitation to user.
requires authentication
This endpoint lets company owner to send invite to its sub-user.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"email\": \"hello@smarterlaunch.com\",
\"role_uuid\": \"45955590-4152-11ec-9c77-2181a8ee04db\",
\"company_locations\": [
\"et\"
],
\"last_name\": \"Smith\",
\"company_locations[]\": \"[\\\"45955590-4152-11ec-9c77-2181a8ee04db\\\"]\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'first_name' => 'John',
'email' => 'hello@smarterlaunch.com',
'role_uuid' => '45955590-4152-11ec-9c77-2181a8ee04db',
'company_locations' => [
'et',
],
'last_name' => 'Smith',
'company_locations[]' => '["45955590-4152-11ec-9c77-2181a8ee04db"]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"email": "hello@smarterlaunch.com",
"role_uuid": "45955590-4152-11ec-9c77-2181a8ee04db",
"company_locations": [
"et"
],
"last_name": "Smith",
"company_locations[]": "[\"45955590-4152-11ec-9c77-2181a8ee04db\"]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Resend invitation to user.
requires authentication
This endpoint lets company owner to send invite to its sub-user.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Force activate user
requires authentication
This endpoint lets admin/super admin to activate user.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3/activate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3/activate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3/activate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
This endpoint lets the user update company user.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Smith\",
\"email\": \"hello@smarterlaunch.com\",
\"role_uuid\": \"45955590-4152-11ec-9c77-2181a8ee04db\",
\"company_locations\": [
\"3245d630-24fd-11ec-accd-e397aec85c7f\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'first_name' => 'John',
'last_name' => 'Smith',
'email' => 'hello@smarterlaunch.com',
'role_uuid' => '45955590-4152-11ec-9c77-2181a8ee04db',
'company_locations' => [
'3245d630-24fd-11ec-accd-e397aec85c7f',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"last_name": "Smith",
"email": "hello@smarterlaunch.com",
"role_uuid": "45955590-4152-11ec-9c77-2181a8ee04db",
"company_locations": [
"3245d630-24fd-11ec-accd-e397aec85c7f"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
This endpoint lets the user patch company user.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"role_uuid\": \"45955590-4152-11ec-9c77-2181a8ee04db\",
\"company_locations\": [
\"3245d630-24fd-11ec-accd-e397aec85c7f\"
],
\"status_uuid\": \"a5e3143c-6842-3e80-9a6e-d161aa3250a1\",
\"last_name\": \"Smith\",
\"email\": \"hello@smarterlaunch.com\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'first_name' => 'John',
'role_uuid' => '45955590-4152-11ec-9c77-2181a8ee04db',
'company_locations' => [
'3245d630-24fd-11ec-accd-e397aec85c7f',
],
'status_uuid' => 'a5e3143c-6842-3e80-9a6e-d161aa3250a1',
'last_name' => 'Smith',
'email' => 'hello@smarterlaunch.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"role_uuid": "45955590-4152-11ec-9c77-2181a8ee04db",
"company_locations": [
"3245d630-24fd-11ec-accd-e397aec85c7f"
],
"status_uuid": "a5e3143c-6842-3e80-9a6e-d161aa3250a1",
"last_name": "Smith",
"email": "hello@smarterlaunch.com"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This endpoint allows owner to delete a user.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/users/3245d630-24fd-11ec-accd-e397aec85c7f"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Country
API for country details
List / Fetch
Shows the list of country or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/countries" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"baroda\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/countries',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'baroda',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/countries"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "baroda"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List / Fetch
Shows the list of country or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/countries/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"baroda\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/countries/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'baroda',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/countries/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "baroda"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get country states using country uuid.
Shows the list of states using country uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/countries/1/states" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/countries/1/states',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/countries/1/states"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Customer
API for customers
List
requires authentication
Shows the list of company customers that the user has access to view.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/customers?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_fields\": [
\"asperiores\"
],
\"page_size\": 15,
\"sort_by\": \"display_name\",
\"sort_order\": \"asc\",
\"search\": \"John\",
\"filter_by_company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"filter_by_statuses_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"is_with_trashed\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/customers',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
'json' => [
'include_fields' => [
'asperiores',
],
'page_size' => 15,
'sort_by' => 'display_name',
'sort_order' => 'asc',
'search' => 'John',
'filter_by_company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'filter_by_statuses_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'is_with_trashed' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_fields": [
"asperiores"
],
"page_size": 15,
"sort_by": "display_name",
"sort_order": "asc",
"search": "John",
"filter_by_company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"filter_by_statuses_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"is_with_trashed": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
This endpoint returns detail of a certain customer.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/customers/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/customers/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Create a new customer along with their primary contact and address
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/customers" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"account_name\": \"Smarter Launch LLC\",
\"customer_contact\": [
\"voluptates\"
],
\"customer_address\": [
\"id\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/customers',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'account_name' => 'Smarter Launch LLC',
'customer_contact' => [
'voluptates',
],
'customer_address' => [
'id',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"account_name": "Smarter Launch LLC",
"customer_contact": [
"voluptates"
],
"customer_address": [
"id"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update with contact and address
requires authentication
This is to update those partial customer data
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/customers/1/with-contact-address" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"account_name\": \"Smarter Launch LLC\",
\"customer_contacts\": [
{
\"uuid\": \"33616e6a-0e3d-3832-9c47-3979a73eb069\",
\"first_name\": \"ewncxquqk\",
\"last_name\": \"umgnzmenhoiyjgmbxkaqonstmwxm\",
\"phone\": \"+6331105015\",
\"is_primary\": false
}
],
\"customer_addresses\": [
{
\"uuid\": \"1a98a55d-1518-3bb5-b207-eb61a5543506\",
\"address1\": \"diblqojxhyaotulkkqe\",
\"address2\": \"wgygqxruorsoifgqzeyyyjoqlf\",
\"city\": \"fsqmfodqsuzffpgmhgjzquhduttphimixgqgr\",
\"state_uuid\": \"6d04c43f-198e-3a79-b2e7-514a4601c8bd\",
\"postal_code\": \"^52482$\",
\"country_uuid\": \"f4a3f476-1e03-3209-b128-425a11d8de80\",
\"county\": \"iqocksfcdt\",
\"is_primary\": true
}
],
\"referral_source_uuid\": \"c8079791-28ae-3d58-bf21-33c5c75b5f3e\",
\"customer_contact\": [
\"iste\"
],
\"customer_address\": [
\"eius\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/customers/1/with-contact-address',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'account_name' => 'Smarter Launch LLC',
'customer_contacts' => [
[
'uuid' => '33616e6a-0e3d-3832-9c47-3979a73eb069',
'first_name' => 'ewncxquqk',
'last_name' => 'umgnzmenhoiyjgmbxkaqonstmwxm',
'phone' => '+6331105015',
'is_primary' => false,
],
],
'customer_addresses' => [
[
'uuid' => '1a98a55d-1518-3bb5-b207-eb61a5543506',
'address1' => 'diblqojxhyaotulkkqe',
'address2' => 'wgygqxruorsoifgqzeyyyjoqlf',
'city' => 'fsqmfodqsuzffpgmhgjzquhduttphimixgqgr',
'state_uuid' => '6d04c43f-198e-3a79-b2e7-514a4601c8bd',
'postal_code' => '^52482$',
'country_uuid' => 'f4a3f476-1e03-3209-b128-425a11d8de80',
'county' => 'iqocksfcdt',
'is_primary' => true,
],
],
'referral_source_uuid' => 'c8079791-28ae-3d58-bf21-33c5c75b5f3e',
'customer_contact' => [
'iste',
],
'customer_address' => [
'eius',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/1/with-contact-address"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"account_name": "Smarter Launch LLC",
"customer_contacts": [
{
"uuid": "33616e6a-0e3d-3832-9c47-3979a73eb069",
"first_name": "ewncxquqk",
"last_name": "umgnzmenhoiyjgmbxkaqonstmwxm",
"phone": "+6331105015",
"is_primary": false
}
],
"customer_addresses": [
{
"uuid": "1a98a55d-1518-3bb5-b207-eb61a5543506",
"address1": "diblqojxhyaotulkkqe",
"address2": "wgygqxruorsoifgqzeyyyjoqlf",
"city": "fsqmfodqsuzffpgmhgjzquhduttphimixgqgr",
"state_uuid": "6d04c43f-198e-3a79-b2e7-514a4601c8bd",
"postal_code": "^52482$",
"country_uuid": "f4a3f476-1e03-3209-b128-425a11d8de80",
"county": "iqocksfcdt",
"is_primary": true
}
],
"referral_source_uuid": "c8079791-28ae-3d58-bf21-33c5c75b5f3e",
"customer_contact": [
"iste"
],
"customer_address": [
"eius"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update individual customer account name and the location they are associated with.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"3245d634-24fd-11ec-accd-e397aec85c7f\",
\"account_name\": \"Smarter Launch LLC\",
\"referral_source_uuid\": \"c6e2a24d-d6fb-3328-9f59-c696d04045c1\",
\"include_fields\": [
\"ut\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => '3245d634-24fd-11ec-accd-e397aec85c7f',
'account_name' => 'Smarter Launch LLC',
'referral_source_uuid' => 'c6e2a24d-d6fb-3328-9f59-c696d04045c1',
'include_fields' => [
'ut',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "3245d634-24fd-11ec-accd-e397aec85c7f",
"account_name": "Smarter Launch LLC",
"referral_source_uuid": "c6e2a24d-d6fb-3328-9f59-c696d04045c1",
"include_fields": [
"ut"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch individual customer account name and the location they are associated with.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"3245d634-24fd-11ec-accd-e397aec85c7f\",
\"account_name\": \"Smarter Launch LLC\",
\"status_uuid\": \"3ab3bfea-21c7-31ec-8259-ac94206f1393\",
\"referral_source_uuid\": \"bae805f8-741f-3c99-b214-3163faf238a3\",
\"include_fields\": [
\"culpa\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => '3245d634-24fd-11ec-accd-e397aec85c7f',
'account_name' => 'Smarter Launch LLC',
'status_uuid' => '3ab3bfea-21c7-31ec-8259-ac94206f1393',
'referral_source_uuid' => 'bae805f8-741f-3c99-b214-3163faf238a3',
'include_fields' => [
'culpa',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "3245d634-24fd-11ec-accd-e397aec85c7f",
"account_name": "Smarter Launch LLC",
"status_uuid": "3ab3bfea-21c7-31ec-8259-ac94206f1393",
"referral_source_uuid": "bae805f8-741f-3c99-b214-3163faf238a3",
"include_fields": [
"culpa"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This end point allows user the delete the customer.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/customers/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/customers/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Sync
requires authentication
This endpoint allows user to perform manual sync to a customer
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/customers/1/sync" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/customers/1/sync',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/1/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Fetch all available industry
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/industries" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/industries',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/industries"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Customer Address
API for customer address
Update
requires authentication
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"addresses[]\": [
\"aliquam\"
],
\"delete_addresses[]\": [
\"enim\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'addresses[]' => [
'aliquam',
],
'delete_addresses[]' => [
'enim',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"addresses[]": [
"aliquam"
],
"delete_addresses[]": [
"enim"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch Customer Address
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/customers/1/customer-addresses/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address1\": \"et\",
\"address2\": \"doloremque\",
\"city\": \"asperiores\",
\"country_state_uuid\": \"omnis\",
\"country_uuid\": \"et\",
\"postal_code\": \"et\",
\"latitude\": \"eum\",
\"longitude\": \"labore\",
\"is_primary\": \"accusamus\",
\"settings\": \"ut\",
\"county\": \"quo\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/customers/1/customer-addresses/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address1' => 'et',
'address2' => 'doloremque',
'city' => 'asperiores',
'country_state_uuid' => 'omnis',
'country_uuid' => 'et',
'postal_code' => 'et',
'latitude' => 'eum',
'longitude' => 'labore',
'is_primary' => 'accusamus',
'settings' => 'ut',
'county' => 'quo',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/1/customer-addresses/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address1": "et",
"address2": "doloremque",
"city": "asperiores",
"country_state_uuid": "omnis",
"country_uuid": "et",
"postal_code": "et",
"latitude": "eum",
"longitude": "labore",
"is_primary": "accusamus",
"settings": "ut",
"county": "quo"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Integration Data
requires authentication
Get data from a 3rd party API
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses/1/integration-data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"addresses[]\": [
\"esse\"
],
\"delete_addresses[]\": [
\"illum\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses/1/integration-data',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'addresses[]' => [
'esse',
],
'delete_addresses[]' => [
'illum',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-addresses/1/integration-data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"addresses[]": [
"esse"
],
"delete_addresses[]": [
"illum"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Customer Contacts
API for customer contacts
Update
requires authentication
Update customer contacts
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-contacts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contacts[]\": [
\"occaecati\"
],
\"delete_contacts[]\": [
\"sapiente\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-contacts',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'contacts[]' => [
'occaecati',
],
'delete_contacts[]' => [
'sapiente',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/customers/3245d634-24fd-11ec-accd-e397aec85c7f/customer-contacts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"contacts[]": [
"occaecati"
],
"delete_contacts[]": [
"sapiente"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Decline Reason
API for Decline Reason
List
requires authentication
Shows the list of decline reasons with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single decline reason.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created decline reasons.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"ea\",
\"description\": \"Lorem, ipsum dolor sit amet consectetur adipisicing elit.\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'ea',
'description' => 'Lorem, ipsum dolor sit amet consectetur adipisicing elit.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "ea",
"description": "Lorem, ipsum dolor sit amet consectetur adipisicing elit."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a decline reason.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"eveniet\",
\"description\": \"Lorem, ipsum dolor sit amet consectetur adipisicing elit.\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'eveniet',
'description' => 'Lorem, ipsum dolor sit amet consectetur adipisicing elit.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "eveniet",
"description": "Lorem, ipsum dolor sit amet consectetur adipisicing elit."
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company decline reason.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"autem\",
\"description\": \"Lorem, ipsum dolor sit amet consectetur adipisicing elit.\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'autem',
'description' => 'Lorem, ipsum dolor sit amet consectetur adipisicing elit.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "autem",
"description": "Lorem, ipsum dolor sit amet consectetur adipisicing elit."
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a decline reason.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/decline-reasons/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Description Set
API for Description Set
List
requires authentication
Shows the list of description set with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single description set.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created description set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"omnis\",
\"options\": [
\"numquam\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'omnis',
'options' => [
'numquam',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "omnis",
"options": [
"numquam"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a description set.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"occaecati\",
\"options\": [
\"voluptates\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'occaecati',
'options' => [
'voluptates',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "occaecati",
"options": [
"voluptates"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company description set.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quod\",
\"options\": [
\"aut\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'quod',
'options' => [
'aut',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quod",
"options": [
"aut"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a description set.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/description-sets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Form
API for Form
List
requires authentication
Shows the list of form with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/forms" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get form types
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/form-types" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/form-types',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/form-types"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single form.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created form.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eum\",
\"assignment\": \"vitae\",
\"form_fields\": [
\"laboriosam\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'eum',
'assignment' => 'vitae',
'form_fields' => [
'laboriosam',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eum",
"assignment": "vitae",
"form_fields": [
"laboriosam"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate
requires authentication
Duplicate form
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/duplicate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/duplicate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/duplicate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a form.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vel\",
\"assignment\": \"aliquid\",
\"form_fields\": [
\"maiores\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'vel',
'assignment' => 'aliquid',
'form_fields' => [
'maiores',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vel",
"assignment": "aliquid",
"form_fields": [
"maiores"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a form.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"neque\",
\"assignment\": \"voluptas\",
\"form_fields\": [
\"esse\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'neque',
'assignment' => 'voluptas',
'form_fields' => [
'esse',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "neque",
"assignment": "voluptas",
"form_fields": [
"esse"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company form.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"molestiae\",
\"assignment\": \"qui\",
\"form_fields\": [
\"porro\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'molestiae',
'assignment' => 'qui',
'form_fields' => [
'porro',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "molestiae",
"assignment": "qui",
"form_fields": [
"porro"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a form.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Form Field
API for Form field
List
requires authentication
Shows the list of form fields with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single form field.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/aut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/aut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created formField.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"natus\",
\"input_type\": \"molestiae\",
\"default_value\": \"laborum\",
\"is_required\": true,
\"is_conditional\": false,
\"has_help_guide\": false,
\"conditional_value\": \"aut\",
\"help_guide\": \"perspiciatis\",
\"position\": 6
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'natus',
'input_type' => 'molestiae',
'default_value' => 'laborum',
'is_required' => true,
'is_conditional' => false,
'has_help_guide' => false,
'conditional_value' => 'aut',
'help_guide' => 'perspiciatis',
'position' => 6,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "natus",
"input_type": "molestiae",
"default_value": "laborum",
"is_required": true,
"is_conditional": false,
"has_help_guide": false,
"conditional_value": "aut",
"help_guide": "perspiciatis",
"position": 6
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a formfield.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/veniam" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"excepturi\",
\"input_type\": \"fuga\",
\"default_value\": \"ad\",
\"is_required\": true,
\"is_conditional\": false,
\"has_help_guide\": true,
\"conditional_value\": \"nisi\",
\"help_guide\": \"occaecati\",
\"position\": 5
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/veniam',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'excepturi',
'input_type' => 'fuga',
'default_value' => 'ad',
'is_required' => true,
'is_conditional' => false,
'has_help_guide' => true,
'conditional_value' => 'nisi',
'help_guide' => 'occaecati',
'position' => 5,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/veniam"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "excepturi",
"input_type": "fuga",
"default_value": "ad",
"is_required": true,
"is_conditional": false,
"has_help_guide": true,
"conditional_value": "nisi",
"help_guide": "occaecati",
"position": 5
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a formfield.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/nihil" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"voluptatem\",
\"input_type\": \"culpa\",
\"default_value\": \"voluptate\",
\"is_required\": false,
\"is_conditional\": true,
\"has_help_guide\": true,
\"conditional_value\": \"sunt\",
\"help_guide\": \"aspernatur\",
\"position\": 1
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/nihil',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'voluptatem',
'input_type' => 'culpa',
'default_value' => 'voluptate',
'is_required' => false,
'is_conditional' => true,
'has_help_guide' => true,
'conditional_value' => 'sunt',
'help_guide' => 'aspernatur',
'position' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/nihil"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "voluptatem",
"input_type": "culpa",
"default_value": "voluptate",
"is_required": false,
"is_conditional": true,
"has_help_guide": true,
"conditional_value": "sunt",
"help_guide": "aspernatur",
"position": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company form field.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/beatae" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"adipisci\",
\"input_type\": \"et\",
\"default_value\": \"doloremque\",
\"is_required\": true,
\"is_conditional\": false,
\"has_help_guide\": false,
\"conditional_value\": \"non\",
\"help_guide\": \"dolor\",
\"position\": 10
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/beatae',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'adipisci',
'input_type' => 'et',
'default_value' => 'doloremque',
'is_required' => true,
'is_conditional' => false,
'has_help_guide' => false,
'conditional_value' => 'non',
'help_guide' => 'dolor',
'position' => 10,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/beatae"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "adipisci",
"input_type": "et",
"default_value": "doloremque",
"is_required": true,
"is_conditional": false,
"has_help_guide": false,
"conditional_value": "non",
"help_guide": "dolor",
"position": 10
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a form field.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/et" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/et',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/forms/2/fields/et"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Heartbeat
API for Heartbeat
Lock
requires authentication
Lock a specific item of given the type for editing
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/heartbeat" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"\\\"Proposal\\\"\",
\"uuid\": \"\\\"f26834b1-b086-3c99-adc7-b1660383a3fd\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/heartbeat',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => '"Proposal"',
'uuid' => '"f26834b1-b086-3c99-adc7-b1660383a3fd"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/heartbeat"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "\"Proposal\"",
"uuid": "\"f26834b1-b086-3c99-adc7-b1660383a3fd\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Unlock
requires authentication
Unlock a specific item of given the type for editing
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/heartbeat" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"\\\"Proposal\\\"\",
\"uuid\": \"\\\"f26834b1-b086-3c99-adc7-b1660383a3fd\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/heartbeat',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => '"Proposal"',
'uuid' => '"f26834b1-b086-3c99-adc7-b1660383a3fd"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/heartbeat"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "\"Proposal\"",
"uuid": "\"f26834b1-b086-3c99-adc7-b1660383a3fd\""
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Home
Index
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
ImportSet
API for ImportSet
Apply Import Set to Company
requires authentication
Store a newly created import set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tags\": [
\"odio\"
],
\"import_files\": \"incidunt\",
\"override\": true,
\"admin_only\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tags' => [
'odio',
],
'import_files' => 'incidunt',
'override' => true,
'admin_only' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tags": [
"odio"
],
"import_files": "incidunt",
"override": true,
"admin_only": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Apply Import Set to Company
requires authentication
Store a newly created import set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults/upload" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tags\": [
\"minus\"
],
\"import_files\": \"atque\",
\"override\": false,
\"admin_only\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults/upload',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tags' => [
'minus',
],
'import_files' => 'atque',
'override' => false,
'admin_only' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/import-defaults/upload"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tags": [
"minus"
],
"import_files": "atque",
"override": false,
"admin_only": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of import set with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/import-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/import-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single import set.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/import-sets/23" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/import-sets/23',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Download
requires authentication
Download a single import set.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/import-sets/23/download" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/import-sets/23/download',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23/download"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created import set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/import-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tags\": [
\"consequatur\"
],
\"import_files\": \"officia\",
\"override\": false,
\"admin_only\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/import-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tags' => [
'consequatur',
],
'import_files' => 'officia',
'override' => false,
'admin_only' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tags": [
"consequatur"
],
"import_files": "officia",
"override": false,
"admin_only": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a import set.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"import_files\": \"natus\",
\"admin_only\": true,
\"is_selected\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/import-sets/23',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'import_files' => 'natus',
'admin_only' => true,
'is_selected' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"import_files": "natus",
"admin_only": true,
"is_selected": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update the specified resource in storage.
requires authentication
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admin_only\": false,
\"is_selected\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/import-sets/23',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'admin_only' => false,
'is_selected' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admin_only": false,
"is_selected": false
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a import set.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/import-sets/23',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-sets/23"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List Forms
requires authentication
Shows the list of import set with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/form-import-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/form-import-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/form-import-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Apply Import Set to Company
requires authentication
Store a newly created import set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/form-import-sets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tags\": [
\"enim\"
],
\"import_files\": \"error\",
\"override\": false,
\"admin_only\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/form-import-sets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tags' => [
'enim',
],
'import_files' => 'error',
'override' => false,
'admin_only' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/form-import-sets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tags": [
"enim"
],
"import_files": "error",
"override": false,
"admin_only": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Import Type
API for Import Type
List
requires authentication
Shows the list of tags with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/import-types" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/import-types',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/import-types"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Media Item
API for Media Item
List
requires authentication
Shows the list of media items with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/media-items" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"types\": \"DOCUMENT\",
\"media_tag_names\": [
\"pariatur\"
],
\"company_uuid\": \"48be50a2-1d4c-3d97-9b49-5dc59b228a5e\",
\"companies_uuid\": [
\"minima\"
],
\"company_location_uuid\": \"bfec0722-3c0f-3fbf-9160-926b52660864\",
\"company_locations_uuid\": [
\"voluptas\"
],
\"media_source_uuid\": \"f7bafa8c-91b4-3ee7-a8e2-443689e1a180\",
\"include_global_files\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/media-items',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'types' => 'DOCUMENT',
'media_tag_names' => [
'pariatur',
],
'company_uuid' => '48be50a2-1d4c-3d97-9b49-5dc59b228a5e',
'companies_uuid' => [
'minima',
],
'company_location_uuid' => 'bfec0722-3c0f-3fbf-9160-926b52660864',
'company_locations_uuid' => [
'voluptas',
],
'media_source_uuid' => 'f7bafa8c-91b4-3ee7-a8e2-443689e1a180',
'include_global_files' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"types": "DOCUMENT",
"media_tag_names": [
"pariatur"
],
"company_uuid": "48be50a2-1d4c-3d97-9b49-5dc59b228a5e",
"companies_uuid": [
"minima"
],
"company_location_uuid": "bfec0722-3c0f-3fbf-9160-926b52660864",
"company_locations_uuid": [
"voluptas"
],
"media_source_uuid": "f7bafa8c-91b4-3ee7-a8e2-443689e1a180",
"include_global_files": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single media item
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/media-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/media-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Upload a media item
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/media-items" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=exercitationem" \
--form "description=deleniti" \
--form "directory=proposal-template" \
--form "type=document" \
--form "fileUpload=@/tmp/phpFyBOiw"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/media-items',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'exercitationem'
],
[
'name' => 'description',
'contents' => 'deleniti'
],
[
'name' => 'directory',
'contents' => 'proposal-template'
],
[
'name' => 'type',
'contents' => 'document'
],
[
'name' => 'fileUpload',
'contents' => fopen('/tmp/phpFyBOiw', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'exercitationem');
body.append('description', 'deleniti');
body.append('directory', 'proposal-template');
body.append('type', 'document');
body.append('fileUpload', document.querySelector('input[name="fileUpload"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a media item.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/media-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"est\",
\"description\": \"ducimus\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/media-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'est',
'description' => 'ducimus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "est",
"description": "ducimus"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a media item.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/media-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"itaque\",
\"description\": \"sit\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/media-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'itaque',
'description' => 'sit',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "itaque",
"description": "sit"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a media item.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/media-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/media-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Media Source
API for Media Source
List
requires authentication
Shows the list of media source with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/media-sources" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"types\": \"IMAGE\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/media-sources',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'types' => 'IMAGE',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"types": "IMAGE"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Favorite Media Source List
requires authentication
Get the list of favorite Media Sources
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/media-sources/favorites" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"soluta\",
\"description\": \"repudiandae\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/favorites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'soluta',
'description' => 'repudiandae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/favorites"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "soluta",
"description": "repudiandae"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single media source
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/media-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Upload a media source
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/media-sources" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"qui\",
\"description\": \"velit\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/media-sources',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'qui',
'description' => 'velit',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "qui",
"description": "velit"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Add to Favorite
requires authentication
Add media source to the user company's media source favorites
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"architecto\",
\"description\": \"doloribus\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'architecto',
'description' => 'doloribus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "architecto",
"description": "doloribus"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Import CSV
requires authentication
Accept CSV and populate media item data for a media source/manufacturer
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/import-csv" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/tmp/phpTq1YQw"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1/import-csv',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/tmp/phpTq1YQw', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/import-csv"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a media source.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"totam\",
\"description\": \"tenetur\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'totam',
'description' => 'tenetur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "totam",
"description": "tenetur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a media source.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quo\",
\"description\": \"ut\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'quo',
'description' => 'ut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quo",
"description": "ut"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a media source.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove Favorite Media Source
requires authentication
Remove media source to the user company's media source favorites
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"maxime\",
\"description\": \"sunt\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'maxime',
'description' => 'sunt',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/media-sources/1/favorites"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "maxime",
"description": "sunt"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Media Tag
API for Media Tag
List
requires authentication
Shows the list of media tag with pagination.
Show
requires authentication
Show a single media tag
Store
requires authentication
Upload a media tag
Update
requires authentication
Update a media tag.
Patch
requires authentication
Patch a media tag.
Delete
requires authentication
Delete a media tag.
Other Endpoints
GET api/v1/maintenance-check
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/maintenance-check" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/maintenance-check',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/maintenance-check"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
POST Get S3 Pre-signed Url for Proposal Review
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/proposal-file-upload-presigned-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"signature_photo\": {
\"full_path\": \"\\/test\\/signature.png\",
\"md5_hash\": \"#hash#\",
\"extension\": \"png\"
},
\"proposal_pdf\": {
\"full_path\": \"\\/test\\/proposal.pdf\",
\"md5_hash\": \"#hash#\",
\"extension\": \"pdf\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/proposal-file-upload-presigned-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'signature_photo' => [
'full_path' => '/test/signature.png',
'md5_hash' => '#hash#',
'extension' => 'png',
],
'proposal_pdf' => [
'full_path' => '/test/proposal.pdf',
'md5_hash' => '#hash#',
'extension' => 'pdf',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/proposal-file-upload-presigned-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"signature_photo": {
"full_path": "\/test\/signature.png",
"md5_hash": "#hash#",
"extension": "png"
},
"proposal_pdf": {
"full_path": "\/test\/proposal.pdf",
"md5_hash": "#hash#",
"extension": "pdf"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
POST Get S3 Pre-signed Url
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/file-upload-presigned-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items[]\": \"[{\\\"path\\\": \\\"\\/companies\\/{company-uuid}\\/\\\", \\\"extension\\\": \\\"jpg\\\"}]\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/file-upload-presigned-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'items[]' => '[{"path": "/companies/{company-uuid}/", "extension": "jpg"}]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/file-upload-presigned-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items[]": "[{\"path\": \"\/companies\/{company-uuid}\/\", \"extension\": \"jpg\"}]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
POST Get S3 Pre-signed Url
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/file-upload-presigned-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items[]\": \"[{\\\"path\\\": \\\"\\/companies\\/{company-uuid}\\/\\\", \\\"extension\\\": \\\"jpg\\\"}]\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/file-upload-presigned-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'items[]' => '[{"path": "/companies/{company-uuid}/", "extension": "jpg"}]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/file-upload-presigned-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items[]": "[{\"path\": \"\/companies\/{company-uuid}\/\", \"extension\": \"jpg\"}]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
POST api/v1/upload-from-url
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/upload-from-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"url\": \"http:\\/\\/balistreri.com\\/\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/upload-from-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'url' => 'http://balistreri.com/',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/upload-from-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "http:\/\/balistreri.com\/"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
POST api/v1/webhook-receiving-url
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/webhook-receiving-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/webhook-receiving-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/webhook-receiving-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Test
requires authentication
Save new webhook subscription
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe-test" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"url\": \"\'http:\\/\\/zapier.com\\/customer-created-in-smarterlaunch\'\",
\"event\": \"customer-create\'\",
\"type\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe-test',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'url' => '\'http://zapier.com/customer-created-in-smarterlaunch\'',
'event' => 'customer-create\'',
'type' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe-test"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "'http:\/\/zapier.com\/customer-created-in-smarterlaunch'",
"event": "customer-create'",
"type": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of line items with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single line item.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a new line item.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"aspernatur\",
\"description\": \"error\",
\"line_item_values\": \"et\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'aspernatur',
'description' => 'error',
'line_item_values' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "aspernatur",
"description": "error",
"line_item_values": "et"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Import Set to Line Items
requires authentication
Store a newly created import set.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/import" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"import_files\": \"explicabo\",
\"override\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/import',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'import_files' => 'explicabo',
'override' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/import"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"import_files": "explicabo",
"override": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a line item.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"aut\",
\"description\": \"labore\",
\"line_item_values\": \"rerum\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'aut',
'description' => 'labore',
'line_item_values' => 'rerum',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "aut",
"description": "labore",
"line_item_values": "rerum"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Update a line item.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dolor\",
\"description\": \"aspernatur\",
\"line_item_values\": \"aut\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'dolor',
'description' => 'aspernatur',
'line_item_values' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dolor",
"description": "aspernatur",
"line_item_values": "aut"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a line item.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/line-items/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of teams with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/teams" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single team.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created team.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ea\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'ea',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ea"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a team.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"alias\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'alias',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "alias"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company team.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"a\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'a',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "a"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a team.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/teams/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Returns the list of available reports
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/templates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/templates',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/templates"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a report template.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/reports/templates/possimus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/reports/templates/possimus',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/templates/possimus"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a report template.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/reports/templates/nesciunt" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/reports/templates/nesciunt',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/templates/nesciunt"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of webhooks.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Save new webhook subscription
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"url\": \"\'http:\\/\\/zapier.com\\/customer-created-in-smarterlaunch\'\",
\"event\": \"customer-create\'\",
\"type\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'url' => '\'http://zapier.com/customer-created-in-smarterlaunch\'',
'event' => 'customer-create\'',
'type' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "'http:\/\/zapier.com\/customer-created-in-smarterlaunch'",
"event": "customer-create'",
"type": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a webhook.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe/dolorem" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe/dolorem',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/webhooks/subscribe/dolorem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Permission
API for permission details
List / Fetch
requires authentication
Shows the list of permission or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/permissions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"user-list\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/permissions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'user-list',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "user-list"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List / Fetch
requires authentication
Shows the list of permission or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/permissions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"user-list\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/permissions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'user-list',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/permissions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "user-list"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update permission.
requires authentication
This endpoint lets user to create/update permission.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/permissions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"user-list\",
\"uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/permissions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'user-list',
'uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "user-list",
"uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update permission.
requires authentication
This endpoint lets user to create/update permission.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/permissions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"user-list\",
\"uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/permissions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'user-list',
'uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/permissions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "user-list",
"uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This endpoint allows user to delete permission.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/permissions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/permissions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/permissions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Pest Treated
List
requires authentication
Shows the list of pest treated with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single pest treated.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/ut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/ut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/ut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created pest treated.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=impedit" \
--form "pest_treated_attributes[attr]=value" \
--form "icon_image_url=http://smarterlaunch.local/image1.jpg" \
--form "photo_file=@/tmp/php618wqA"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'impedit'
],
[
'name' => 'pest_treated_attributes[attr]',
'contents' => 'value'
],
[
'name' => 'icon_image_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'photo_file',
'contents' => fopen('/tmp/php618wqA', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'impedit');
body.append('pest_treated_attributes[attr]', 'value');
body.append('icon_image_url', 'http://smarterlaunch.local/image1.jpg');
body.append('photo_file', document.querySelector('input[name="photo_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a pest treated.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/voluptatum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=ut" \
--form "pest_treated_attributes[attr]=value" \
--form "icon_image_url=http://smarterlaunch.local/image1.jpg" \
--form "photo_file=@/tmp/phpLo8klA"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/voluptatum',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'ut'
],
[
'name' => 'pest_treated_attributes[attr]',
'contents' => 'value'
],
[
'name' => 'icon_image_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'photo_file',
'contents' => fopen('/tmp/phpLo8klA', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/voluptatum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'ut');
body.append('pest_treated_attributes[attr]', 'value');
body.append('icon_image_url', 'http://smarterlaunch.local/image1.jpg');
body.append('photo_file', document.querySelector('input[name="photo_file"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a pest treated.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/doloremque" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=possimus" \
--form "pest_treated_attributes[attr]=value" \
--form "icon_image_url=http://smarterlaunch.local/image1.jpg" \
--form "photo_file=@/tmp/phpKk5Jiy"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/doloremque',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'possimus'
],
[
'name' => 'pest_treated_attributes[attr]',
'contents' => 'value'
],
[
'name' => 'icon_image_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'photo_file',
'contents' => fopen('/tmp/phpKk5Jiy', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/doloremque"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'possimus');
body.append('pest_treated_attributes[attr]', 'value');
body.append('icon_image_url', 'http://smarterlaunch.local/image1.jpg');
body.append('photo_file', document.querySelector('input[name="photo_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company pest treated.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/expedita" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=iste" \
--form "pest_treated_attributes[attr]=value" \
--form "icon_image_url=http://smarterlaunch.local/image1.jpg" \
--form "photo_file=@/tmp/phpKr1GVx"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/expedita',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'iste'
],
[
'name' => 'pest_treated_attributes[attr]',
'contents' => 'value'
],
[
'name' => 'icon_image_url',
'contents' => 'http://smarterlaunch.local/image1.jpg'
],
[
'name' => 'photo_file',
'contents' => fopen('/tmp/phpKr1GVx', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/expedita"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'iste');
body.append('pest_treated_attributes[attr]', 'value');
body.append('icon_image_url', 'http://smarterlaunch.local/image1.jpg');
body.append('photo_file', document.querySelector('input[name="photo_file"]').files[0]);
fetch(url, {
method: "PATCH",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a pest treated.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/molestias" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/molestias',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/pests-treated/molestias"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Property Locations
API for Property Locations
List
requires authentication
Shows the list of property locations with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single property location.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created property location.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"expedita\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'expedita',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "expedita"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a property location.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"et\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "et"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company property location.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ut\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'ut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ut"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a property location.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/property-locations/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Proposal
API for Proposal
Get
requires authentication
Display the selected proposal.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/preview" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/preview',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/preview"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get client IP Address and Date time prior to accepting the proposal
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/get-ip-datetime" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/get-ip-datetime',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/get-ip-datetime"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store Proposal Inquiry
requires authentication
Send inquiry request from users
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/support-request" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"support_type\": \"\'General Inquiry\'\",
\"client_detail\": [
\"architecto\"
],
\"screenshots_url\": [
\"https:\\/\\/example.net\\/image1.jpg\",
\"https:\\/\\/example.net\\/image1.png\"
],
\"description\": \"\'I cannot access documents. Please help.\'\",
\"no_attachments\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/support-request',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'support_type' => '\'General Inquiry\'',
'client_detail' => [
'architecto',
],
'screenshots_url' => [
'https://example.net/image1.jpg',
'https://example.net/image1.png',
],
'description' => '\'I cannot access documents. Please help.\'',
'no_attachments' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/support-request"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"support_type": "'General Inquiry'",
"client_detail": [
"architecto"
],
"screenshots_url": [
"https:\/\/example.net\/image1.jpg",
"https:\/\/example.net\/image1.png"
],
"description": "'I cannot access documents. Please help.'",
"no_attachments": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Upload
requires authentication
Upload photos for Cover Letter or Photo Layout pages
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/quis/support-request-upload" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"screenshot_url\": \"https:\\/\\/example.net\\/test.png\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/quis/support-request-upload',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'screenshot_url' => 'https://example.net/test.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/quis/support-request-upload"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"screenshot_url": "https:\/\/example.net\/test.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Accept and Sign
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/accept-sign" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_service_agreement_accepted\": false,
\"signature_photo_url\": \"et\",
\"proposal_pdf_url\": \"quidem\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/accept-sign',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'is_service_agreement_accepted' => false,
'signature_photo_url' => 'et',
'proposal_pdf_url' => 'quidem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/accept-sign"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_service_agreement_accepted": false,
"signature_photo_url": "et",
"proposal_pdf_url": "quidem"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Replicate Signature
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/replace-signature" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"signature_photo_url\": \"veniam\",
\"proposal_pdf_url\": \"eligendi\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/replace-signature',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'signature_photo_url' => 'veniam',
'proposal_pdf_url' => 'eligendi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/replace-signature"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"signature_photo_url": "veniam",
"proposal_pdf_url": "eligendi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update Attached Document
requires authentication
Patch the specified proposal.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/update-attachment" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "documentIndex=3964093.1755593" \
--form "documentFile=@/tmp/phpA9kl1x"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/update-attachment',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'documentIndex',
'contents' => '3964093.1755593'
],
[
'name' => 'documentFile',
'contents' => fopen('/tmp/phpA9kl1x', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/update-attachment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('documentIndex', '3964093.1755593');
body.append('documentFile', document.querySelector('input[name="documentFile"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Decline
requires authentication
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/decline" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/decline',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/decline"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update Selected Pricing
requires authentication
Patch the specified proposal.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/updated-selected-pricing" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"proposal_values\": []
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/updated-selected-pricing',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'proposal_values' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/updated-selected-pricing"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"proposal_values": []
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Submit Customer Forms
requires authentication
Patch the specified proposal.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/customer-forms" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"formValues\": [
\"vel\"
],
\"attachedDocuments\": [
\"perferendis\"
],
\"submittedForms\": [
\"cum\"
],
\"proposal_values\": []
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/customer-forms',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'formValues' => [
'vel',
],
'attachedDocuments' => [
'perferendis',
],
'submittedForms' => [
'cum',
],
'proposal_values' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/customer-forms"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"formValues": [
"vel"
],
"attachedDocuments": [
"perferendis"
],
"submittedForms": [
"cum"
],
"proposal_values": []
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Log Video Clicked
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/video-clicked" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"video_type\": \"repudiandae\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/video-clicked',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'video_type' => 'repudiandae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/proposals/15/video-clicked"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"video_type": "repudiandae"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List
requires authentication
Shows the list of proposal with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_fields\": [
null
],
\"ignore_cached\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'include_fields' => [
null,
],
'ignore_cached' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_fields": [
null
],
"ignore_cached": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Export List
requires authentication
Returns a CSV file of list of filtered proposal list.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/export-list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/export-list',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/export-list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Summary
requires authentication
Shows the summary of proposal. Returns number of items per Proposal status.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/summary" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/summary',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/summary"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Display the selected proposal.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of Activity Logs
requires authentication
Shows the list of proposal's activity logs with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_fields\": [
\"vero\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'include_fields' => [
'vero',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_fields": [
"vero"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Download TARF XML
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/15/tarf-xml-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/tarf-xml-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/tarf-xml-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Download California WDO XML
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/15/cali-wdo-report-url" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/cali-wdo-report-url',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/cali-wdo-report-url"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created proposal activity entry
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Be sure to follow-up with the customer.\'\",
\"remind_at\": \"07\\/23\\/2024\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'description' => 'Be sure to follow-up with the customer.\'',
'remind_at' => '07/23/2024',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Be sure to follow-up with the customer.'",
"remind_at": "07\/23\/2024"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
action
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/id/quia" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/id/quia',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/id/quia"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created proposal.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"animi\",
\"description\": \"omnis\",
\"company_location_uuid\": \"ipsam\",
\"customer_uuid\": \"architecto\",
\"customer_address_uuid\": \"eum\",
\"status_uuid\": \"est\",
\"service_plan_uuids\": [
\"dolores\"
],
\"proposal_values\": [],
\"proposal_template_uuid\": \"officia\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'animi',
'description' => 'omnis',
'company_location_uuid' => 'ipsam',
'customer_uuid' => 'architecto',
'customer_address_uuid' => 'eum',
'status_uuid' => 'est',
'service_plan_uuids' => [
'dolores',
],
'proposal_values' => [],
'proposal_template_uuid' => 'officia',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "animi",
"description": "omnis",
"company_location_uuid": "ipsam",
"customer_uuid": "architecto",
"customer_address_uuid": "eum",
"status_uuid": "est",
"service_plan_uuids": [
"dolores"
],
"proposal_values": [],
"proposal_template_uuid": "officia"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate
requires authentication
This endpoint lets user to duplicate proposal and set into a draft mode
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/3245d630-24fd-11ec-accd-e397aec85c7f/duplicate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/3245d630-24fd-11ec-accd-e397aec85c7f/duplicate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/3245d630-24fd-11ec-accd-e397aec85c7f/duplicate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Upload Review Photo
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/upload-review-photo" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "type='cover'." \
--form "layout='Tiled'." \
--form "photo=@/tmp/phpBBFwEz"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/upload-review-photo',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'type',
'contents' => ''cover'.'
],
[
'name' => 'layout',
'contents' => ''Tiled'.'
],
[
'name' => 'photo',
'contents' => fopen('/tmp/phpBBFwEz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/upload-review-photo"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('type', ''cover'.');
body.append('layout', ''Tiled'.');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Resync document
requires authentication
Resync document the specified proposal.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/push-to-crm" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"incidunt\",
\"description\": \"nam\",
\"company_location_uuid\": \"et\",
\"customer_uuid\": \"ut\",
\"customer_address_uuid\": \"numquam\",
\"status_uuid\": \"dignissimos\",
\"service_plan_uuids\": [
\"ea\"
],
\"proposal_values\": [],
\"proposal_template_uuid\": \"molestiae\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/push-to-crm',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'incidunt',
'description' => 'nam',
'company_location_uuid' => 'et',
'customer_uuid' => 'ut',
'customer_address_uuid' => 'numquam',
'status_uuid' => 'dignissimos',
'service_plan_uuids' => [
'ea',
],
'proposal_values' => [],
'proposal_template_uuid' => 'molestiae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/push-to-crm"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "incidunt",
"description": "nam",
"company_location_uuid": "et",
"customer_uuid": "ut",
"customer_address_uuid": "numquam",
"status_uuid": "dignissimos",
"service_plan_uuids": [
"ea"
],
"proposal_values": [],
"proposal_template_uuid": "molestiae"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Updates the specified proposal.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"\\\"Pest Route Initial Proposal\\\"\",
\"description\": \"\\\"Lorem, ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"company_location_uuid\": \"rem\",
\"customer_uuid\": \"placeat\",
\"customer_address_uuid\": \"saepe\",
\"status_uuid\": \"mollitia\",
\"service_plan_uuids\": [
\"labore\"
],
\"proposal_values\": [],
\"settings\": [
\"et\"
],
\"proposal_template_uuid\": \"et\",
\"include_fields\": [
\"ut\"
],
\"expire_at\": \"2025-01-10T14:15:04\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => '"Pest Route Initial Proposal"',
'description' => '"Lorem, ipsum dolor sit amet consectetur adipisicing elit."',
'company_location_uuid' => 'rem',
'customer_uuid' => 'placeat',
'customer_address_uuid' => 'saepe',
'status_uuid' => 'mollitia',
'service_plan_uuids' => [
'labore',
],
'proposal_values' => [],
'settings' => [
'et',
],
'proposal_template_uuid' => 'et',
'include_fields' => [
'ut',
],
'expire_at' => '2025-01-10T14:15:04',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "\"Pest Route Initial Proposal\"",
"description": "\"Lorem, ipsum dolor sit amet consectetur adipisicing elit.\"",
"company_location_uuid": "rem",
"customer_uuid": "placeat",
"customer_address_uuid": "saepe",
"status_uuid": "mollitia",
"service_plan_uuids": [
"labore"
],
"proposal_values": [],
"settings": [
"et"
],
"proposal_template_uuid": "et",
"include_fields": [
"ut"
],
"expire_at": "2025-01-10T14:15:04"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a proposal activity entry
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/sit" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Be sure to follow-up with the customer.\'\",
\"remind_at\": \"07\\/23\\/2024\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/sit',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'description' => 'Be sure to follow-up with the customer.\'',
'remind_at' => '07/23/2024',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/sit"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Be sure to follow-up with the customer.'",
"remind_at": "07\/23\/2024"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch the specified proposal.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"labore\",
\"description\": \"quia\",
\"company_location_uuid\": \"sed\",
\"customer_uuid\": \"quos\",
\"customer_address_uuid\": \"aliquam\",
\"status_uuid\": \"delectus\",
\"service_plan_uuids\": [
\"doloremque\"
],
\"proposal_values\": [],
\"settings\": [
\"quas\"
],
\"proposal_template_uuid\": \"id\",
\"include_fields\": [
\"rerum\"
],
\"expire_at\": \"2025-01-10T14:15:04\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'labore',
'description' => 'quia',
'company_location_uuid' => 'sed',
'customer_uuid' => 'quos',
'customer_address_uuid' => 'aliquam',
'status_uuid' => 'delectus',
'service_plan_uuids' => [
'doloremque',
],
'proposal_values' => [],
'settings' => [
'quas',
],
'proposal_template_uuid' => 'id',
'include_fields' => [
'rerum',
],
'expire_at' => '2025-01-10T14:15:04',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "labore",
"description": "quia",
"company_location_uuid": "sed",
"customer_uuid": "quos",
"customer_address_uuid": "aliquam",
"status_uuid": "delectus",
"service_plan_uuids": [
"doloremque"
],
"proposal_values": [],
"settings": [
"quas"
],
"proposal_template_uuid": "id",
"include_fields": [
"rerum"
],
"expire_at": "2025-01-10T14:15:04"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Share
requires authentication
Send proposal via email
Delete
requires authentication
Delete a specified proposal.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Delete Review Photo
requires authentication
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/delete-review-photo" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"image_url\": \"inventore\",
\"type\": \"\'cover\'.\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/delete-review-photo',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'image_url' => 'inventore',
'type' => '\'cover\'.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/delete-review-photo"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_url": "inventore",
"type": "'cover'."
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a proposal activity entry
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/praesentium" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/praesentium',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/15/activity-logs/praesentium"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Proposal Templates
List
requires authentication
Shows the list of ProposalTemplates with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/templates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created Proposal Template.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"dolore\",
\"title\": \"explicabo\",
\"description\": \"excepturi\",
\"settings\": {
\"attr\": \"value\"
},
\"service_plan_uuids\": [
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\",
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => 'dolore',
'title' => 'explicabo',
'description' => 'excepturi',
'settings' => [
'attr' => 'value',
],
'service_plan_uuids' => [
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "dolore",
"title": "explicabo",
"description": "excepturi",
"settings": {
"attr": "value"
},
"service_plan_uuids": [
"815d3d9c-f371-3781-8456-7e6954b5b0f5",
"815d3d9c-f371-3781-8456-7e6954b5b0f5"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate
requires authentication
Duplicate a proposal template
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/unde/duplicate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates/unde/duplicate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/unde/duplicate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single proposal template.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/proposals/templates/consequatur" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a proposal template.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/eligendi" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"dolorem\",
\"title\": \"et\",
\"description\": \"aspernatur\",
\"settings\": {
\"attr\": \"value\"
},
\"service_plan_uuids\": [
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\",
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates/eligendi',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => 'dolorem',
'title' => 'et',
'description' => 'aspernatur',
'settings' => [
'attr' => 'value',
],
'service_plan_uuids' => [
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/eligendi"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "dolorem",
"title": "et",
"description": "aspernatur",
"settings": {
"attr": "value"
},
"service_plan_uuids": [
"815d3d9c-f371-3781-8456-7e6954b5b0f5",
"815d3d9c-f371-3781-8456-7e6954b5b0f5"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company proposal template.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/alias" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_location_uuid\": \"debitis\",
\"title\": \"sint\",
\"description\": \"quibusdam\",
\"settings\": {
\"attr\": \"value\"
},
\"service_plan_uuids\": [
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\",
\"815d3d9c-f371-3781-8456-7e6954b5b0f5\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates/alias',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_location_uuid' => 'debitis',
'title' => 'sint',
'description' => 'quibusdam',
'settings' => [
'attr' => 'value',
],
'service_plan_uuids' => [
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
'815d3d9c-f371-3781-8456-7e6954b5b0f5',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/alias"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_location_uuid": "debitis",
"title": "sint",
"description": "quibusdam",
"settings": {
"attr": "value"
},
"service_plan_uuids": [
"815d3d9c-f371-3781-8456-7e6954b5b0f5",
"815d3d9c-f371-3781-8456-7e6954b5b0f5"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a proposal template.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/illum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/proposals/templates/illum',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/proposals/templates/illum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Referral Source
API for Referral Source
List
requires authentication
Shows the list of referral sources.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single referral source.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created referral source.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"nostrum\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"integration_source_id\": \"1234263\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'nostrum',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'integration_source_id' => '1234263',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "nostrum",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"integration_source_id": "1234263"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a referral source.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"officia\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"integration_source_id\": \"1234263\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'officia',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'integration_source_id' => '1234263',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "officia",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"integration_source_id": "1234263"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company referral source.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eos\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"integration_source_id\": \"1234263\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'eos',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'integration_source_id' => '1234263',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eos",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"integration_source_id": "1234263"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a referral source.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/referral-sources/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Report
API for report related data
List
requires authentication
Returns the list of available reports
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created report.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/reports" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/reports',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate
requires authentication
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/reports/1/duplicate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/reports/1/duplicate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/1/duplicate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
GET api/v1/reports/types
requires authentication
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/types" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/types',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/types"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show admin overview report.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/admin-overview" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/admin-overview',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/admin-overview"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single report.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Export
requires authentication
Export summary reports
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/1/export" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/1/export',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/1/export"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Filters
requires authentication
Retrieve filters to be used in frontend processes
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/reports/1/filters" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/reports/1/filters',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/1/filters"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/reports/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/reports/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/reports/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Review
API for Review
List
requires authentication
Shows the list of review with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single review.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created review.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=soluta" \
--form "message=eligendi" \
--form "rate=quidem" \
--form "external_photo_url=veritatis" \
--form "position=10" \
--form "company_location_uuid=accusantium" \
--form "photo=@/tmp/phpD0KhIy"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'soluta'
],
[
'name' => 'message',
'contents' => 'eligendi'
],
[
'name' => 'rate',
'contents' => 'quidem'
],
[
'name' => 'external_photo_url',
'contents' => 'veritatis'
],
[
'name' => 'position',
'contents' => '10'
],
[
'name' => 'company_location_uuid',
'contents' => 'accusantium'
],
[
'name' => 'photo',
'contents' => fopen('/tmp/phpD0KhIy', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'soluta');
body.append('message', 'eligendi');
body.append('rate', 'quidem');
body.append('external_photo_url', 'veritatis');
body.append('position', '10');
body.append('company_location_uuid', 'accusantium');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a review.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=expedita" \
--form "message=perspiciatis" \
--form "rate=sequi" \
--form "external_photo_url=qui" \
--form "position=15" \
--form "company_location_uuid=minima" \
--form "photo=@/tmp/phpXA0oAz"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'expedita'
],
[
'name' => 'message',
'contents' => 'perspiciatis'
],
[
'name' => 'rate',
'contents' => 'sequi'
],
[
'name' => 'external_photo_url',
'contents' => 'qui'
],
[
'name' => 'position',
'contents' => '15'
],
[
'name' => 'company_location_uuid',
'contents' => 'minima'
],
[
'name' => 'photo',
'contents' => fopen('/tmp/phpXA0oAz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'expedita');
body.append('message', 'perspiciatis');
body.append('rate', 'sequi');
body.append('external_photo_url', 'qui');
body.append('position', '15');
body.append('company_location_uuid', 'minima');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Patch Index
requires authentication
Performs specific updates for review ranking
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company review.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"aspernatur\",
\"message\": \"voluptas\",
\"rate\": \"et\",
\"external_photo_url\": \"delectus\",
\"position\": 8,
\"company_location_uuid\": \"dolor\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'aspernatur',
'message' => 'voluptas',
'rate' => 'et',
'external_photo_url' => 'delectus',
'position' => 8,
'company_location_uuid' => 'dolor',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "aspernatur",
"message": "voluptas",
"rate": "et",
"external_photo_url": "delectus",
"position": 8,
"company_location_uuid": "dolor"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a review.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/reviews/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Role
API for role details
List / Fetch
requires authentication
Shows the list of role or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/roles" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"admin\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/roles',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'admin',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "admin"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List / Fetch
requires authentication
Shows the list of role or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/roles/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\",
\"name\": \"admin\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/roles/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
'name' => 'admin',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/roles/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f",
"name": "admin"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update role.
requires authentication
This endpoint lets user to create/update role.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/roles" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"admin\",
\"uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/roles',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'admin',
'uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "admin",
"uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update role.
requires authentication
This endpoint lets user to create/update role.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/roles/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"admin\",
\"uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/roles/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'admin',
'uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/roles/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "admin",
"uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/roles/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/roles/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/roles/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Schedule
API for Schedule
List
requires authentication
Shows the list of schedule with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single schedule.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a newly created schedule.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"tempora\",
\"description\": \"et\",
\"type\": \"sint\",
\"units\": 14,
\"term\": \"mollitia\",
\"enabled_service_months\": [
\"debitis\"
],
\"visits\": 8
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'tempora',
'description' => 'et',
'type' => 'sint',
'units' => 14,
'term' => 'mollitia',
'enabled_service_months' => [
'debitis',
],
'visits' => 8,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "tempora",
"description": "et",
"type": "sint",
"units": 14,
"term": "mollitia",
"enabled_service_months": [
"debitis"
],
"visits": 8
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a schedule.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"pariatur\",
\"description\": \"voluptatem\",
\"type\": \"minus\",
\"units\": 13,
\"term\": \"rerum\",
\"enabled_service_months\": [
\"vel\"
],
\"visits\": 4
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'pariatur',
'description' => 'voluptatem',
'type' => 'minus',
'units' => 13,
'term' => 'rerum',
'enabled_service_months' => [
'vel',
],
'visits' => 4,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "pariatur",
"description": "voluptatem",
"type": "minus",
"units": 13,
"term": "rerum",
"enabled_service_months": [
"vel"
],
"visits": 4
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a company schedule.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eligendi\",
\"description\": \"recusandae\",
\"type\": \"ad\",
\"units\": 19,
\"term\": \"dolorum\",
\"enabled_service_months\": [
\"magnam\"
],
\"visits\": 7
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'eligendi',
'description' => 'recusandae',
'type' => 'ad',
'units' => 19,
'term' => 'dolorum',
'enabled_service_months' => [
'magnam',
],
'visits' => 7,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eligendi",
"description": "recusandae",
"type": "ad",
"units": 19,
"term": "dolorum",
"enabled_service_months": [
"magnam"
],
"visits": 7
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a schedule.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/schedules/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Service Agreement
API for service agreement details
List
requires authentication
Shows the list of company service agreements with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single service agreement.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a service agreement.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"sit\",
\"content\": \"praesentium\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'sit',
'content' => 'praesentium',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "sit",
"content": "praesentium"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a service agreement.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"eum\",
\"content\": \"nesciunt\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'eum',
'content' => 'nesciunt',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "eum",
"content": "nesciunt"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a service agreement.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"possimus\",
\"content\": \"ducimus\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'possimus',
'content' => 'ducimus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "possimus",
"content": "ducimus"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch - Set as Active
requires authentication
Set as Active a service agreement version.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1/setAsActive" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"molestiae\",
\"content\": \"quis\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1/setAsActive',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'molestiae',
'content' => 'quis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1/setAsActive"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "molestiae",
"content": "quis"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a service agreement.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/companies/1/service-agreements/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Service Plan
API for Service Plans
List
requires authentication
Shows the list of Service Plans with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Shows the specified Service Plan.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created Service Plan.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/service-plans" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Premium Service Plan\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"company_locations_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"categories_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"default_contract_term_units\": 3707811.5
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/service-plans',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Premium Service Plan',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'company_locations_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'categories_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'default_contract_term_units' => 3707811.5,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Premium Service Plan",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"company_locations_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"categories_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"default_contract_term_units": 3707811.5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate
requires authentication
This endpoint lets user to duplicate service plan and set into a draft mode
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/duplicate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/duplicate',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/duplicate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Perform a full field update for the specified Service Plan.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Premium Service Plan\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"company_locations_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"categories_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"default_contract_term_units\": 267430267.870037,
\"save_as\": \"SERVICE_PLAN_DRAFT\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Premium Service Plan',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'company_locations_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'categories_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'default_contract_term_units' => 267430267.870037,
'save_as' => 'SERVICE_PLAN_DRAFT',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Premium Service Plan",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"company_locations_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"categories_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"default_contract_term_units": 267430267.870037,
"save_as": "SERVICE_PLAN_DRAFT"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Perform a patch for the specified Service Plan.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Premium Service Plan\",
\"description\": \"Lorem ipsum dolor sit amet consectetur adipisicing elit\",
\"company_locations_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"categories_uuid\": [
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\",
\"10933939-447e-3d2c-944f-b3ef57dc6eeb\"
],
\"settings\": [
\"distinctio\"
],
\"default_contract_term_units\": 293929,
\"save_as\": \"SERVICE_PLAN_DRAFT\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Premium Service Plan',
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit',
'company_locations_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'categories_uuid' => [
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
'10933939-447e-3d2c-944f-b3ef57dc6eeb',
],
'settings' => [
'distinctio',
],
'default_contract_term_units' => 293929.0,
'save_as' => 'SERVICE_PLAN_DRAFT',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Premium Service Plan",
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit",
"company_locations_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"categories_uuid": [
"10933939-447e-3d2c-944f-b3ef57dc6eeb",
"10933939-447e-3d2c-944f-b3ef57dc6eeb"
],
"settings": [
"distinctio"
],
"default_contract_term_units": 293929,
"save_as": "SERVICE_PLAN_DRAFT"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Save as Draft
requires authentication
Save as Draft the specified Service Plan.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/draft" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/draft',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/draft"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Publish
requires authentication
Publish the specified Service Plan.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/publish" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/publish',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/publish"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Archived
requires authentication
Archived the specified Service Plan.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/archive" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/archive',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/archive"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Unarchived
requires authentication
Unarchived the specified Service Plan.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/unarchive" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/unarchive',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/unarchive"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified Service Plan.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Service Plan Custom Field
API for Service Plan Custom Field
List
requires authentication
Shows the list of Service Plan Custom Fields with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create (Single/Multiple)
requires authentication
Store a newly created Service Plan Custom Field. For multiple creation, the @bodyParameter will be an array of a single @bodyParameter
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"First Name\",
\"input_type\": \"TEXT\",
\"default_value\": \"\\\"\\\"\",
\"combine_input_value_collection\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'First Name',
'input_type' => 'TEXT',
'default_value' => '""',
'combine_input_value_collection' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "First Name",
"input_type": "TEXT",
"default_value": "\"\"",
"combine_input_value_collection": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update (Single/Multiple)
requires authentication
Modify the specified Service Plan Custom Field. For Multiple update, @bodyparameter will be an array of the Single @bodyParameter (if uuid is included then perform an update; else, create new record).
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"custom_fields\": [
{
\"label\": \"hdszgvcrxywvxrcpwfdwxxgntlmxfoxpfbembweqwzjhilmrebldjljqvzdclwycxz\",
\"combine_input_value_collection\": true
}
],
\"save_service_plan_as\": \"SERVICE_PLAN_ARCHIVED\",
\"label\": \"First Name\",
\"input_type\": \"TEXT\",
\"default_value\": \"\\\"\\\"\",
\"combine_input_value_collection\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'custom_fields' => [
[
'label' => 'hdszgvcrxywvxrcpwfdwxxgntlmxfoxpfbembweqwzjhilmrebldjljqvzdclwycxz',
'combine_input_value_collection' => true,
],
],
'save_service_plan_as' => 'SERVICE_PLAN_ARCHIVED',
'label' => 'First Name',
'input_type' => 'TEXT',
'default_value' => '""',
'combine_input_value_collection' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"custom_fields": [
{
"label": "hdszgvcrxywvxrcpwfdwxxgntlmxfoxpfbembweqwzjhilmrebldjljqvzdclwycxz",
"combine_input_value_collection": true
}
],
"save_service_plan_as": "SERVICE_PLAN_ARCHIVED",
"label": "First Name",
"input_type": "TEXT",
"default_value": "\"\"",
"combine_input_value_collection": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Display the specified Service Plan Custom Field.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/dolor" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/dolor',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/dolor"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update (Single/Multiple)
requires authentication
Modify the specified Service Plan Custom Field. For Multiple update, @bodyparameter will be an array of the Single @bodyParameter (if uuid is included then perform an update; else, create new record).
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/qui" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"custom_fields\": [
{
\"label\": \"btghosqwytrphagxbysuoeefgcjqiuwwhhyzkofucgzpllmhhusg\",
\"combine_input_value_collection\": true
}
],
\"save_service_plan_as\": \"SERVICE_PLAN_ACTIVE\",
\"label\": \"First Name\",
\"input_type\": \"TEXT\",
\"default_value\": \"\\\"\\\"\",
\"combine_input_value_collection\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/qui',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'custom_fields' => [
[
'label' => 'btghosqwytrphagxbysuoeefgcjqiuwwhhyzkofucgzpllmhhusg',
'combine_input_value_collection' => true,
],
],
'save_service_plan_as' => 'SERVICE_PLAN_ACTIVE',
'label' => 'First Name',
'input_type' => 'TEXT',
'default_value' => '""',
'combine_input_value_collection' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/qui"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"custom_fields": [
{
"label": "btghosqwytrphagxbysuoeefgcjqiuwwhhyzkofucgzpllmhhusg",
"combine_input_value_collection": true
}
],
"save_service_plan_as": "SERVICE_PLAN_ACTIVE",
"label": "First Name",
"input_type": "TEXT",
"default_value": "\"\"",
"combine_input_value_collection": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Perform patches for the specified Service Plan Custom Field.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/similique" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"label\": \"First Name\",
\"input_type\": \"TEXT\",
\"default_value\": \"\\\"\\\"\",
\"combine_input_value_collection\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/similique',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'label' => 'First Name',
'input_type' => 'TEXT',
'default_value' => '""',
'combine_input_value_collection' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/similique"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"label": "First Name",
"input_type": "TEXT",
"default_value": "\"\"",
"combine_input_value_collection": true
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified Service Plan Custom Field.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/aut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/custom-fields/aut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Service Plan Pricing Group
API for Service Plan Pricing Group
List
requires authentication
Shows the list of Service Plan Pricing Group with pagination.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Create
requires authentication
Store a newly created Service Plan Pricing Group.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pricing_group\": [
\"et\"
],
\"name\": \"Premium Service Plan Pricing Group\",
\"frequency\": \"MONTHLY\",
\"pricing_type\": \"DYNAMIC_RANGE_PRICE\",
\"apply_taxes\": true,
\"description\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit...\",
\"pricing_data\": {
\"type\": \"The Price\",
\"default\": \"The Pricing\",
\"max\": \"1000.00\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'pricing_group' => [
'et',
],
'name' => 'Premium Service Plan Pricing Group',
'frequency' => 'MONTHLY',
'pricing_type' => 'DYNAMIC_RANGE_PRICE',
'apply_taxes' => true,
'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit...',
'pricing_data' => [
'type' => 'The Price',
'default' => 'The Pricing',
'max' => '1000.00',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pricing_group": [
"et"
],
"name": "Premium Service Plan Pricing Group",
"frequency": "MONTHLY",
"pricing_type": "DYNAMIC_RANGE_PRICE",
"apply_taxes": true,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit...",
"pricing_data": {
"type": "The Price",
"default": "The Pricing",
"max": "1000.00"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update (Single/Multiple)
requires authentication
Modify the specified Service Plan Pricing Group. For Single update, body parameter are all required. For Multiple update, @bodyparameter will be an array of the Single @bodyParameter (if uuid is included then perform update; else, create new).
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pricing_group\": [
\"dicta\"
],
\"pricing_group_rules\": [
\"est\"
],
\"save_service_plan_as\": \"SERVICE_PLAN_ARCHIVED\",
\"name\": \"Premium Service Plan Pricing Group\",
\"frequency\": \"MONTHLY\",
\"pricing_type\": \"DYNAMIC_RANGE_PRICE\",
\"apply_taxes\": true,
\"description\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit...\",
\"pricing_data\": {
\"type\": \"The Price\",
\"default\": \"The Pricing\",
\"max\": \"1000.00\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'pricing_group' => [
'dicta',
],
'pricing_group_rules' => [
'est',
],
'save_service_plan_as' => 'SERVICE_PLAN_ARCHIVED',
'name' => 'Premium Service Plan Pricing Group',
'frequency' => 'MONTHLY',
'pricing_type' => 'DYNAMIC_RANGE_PRICE',
'apply_taxes' => true,
'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit...',
'pricing_data' => [
'type' => 'The Price',
'default' => 'The Pricing',
'max' => '1000.00',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pricing_group": [
"dicta"
],
"pricing_group_rules": [
"est"
],
"save_service_plan_as": "SERVICE_PLAN_ARCHIVED",
"name": "Premium Service Plan Pricing Group",
"frequency": "MONTHLY",
"pricing_type": "DYNAMIC_RANGE_PRICE",
"apply_taxes": true,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit...",
"pricing_data": {
"type": "The Price",
"default": "The Pricing",
"max": "1000.00"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get
requires authentication
Display the specified Service Plan Pricing Group.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/dolores" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/dolores',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/dolores"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update (Single/Multiple)
requires authentication
Modify the specified Service Plan Pricing Group. For Single update, body parameter are all required. For Multiple update, @bodyparameter will be an array of the Single @bodyParameter (if uuid is included then perform update; else, create new).
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/deleniti" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pricing_group\": [
\"sunt\"
],
\"pricing_group_rules\": [
\"consequatur\"
],
\"save_service_plan_as\": \"SERVICE_PLAN_DRAFT\",
\"name\": \"Premium Service Plan Pricing Group\",
\"frequency\": \"MONTHLY\",
\"pricing_type\": \"DYNAMIC_RANGE_PRICE\",
\"apply_taxes\": true,
\"description\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit...\",
\"pricing_data\": {
\"type\": \"The Price\",
\"default\": \"The Pricing\",
\"max\": \"1000.00\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/deleniti',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'pricing_group' => [
'sunt',
],
'pricing_group_rules' => [
'consequatur',
],
'save_service_plan_as' => 'SERVICE_PLAN_DRAFT',
'name' => 'Premium Service Plan Pricing Group',
'frequency' => 'MONTHLY',
'pricing_type' => 'DYNAMIC_RANGE_PRICE',
'apply_taxes' => true,
'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit...',
'pricing_data' => [
'type' => 'The Price',
'default' => 'The Pricing',
'max' => '1000.00',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/deleniti"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pricing_group": [
"sunt"
],
"pricing_group_rules": [
"consequatur"
],
"save_service_plan_as": "SERVICE_PLAN_DRAFT",
"name": "Premium Service Plan Pricing Group",
"frequency": "MONTHLY",
"pricing_type": "DYNAMIC_RANGE_PRICE",
"apply_taxes": true,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit...",
"pricing_data": {
"type": "The Price",
"default": "The Pricing",
"max": "1000.00"
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Perform patches for the specified Service Plan Pricing Group.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/ab" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Premium Service Plan Pricing Group\",
\"frequency\": \"MONTHLY\",
\"pricing_type\": \"DYNAMIC_RANGE_PRICE\",
\"apply_taxes\": true,
\"description\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit...\",
\"pricing_data\": {
\"type\": \"The Price\",
\"default\": \"The Pricing\",
\"max\": \"1000.00\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/ab',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Premium Service Plan Pricing Group',
'frequency' => 'MONTHLY',
'pricing_type' => 'DYNAMIC_RANGE_PRICE',
'apply_taxes' => true,
'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit...',
'pricing_data' => [
'type' => 'The Price',
'default' => 'The Pricing',
'max' => '1000.00',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/ab"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Premium Service Plan Pricing Group",
"frequency": "MONTHLY",
"pricing_type": "DYNAMIC_RANGE_PRICE",
"apply_taxes": true,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit...",
"pricing_data": {
"type": "The Price",
"default": "The Pricing",
"max": "1000.00"
}
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified Service Plan Pricing Group.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/labore" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/labore',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/service-plans/2/pricing-groups/labore"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Solution
API for Solution
List
requires authentication
Shows the list of solutions.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solutions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solutions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single solution.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solutions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a new solution.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/solutions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"solution_category_uuid\": \"quas\",
\"name\": \"pariatur\",
\"slug\": \"solution-1\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"video_url\": \"\\\"https::somevideo.com\\/thevideoforpestroutes\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/solutions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'solution_category_uuid' => 'quas',
'name' => 'pariatur',
'slug' => 'solution-1',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'video_url' => '"https::somevideo.com/thevideoforpestroutes"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"solution_category_uuid": "quas",
"name": "pariatur",
"slug": "solution-1",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"video_url": "\"https::somevideo.com\/thevideoforpestroutes\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Store Image
requires authentication
Upload an image to solution
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/solutions/upload" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "fileUpload=@/tmp/phpoPHztx"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/solutions/upload',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'fileUpload',
'contents' => fopen('/tmp/phpoPHztx', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/upload"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('fileUpload', document.querySelector('input[name="fileUpload"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a solution.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"solution_category_uuid\": \"iusto\",
\"name\": \"eaque\",
\"slug\": \"solution-1\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"video_url\": \"\\\"https::somevideo.com\\/thevideoforpestroutes\\\"\",
\"status_uuid\": \"\\\"3c787d66-2a4f-3f1d-9591-c330be0abe82\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'solution_category_uuid' => 'iusto',
'name' => 'eaque',
'slug' => 'solution-1',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'video_url' => '"https::somevideo.com/thevideoforpestroutes"',
'status_uuid' => '"3c787d66-2a4f-3f1d-9591-c330be0abe82"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"solution_category_uuid": "iusto",
"name": "eaque",
"slug": "solution-1",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"video_url": "\"https::somevideo.com\/thevideoforpestroutes\"",
"status_uuid": "\"3c787d66-2a4f-3f1d-9591-c330be0abe82\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Reset
requires authentication
Reset a solution's user progress.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/reset" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/reset',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/reset"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update user progress
requires authentication
Update user progress.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/user-progress" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_completed\": true,
\"step\": []
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/user-progress',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'is_completed' => true,
'step' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/user-progress"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_completed": true,
"step": []
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch Index
requires authentication
Performs specific updates for solutions
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/sort" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/sort',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/sort"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a solution.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"solution_category_uuid\": \"recusandae\",
\"name\": \"voluptatem\",
\"slug\": \"solution-1\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"video_url\": \"\\\"https::somevideo.com\\/thevideoforpestroutes\\\"\",
\"status_uuid\": \"\\\"3c787d66-2a4f-3f1d-9591-c330be0abe82\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'solution_category_uuid' => 'recusandae',
'name' => 'voluptatem',
'slug' => 'solution-1',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'video_url' => '"https::somevideo.com/thevideoforpestroutes"',
'status_uuid' => '"3c787d66-2a4f-3f1d-9591-c330be0abe82"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"solution_category_uuid": "recusandae",
"name": "voluptatem",
"slug": "solution-1",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"video_url": "\"https::somevideo.com\/thevideoforpestroutes\"",
"status_uuid": "\"3c787d66-2a4f-3f1d-9591-c330be0abe82\""
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a solution.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Solution Category
API for Solution Category
List
requires authentication
Shows the list of solution categories.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solution-categories" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_fields\": [
\"solutions\"
],
\"ignore_cached\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'include_fields' => [
'solutions',
],
'ignore_cached' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_fields": [
"solutions"
],
"ignore_cached": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single solution category.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solution-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a new solution category.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"porro\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"parent_solution_category_uuid\": \"\\\"3c787d66-2a4f-3f1d-9591-c330be0abe82\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'porro',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'parent_solution_category_uuid' => '"3c787d66-2a4f-3f1d-9591-c330be0abe82"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "porro",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"parent_solution_category_uuid": "\"3c787d66-2a4f-3f1d-9591-c330be0abe82\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a solution category.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"nihil\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"parent_solution_category_uuid\": \"\\\"3c787d66-2a4f-3f1d-9591-c330be0abe82\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'nihil',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'parent_solution_category_uuid' => '"3c787d66-2a4f-3f1d-9591-c330be0abe82"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "nihil",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"parent_solution_category_uuid": "\"3c787d66-2a4f-3f1d-9591-c330be0abe82\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Reset
requires authentication
Reset a solution category user progress.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/reset" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/reset',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/reset"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Update user progress
requires authentication
Update user progress.
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/user-progress" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_completed\": true,
\"step\": []
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/user-progress',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'is_completed' => true,
'step' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/user-progress"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_completed": true,
"step": []
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch Index
requires authentication
Performs specific updates for solution categories
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/sort" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/sort',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1/sort"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a solution category.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"unde\",
\"description\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\",
\"parent_solution_category_uuid\": \"\\\"3c787d66-2a4f-3f1d-9591-c330be0abe82\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'unde',
'description' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
'parent_solution_category_uuid' => '"3c787d66-2a4f-3f1d-9591-c330be0abe82"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "unde",
"description": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\"",
"parent_solution_category_uuid": "\"3c787d66-2a4f-3f1d-9591-c330be0abe82\""
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Delete a solution category.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/solution-categories/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solution-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Solution Feedback
API for Solution Feedback
List
requires authentication
Shows the list of solution feedbacks.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show
requires authentication
Show a single solution.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/enim" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/enim',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/enim"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Store
requires authentication
Store a new solution feedback.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rate\": 10,
\"feedback\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'rate' => 10,
'feedback' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rate": 10,
"feedback": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update
requires authentication
Update a solution .
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/ex" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rate\": 12,
\"feedback\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/ex',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'rate' => 12,
'feedback' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/ex"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rate": 12,
"feedback": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
Patch a solution feedback.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/nobis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rate\": 12,
\"feedback\": \"\\\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/nobis',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'rate' => 12,
'feedback' => '"Lorem ipsum dolor sit amet consectetur adipisicing elit."',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/nobis"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rate": 12,
"feedback": "\"Lorem ipsum dolor sit amet consectetur adipisicing elit.\""
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/in" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/in',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/solutions/1/feedback/in"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
State
API for state details
List / Fetch
Shows the list of state or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/countries/1/states/beatae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"country_uuid\": \"ecd24580-2749-11ec-9b86-1102c06e74b4\",
\"country_state_uuid\": \"ed20f1c0-2749-11ec-85fa-a791bcbdc50d\",
\"name\": \"Queen Creek\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/countries/1/states/beatae',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'country_uuid' => 'ecd24580-2749-11ec-9b86-1102c06e74b4',
'country_state_uuid' => 'ed20f1c0-2749-11ec-85fa-a791bcbdc50d',
'name' => 'Queen Creek',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/countries/1/states/beatae"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"country_uuid": "ecd24580-2749-11ec-9b86-1102c06e74b4",
"country_state_uuid": "ed20f1c0-2749-11ec-85fa-a791bcbdc50d",
"name": "Queen Creek"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Support Request
API for Support Request
Store
requires authentication
Send support request from users
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/support-request" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"support_type\": \"\'General Inquiry\'\",
\"description\": \"\'I cannot access documents. Please help.\'\",
\"recordings\": [
\"adipisci\"
],
\"client_detail\": [
\"temporibus\"
],
\"screenshots_url\": [
\"https:\\/\\/example.net\\/image1.jpg\",
\"https:\\/\\/example.net\\/image1.png\"
],
\"error_detail\": [
\"unde\"
],
\"no_attachments\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/support-request',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'support_type' => '\'General Inquiry\'',
'description' => '\'I cannot access documents. Please help.\'',
'recordings' => [
'adipisci',
],
'client_detail' => [
'temporibus',
],
'screenshots_url' => [
'https://example.net/image1.jpg',
'https://example.net/image1.png',
],
'error_detail' => [
'unde',
],
'no_attachments' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/support-request"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"support_type": "'General Inquiry'",
"description": "'I cannot access documents. Please help.'",
"recordings": [
"adipisci"
],
"client_detail": [
"temporibus"
],
"screenshots_url": [
"https:\/\/example.net\/image1.jpg",
"https:\/\/example.net\/image1.png"
],
"error_detail": [
"unde"
],
"no_attachments": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Upload
requires authentication
Upload photos for Cover Letter or Photo Layout pages
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/support-request-upload/aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "document_template_page_title=Cover Letter" \
--form "title=Cover Letter Featured Image" \
--form "decription=Lorem ipsum dolor" \
--form "append=1" \
--form "screenshot_file=@/tmp/phpT4TqWz" \
--form "photo_file=@/tmp/php4bbRvy"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/support-request-upload/aut',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'document_template_page_title',
'contents' => 'Cover Letter'
],
[
'name' => 'title',
'contents' => 'Cover Letter Featured Image'
],
[
'name' => 'decription',
'contents' => 'Lorem ipsum dolor'
],
[
'name' => 'append',
'contents' => '1'
],
[
'name' => 'screenshot_file',
'contents' => fopen('/tmp/phpT4TqWz', 'r')
],
[
'name' => 'photo_file',
'contents' => fopen('/tmp/php4bbRvy', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/support-request-upload/aut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('document_template_page_title', 'Cover Letter');
body.append('title', 'Cover Letter Featured Image');
body.append('decription', 'Lorem ipsum dolor');
body.append('append', '1');
body.append('screenshot_file', document.querySelector('input[name="screenshot_file"]').files[0]);
body.append('photo_file', document.querySelector('input[name="photo_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Tag
API for Tag
List
requires authentication
Shows the list of tags with pagination.
User
API for user details
List / Fetch
requires authentication
Shows the list of users or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List / Fetch
requires authentication
Shows the list of users or fetch single record using uuid.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Store user profile pic.
requires authentication
This endpoint lets user to upload or update profile picture.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/users/3/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "uuid=3245d630-24fd-11ec-accd-e397aec85c7f" \
--form "profile_photo_url=@/tmp/phpogkQLy"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/users/3/image',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'uuid',
'contents' => '3245d630-24fd-11ec-accd-e397aec85c7f'
],
[
'name' => 'profile_photo_url',
'contents' => fopen('/tmp/phpogkQLy', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3/image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('uuid', '3245d630-24fd-11ec-accd-e397aec85c7f');
body.append('profile_photo_url', document.querySelector('input[name="profile_photo_url"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Store user signature pic.
requires authentication
This endpoint lets user to upload or update signature picture.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/users/3/signature-image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "uuid=3245d630-24fd-11ec-accd-e397aec85c7f" \
--form "signature_photo_url=@/tmp/php1zWXSz"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/users/3/signature-image',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'uuid',
'contents' => '3245d630-24fd-11ec-accd-e397aec85c7f'
],
[
'name' => 'signature_photo_url',
'contents' => fopen('/tmp/php1zWXSz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3/signature-image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('uuid', '3245d630-24fd-11ec-accd-e397aec85c7f');
body.append('signature_photo_url', document.querySelector('input[name="signature_photo_url"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update.
requires authentication
This endpoint lets user to create or update single record using uuid
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "uuid=3245d630-24fd-11ec-accd-e397aec85c7f" \
--form "first_name=John" \
--form "last_name=Smith" \
--form "phone=7897897894" \
--form "email=hello@smarterlaunch.com" \
--form "position=Manager" \
--form "new_password=XXX" \
--form "confirm_new_password=XTXT" \
--form "profile_photo_url=@/tmp/phpNSH4Iz"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'uuid',
'contents' => '3245d630-24fd-11ec-accd-e397aec85c7f'
],
[
'name' => 'first_name',
'contents' => 'John'
],
[
'name' => 'last_name',
'contents' => 'Smith'
],
[
'name' => 'phone',
'contents' => '7897897894'
],
[
'name' => 'email',
'contents' => 'hello@smarterlaunch.com'
],
[
'name' => 'position',
'contents' => 'Manager'
],
[
'name' => 'new_password',
'contents' => 'XXX'
],
[
'name' => 'confirm_new_password',
'contents' => 'XTXT'
],
[
'name' => 'profile_photo_url',
'contents' => fopen('/tmp/phpNSH4Iz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('uuid', '3245d630-24fd-11ec-accd-e397aec85c7f');
body.append('first_name', 'John');
body.append('last_name', 'Smith');
body.append('phone', '7897897894');
body.append('email', 'hello@smarterlaunch.com');
body.append('position', 'Manager');
body.append('new_password', 'XXX');
body.append('confirm_new_password', 'XTXT');
body.append('profile_photo_url', document.querySelector('input[name="profile_photo_url"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Create / Update.
requires authentication
This endpoint lets user to create or update single record using uuid
Example request:
curl --request PUT \
"https://staging.api.smarterlaunch.com/api/v1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "uuid=3245d630-24fd-11ec-accd-e397aec85c7f" \
--form "first_name=John" \
--form "last_name=Smith" \
--form "phone=7897897894" \
--form "email=hello@smarterlaunch.com" \
--form "position=Manager" \
--form "new_password=XXX" \
--form "confirm_new_password=XTXT" \
--form "profile_photo_url=@/tmp/phpfwctJz"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://staging.api.smarterlaunch.com/api/v1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'uuid',
'contents' => '3245d630-24fd-11ec-accd-e397aec85c7f'
],
[
'name' => 'first_name',
'contents' => 'John'
],
[
'name' => 'last_name',
'contents' => 'Smith'
],
[
'name' => 'phone',
'contents' => '7897897894'
],
[
'name' => 'email',
'contents' => 'hello@smarterlaunch.com'
],
[
'name' => 'position',
'contents' => 'Manager'
],
[
'name' => 'new_password',
'contents' => 'XXX'
],
[
'name' => 'confirm_new_password',
'contents' => 'XTXT'
],
[
'name' => 'profile_photo_url',
'contents' => fopen('/tmp/phpfwctJz', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('uuid', '3245d630-24fd-11ec-accd-e397aec85c7f');
body.append('first_name', 'John');
body.append('last_name', 'Smith');
body.append('phone', '7897897894');
body.append('email', 'hello@smarterlaunch.com');
body.append('position', 'Manager');
body.append('new_password', 'XXX');
body.append('confirm_new_password', 'XTXT');
body.append('profile_photo_url', document.querySelector('input[name="profile_photo_url"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Patch
requires authentication
This endpoint allows users to patch their user info.
Example request:
curl --request PATCH \
"https://staging.api.smarterlaunch.com/api/v1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "first_name=sequi" \
--form "last_name=id" \
--form "phone=+7309601721" \
--form "position=nostrum" \
--form "settings[dark_theme]=" \
--form "settings[integrations][isn][]=quaerat" \
--form "settings[integrations][wisetack][]=ab" \
--form "uuid=3245d630-24fd-11ec-accd-e397aec85c7f" \
--form "profile_photo_url=@/tmp/php6QFV9v"
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://staging.api.smarterlaunch.com/api/v1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'first_name',
'contents' => 'sequi'
],
[
'name' => 'last_name',
'contents' => 'id'
],
[
'name' => 'phone',
'contents' => '+7309601721'
],
[
'name' => 'position',
'contents' => 'nostrum'
],
[
'name' => 'settings[dark_theme]',
'contents' => ''
],
[
'name' => 'settings[integrations][isn][]',
'contents' => 'quaerat'
],
[
'name' => 'settings[integrations][wisetack][]',
'contents' => 'ab'
],
[
'name' => 'uuid',
'contents' => '3245d630-24fd-11ec-accd-e397aec85c7f'
],
[
'name' => 'profile_photo_url',
'contents' => fopen('/tmp/php6QFV9v', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('first_name', 'sequi');
body.append('last_name', 'id');
body.append('phone', '+7309601721');
body.append('position', 'nostrum');
body.append('settings[dark_theme]', '');
body.append('settings[integrations][isn][]', 'quaerat');
body.append('settings[integrations][wisetack][]', 'ab');
body.append('uuid', '3245d630-24fd-11ec-accd-e397aec85c7f');
body.append('profile_photo_url', document.querySelector('input[name="profile_photo_url"]').files[0]);
fetch(url, {
method: "PATCH",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Remove Profile pic.
requires authentication
Only self user can remove his profile picture.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/users/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/users/image',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove Profile pic.
requires authentication
Only self user can remove his profile picture.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/users/3/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/users/3/image',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3/image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Delete
requires authentication
This end point allows user to delete the user-account.
Example request:
curl --request DELETE \
"https://staging.api.smarterlaunch.com/api/v1/users/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"uuid\": \"3245d630-24fd-11ec-accd-e397aec85c7f\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://staging.api.smarterlaunch.com/api/v1/users/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uuid' => '3245d630-24fd-11ec-accd-e397aec85c7f',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/users/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uuid": "3245d630-24fd-11ec-accd-e397aec85c7f"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
User Authentication
API for user authentication
Company Registration.
This endpoint lets company owner/manager to register.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_name\": \"Smarter Launch\",
\"first_name\": \"John\",
\"last_name\": \"Smith\",
\"email\": \"hello@smarterlaunch.com\",
\"password\": \"$m@4T34L@un(}{\",
\"confirm_password\": \"$m@4T34L@un(}{\",
\"referral_source\": \"google ad\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/register',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_name' => 'Smarter Launch',
'first_name' => 'John',
'last_name' => 'Smith',
'email' => 'hello@smarterlaunch.com',
'password' => '$m@4T34L@un(}{',
'confirm_password' => '$m@4T34L@un(}{',
'referral_source' => 'google ad',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_name": "Smarter Launch",
"first_name": "John",
"last_name": "Smith",
"email": "hello@smarterlaunch.com",
"password": "$m@4T34L@un(}{",
"confirm_password": "$m@4T34L@un(}{",
"referral_source": "google ad"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Company registration using social account.
This endpoint lets company to register using social account.
User registration based on company invite.
This endpoint lets you user to register himself who are invited by company.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/register/company-user" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Smith\",
\"email\": \"hello@smarterlaunch.com\",
\"password\": \"$m@4T34L@un(}{\",
\"confirm_password\": \"$m@4T34L@un(}{\",
\"token\": \"7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/register/company-user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'first_name' => 'John',
'last_name' => 'Smith',
'email' => 'hello@smarterlaunch.com',
'password' => '$m@4T34L@un(}{',
'confirm_password' => '$m@4T34L@un(}{',
'token' => '7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/register/company-user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"last_name": "Smith",
"email": "hello@smarterlaunch.com",
"password": "$m@4T34L@un(}{",
"confirm_password": "$m@4T34L@un(}{",
"token": "7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
User registration using social account based on company invite.
This endpoint lets user to register using social account.
Login.
This endpoint allows common login into the system.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"hello@smarterlaunch.com\",
\"password\": \"xxxxxx\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'hello@smarterlaunch.com',
'password' => 'xxxxxx',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "hello@smarterlaunch.com",
"password": "xxxxxx"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Social Login.
This endpoint lets you login into the system using a 3rd party provider.
Forgot password.
This endpoint lets user to get token to change password.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/forgot-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"hello@smarterlaunch.com\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/forgot-password',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'hello@smarterlaunch.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/forgot-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "hello@smarterlaunch.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Validate Bearer token.
This endpoint lets user to validate token, on success returns token object.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/token-validate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bearer_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/token-validate',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'bearer_token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/token-validate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bearer_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get Token Expiration This endpoint allows client to retrieve their user token expiration date.
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/auth/token-expiration" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"hello@smarterlaunch.com\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/auth/token-expiration',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'hello@smarterlaunch.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/token-expiration"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "hello@smarterlaunch.com"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Verify email.
This endpoint lets the user verify their email and login with token and password.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/verify-email" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"hello@smarterlaunch.com\",
\"password\": \"$m@4T34L@un(}{\",
\"token\": \"123456\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/verify-email',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'hello@smarterlaunch.com',
'password' => '$m@4T34L@un(}{',
'token' => '123456',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/verify-email"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "hello@smarterlaunch.com",
"password": "$m@4T34L@un(}{",
"token": "123456"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Resend the email verification notification.
requires authentication
This endpoint lets user to resend email verification notification.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/verify-email-resend" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/verify-email-resend',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/verify-email-resend"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Reset password.
requires authentication
This endpoint lets the user reset their password.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/reset-password" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"hello@smarterlaunch.com\",
\"password\": \"$m@4T34L@un(}{\",
\"confirm_password\": \"$m@4T34L@un(}{\",
\"token\": \"7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/reset-password',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'hello@smarterlaunch.com',
'password' => '$m@4T34L@un(}{',
'confirm_password' => '$m@4T34L@un(}{',
'token' => '7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/reset-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "hello@smarterlaunch.com",
"password": "$m@4T34L@un(}{",
"confirm_password": "$m@4T34L@un(}{",
"token": "7hKxKlz5sKHlqXFkkCfsKpj9iVPoaSlM18Uv5JuehYXQfTme33XtxGmNQ1yE"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get invited user by token
Example request:
curl --request GET \
--get "https://staging.api.smarterlaunch.com/api/v1/auth/user-invite" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"BMj4tHdI9jeRidv8O6emwqwepk34sl2tYrm1gakhDhqgOxdi7JO4BEkJG4yh\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://staging.api.smarterlaunch.com/api/v1/auth/user-invite',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'token' => 'BMj4tHdI9jeRidv8O6emwqwepk34sl2tYrm1gakhDhqgOxdi7JO4BEkJG4yh',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/user-invite"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "BMj4tHdI9jeRidv8O6emwqwepk34sl2tYrm1gakhDhqgOxdi7JO4BEkJG4yh"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Logout.
requires authentication
let's user to logout.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/auth/logout',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
User Device Management.
requires authentication
This endpoint lets user to add device information.
Example request:
curl --request POST \
"https://staging.api.smarterlaunch.com/api/v1/device-info/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pushtoken\": \"xxxxx\",
\"device_name\": \"iPhone 12\",
\"device_id\": \"skdlfsk-sfs-dsfsdf-sdfs\",
\"app_version\": \"v1\",
\"os_version\": \"iOS 14.1\",
\"time_zone\": \"NZ\",
\"platform\": \"Apple\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://staging.api.smarterlaunch.com/api/v1/device-info/store',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'pushtoken' => 'xxxxx',
'device_name' => 'iPhone 12',
'device_id' => 'skdlfsk-sfs-dsfsdf-sdfs',
'app_version' => 'v1',
'os_version' => 'iOS 14.1',
'time_zone' => 'NZ',
'platform' => 'Apple',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://staging.api.smarterlaunch.com/api/v1/device-info/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pushtoken": "xxxxx",
"device_name": "iPhone 12",
"device_id": "skdlfsk-sfs-dsfsdf-sdfs",
"app_version": "v1",
"os_version": "iOS 14.1",
"time_zone": "NZ",
"platform": "Apple"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error: