Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
https://digitalsero-develop-api.b5digital.dk
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
AccessRequests
List All AccessRequests
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/access-requests/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/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://digitalsero-staging-api.b5digital.dk/api/access-requests/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
Send Email to Client with Access Request Link
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/send-email" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"requestId\": \"\\\"b90eac01-12c1-4d3f-a0aa-df230c76fa79\\\"\",
\"email\": \"hello@gmail.com\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/send-email',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'requestId' => '"b90eac01-12c1-4d3f-a0aa-df230c76fa79"',
'email' => 'hello@gmail.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/send-email"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"requestId": "\"b90eac01-12c1-4d3f-a0aa-df230c76fa79\"",
"email": "hello@gmail.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
List AccessRequests For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/access-requests" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests',
[
'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://digitalsero-staging-api.b5digital.dk/api/access-requests"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
Add AccessRequest
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"providers\": [
{
\"id\": \"ut\",
\"email\": \"emmalee.damore@example.org\",
\"assets\": [
{
\"type\": \"soluta\",
\"role\": \"qui\",
\"manager\": {
\"id\": \"non\",
\"name\": \"minima\"
}
}
]
}
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'providers' => [
[
'id' => 'ut',
'email' => 'emmalee.damore@example.org',
'assets' => [
[
'type' => 'soluta',
'role' => 'qui',
'manager' => [
'id' => 'non',
'name' => 'minima',
],
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/access-requests"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"providers": [
{
"id": "ut",
"email": "emmalee.damore@example.org",
"assets": [
{
"type": "soluta",
"role": "qui",
"manager": {
"id": "non",
"name": "minima"
}
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Delete AccessRequest
requires authentication
Example request:
curl --request DELETE \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9',
[
'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://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"message": "access_request deleted successfully",
"data": null,
}
}
Received response:
Request failed with error:
List Request assets for given providers
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets?providers=META%2CGOOGLE" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"providerIds\": [
\"illo\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'providers'=> 'META,GOOGLE',
],
'json' => [
'providerIds' => [
'illo',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets"
);
const params = {
"providers": "META,GOOGLE",
};
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 = {
"providerIds": [
"illo"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Request assets listed successfully",
"data": [
{
"id": "GOOGLE",
"types": [
{
"type": "GOOGLE_ADS",
"assets": [
{
"id": 1,
"name": "Google Ads Account"
}
],
"error": ""
}
]
}
]
}
Received response:
Request failed with error:
Show AccessRequest As Client
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9',
[
'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://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"type": "UNKNOWN",
"message": "Invalid Host \"{agencysubdomain}.digitalsero-staging-api.b5digital.dk\".",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
Show AccessRequest
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9',
[
'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://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
POST api/access-requests/{requestId}/grant-access
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"requestId\": \"a245cd48-593e-38fb-a568-092dfa512b09\",
\"providers\": [
{
\"id\": \"beatae\",
\"assetTypes\": [
{
\"type\": \"nemo\",
\"assets\": [
{
\"id\": \"imj\",
\"name\": \"pbelnlocjgflyjepchxrbximpabuuwivyjzebrfrmwgghmlvjhpoikgqwmjp\",
\"businessCenterId\": \"xuhcg\",
\"business\": {
\"id\": \"phlwiqkdsy\",
\"name\": \"hhvfpvwzepurkjgnxbiuauggojlhytvthvmwvjiovctwqwwngrgwykajryznekhssjchssdvvc\"
}
}
]
}
]
}
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'requestId' => 'a245cd48-593e-38fb-a568-092dfa512b09',
'providers' => [
[
'id' => 'beatae',
'assetTypes' => [
[
'type' => 'nemo',
'assets' => [
[
'id' => 'imj',
'name' => 'pbelnlocjgflyjepchxrbximpabuuwivyjzebrfrmwgghmlvjhpoikgqwmjp',
'businessCenterId' => 'xuhcg',
'business' => [
'id' => 'phlwiqkdsy',
'name' => 'hhvfpvwzepurkjgnxbiuauggojlhytvthvmwvjiovctwqwwngrgwykajryznekhssjchssdvvc',
],
],
],
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"requestId": "a245cd48-593e-38fb-a568-092dfa512b09",
"providers": [
{
"id": "beatae",
"assetTypes": [
{
"type": "nemo",
"assets": [
{
"id": "imj",
"name": "pbelnlocjgflyjepchxrbximpabuuwivyjzebrfrmwgghmlvjhpoikgqwmjp",
"businessCenterId": "xuhcg",
"business": {
"id": "phlwiqkdsy",
"name": "hhvfpvwzepurkjgnxbiuauggojlhytvthvmwvjiovctwqwwngrgwykajryznekhssjchssdvvc"
}
}
]
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Clone Access Request
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/clone" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/clone',
[
'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://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/clone"
);
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:
POST api/access-requests/{requestId}/request-access
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/request-access" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"requestId\": \"5af8c43c-176e-3472-ba65-1f037655e9ac\",
\"providers\": [
{
\"id\": \"qui\",
\"assetTypes\": [
{
\"type\": \"culpa\",
\"assets\": [
{
\"id\": \"tquiwziboxhblfaiaalntbym\",
\"name\": \"pbyntabxrvmhvntaojtvhckaxnwhoccizqsrizccxtsqzqfzatwxdgoepbptztbntqvawwsfvjnapbnezgjrjtajppxbnuuvgcrhmzzjckljixdfjcvaxlntcqkhprpgkycaghfpq\",
\"businessCenterId\": \"la\",
\"business\": {
\"id\": \"uvytmfdjlhimibpzpletbhzekdjzhtcnqjvzkkcdnqzf\",
\"name\": \"vrjpfoiiphwczwzhpeffuwomteztajskigvnbngfbffbzehlptismelghxkvufvyasqzbxdicm\"
}
}
]
}
]
}
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/request-access',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'requestId' => '5af8c43c-176e-3472-ba65-1f037655e9ac',
'providers' => [
[
'id' => 'qui',
'assetTypes' => [
[
'type' => 'culpa',
'assets' => [
[
'id' => 'tquiwziboxhblfaiaalntbym',
'name' => 'pbyntabxrvmhvntaojtvhckaxnwhoccizqsrizccxtsqzqfzatwxdgoepbptztbntqvawwsfvjnapbnezgjrjtajppxbnuuvgcrhmzzjckljixdfjcvaxlntcqkhprpgkycaghfpq',
'businessCenterId' => 'la',
'business' => [
'id' => 'uvytmfdjlhimibpzpletbhzekdjzhtcnqjvzkkcdnqzf',
'name' => 'vrjpfoiiphwczwzhpeffuwomteztajskigvnbngfbffbzehlptismelghxkvufvyasqzbxdicm',
],
],
],
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/request-access"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"requestId": "5af8c43c-176e-3472-ba65-1f037655e9ac",
"providers": [
{
"id": "qui",
"assetTypes": [
{
"type": "culpa",
"assets": [
{
"id": "tquiwziboxhblfaiaalntbym",
"name": "pbyntabxrvmhvntaojtvhckaxnwhoccizqsrizccxtsqzqfzatwxdgoepbptztbntqvawwsfvjnapbnezgjrjtajppxbnuuvgcrhmzzjckljixdfjcvaxlntcqkhprpgkycaghfpq",
"businessCenterId": "la",
"business": {
"id": "uvytmfdjlhimibpzpletbhzekdjzhtcnqjvzkkcdnqzf",
"name": "vrjpfoiiphwczwzhpeffuwomteztajskigvnbngfbffbzehlptismelghxkvufvyasqzbxdicm"
}
}
]
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Agencies
Agency profile
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/agencies/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/me',
[
'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://digitalsero-staging-api.b5digital.dk/api/agencies/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
Update My Agency
requires authentication
Example request:
curl --request PUT \
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Agency name\",
\"whitelabellingEnabled\": true,
\"fontColor\": \"#fff\",
\"whitelabellingSettings\": {
\"invertColor\": false,
\"isDark\": true
},
\"subdomainEnabled\": true,
\"primaryColor\": \"#fff\",
\"backgroundColor\": \"#fff\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/me',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Agency name',
'whitelabellingEnabled' => true,
'fontColor' => '#fff',
'whitelabellingSettings' => [
'invertColor' => false,
'isDark' => true,
],
'subdomainEnabled' => true,
'primaryColor' => '#fff',
'backgroundColor' => '#fff',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Agency name",
"whitelabellingEnabled": true,
"fontColor": "#fff",
"whitelabellingSettings": {
"invertColor": false,
"isDark": true
},
"subdomainEnabled": true,
"primaryColor": "#fff",
"backgroundColor": "#fff"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Update My Agency logo
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "logo=@/tmp/phpQ4Jr6G" $client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'logo',
'contents' => fopen('/tmp/phpQ4Jr6G', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
List Agencies For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/agencies" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/agencies',
[
'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://digitalsero-staging-api.b5digital.dk/api/agencies"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
Invite Agency
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/agencies/invite" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sneciepekknasekrcunhpzrnlxxxtytthwukeuyjqbjvcjusslg\",
\"admin\": {
\"name\": \"dgzvimcdr\",
\"email\": \"cpmaxcmjdqvacjzyohdetuvcompavrtrwjldcsqjrnkkszpsydjetpkuaqmjdnzlvrlnbpnbvwkmggxctphkkzycwquowycvfbbvdzwryiletwdzcrgsvdcbtbqixcdzxgmyjlzczsaqxiubuwtptvuacfezvtkvvuxqtzkhpxldfjjmlmhdlbtnfeorhzxnkjilhwpceqma\",
\"password\": \"dolorum\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/invite',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'sneciepekknasekrcunhpzrnlxxxtytthwukeuyjqbjvcjusslg',
'admin' => [
'name' => 'dgzvimcdr',
'email' => 'cpmaxcmjdqvacjzyohdetuvcompavrtrwjldcsqjrnkkszpsydjetpkuaqmjdnzlvrlnbpnbvwkmggxctphkkzycwquowycvfbbvdzwryiletwdzcrgsvdcbtbqixcdzxgmyjlzczsaqxiubuwtptvuacfezvtkvvuxqtzkhpxldfjjmlmhdlbtnfeorhzxnkjilhwpceqma',
'password' => 'dolorum',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/agencies/invite"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sneciepekknasekrcunhpzrnlxxxtytthwukeuyjqbjvcjusslg",
"admin": {
"name": "dgzvimcdr",
"email": "cpmaxcmjdqvacjzyohdetuvcompavrtrwjldcsqjrnkkszpsydjetpkuaqmjdnzlvrlnbpnbvwkmggxctphkkzycwquowycvfbbvdzwryiletwdzcrgsvdcbtbqixcdzxgmyjlzczsaqxiubuwtptvuacfezvtkvvuxqtzkhpxldfjjmlmhdlbtnfeorhzxnkjilhwpceqma",
"password": "dolorum"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Remove My Agency logo
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo/remove" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo/remove',
[
'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://digitalsero-staging-api.b5digital.dk/api/agencies/me/logo/remove"
);
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 agency billing information
requires authentication
Example request:
curl --request PUT \
"https://digitalsero-staging-api.b5digital.dk/api/agencies/me/billing-info" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://digitalsero-staging-api.b5digital.dk/api/agencies/me/billing-info',
[
'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://digitalsero-staging-api.b5digital.dk/api/agencies/me/billing-info"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Checkout Done Successfully",
"data": {
"session": {
"id": "bps_1MgldOHlSdZh4mNSiP8XGd3x",
"object": "billing_portal.session",
"configuration": "bpc_1MMVvbHlSdZh4mNSLayW7O22",
"created": 1677661658,
"customer": "cus_NMn44Vx47uPaeq",
"flow": null,
"livemode": false,
"locale": null,
"on_behalf_of": null,
"return_url": "https://digitalsero-backend.test/subscriptions",
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xOGY5NExIbFNkWmg0bU5TLF9OUmV4VTNPQk9MUW5sOERmeWdoUm5ZS25WQnVuVHNY0100DR7sNYlu/subscriptions/sub_1Mc3VxHlSdZh4mNSvm8UtsKo/preview/price_1MdaF1HlSdZh4mNSyrCsx8Bw"
}
}
}
Received response:
Request failed with error:
Auth
Forget Password
Send a reset link to the given user.
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/forgot-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"admin@b5digital.dk\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/forgot-password',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'admin@b5digital.dk',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/forgot-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "admin@b5digital.dk"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "We have e-mailed your password reset link!",
}
Received response:
Request failed with error:
Reset Password
Reset the given user's password.
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/reset-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"et\",
\"email\": \"admin@b5digital.dk\",
\"password\": \"password\",
\"password_confirmation\": \"password\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/reset-password',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'token' => 'et',
'email' => 'admin@b5digital.dk',
'password' => 'password',
'password_confirmation' => 'password',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/reset-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "et",
"email": "admin@b5digital.dk",
"password": "password",
"password_confirmation": "password"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Your password has been reset!",
}
Received response:
Request failed with error:
Register
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"john\",
\"email\": \"john@b5digital.dk\",
\"password\": \"aaA1$2211\",
\"password_confirmation\": \"aaA1$2211\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/register',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'john',
'email' => 'john@b5digital.dk',
'password' => 'aaA1$2211',
'password_confirmation' => 'aaA1$2211',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "john",
"email": "john@b5digital.dk",
"password": "aaA1$2211",
"password_confirmation": "aaA1$2211"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Create Testing Token
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/create-testing-token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"admin@b5digital.dk\",
\"password\": \"aaA1$2211\",
\"roleId\": \"\\\"AGENCY_ADMIN\\\" fetched from List Roles API\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/create-testing-token',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'admin@b5digital.dk',
'password' => 'aaA1$2211',
'roleId' => '"AGENCY_ADMIN" fetched from List Roles API',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/create-testing-token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "admin@b5digital.dk",
"password": "aaA1$2211",
"roleId": "\"AGENCY_ADMIN\" fetched from List Roles API"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"access_token": "<<ACCESS_TOKEN>>",
}
}
Received response:
Request failed with error:
Change Password
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/change-password" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"old_password\": \"password\",
\"new_password\": \"123456789\",
\"new_password_confirmation\": \"123456789\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/change-password',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'old_password' => 'password',
'new_password' => '123456789',
'new_password_confirmation' => '123456789',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"old_password": "password",
"new_password": "123456789",
"new_password_confirmation": "123456789"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"message": "Password has been changed successfully",
"data": null,
}
}
Received response:
Request failed with error:
Generate RedirectUrl to your different providers.
Handle callback from your provider. add user to system and login if not logged in yet.
Login
To authenticate your SPA,
your SPA's "login" page should first make a request to the /sanctum/csrf-cookie endpoint
to initialize CSRF protection for the application.
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"admin@b5digital.dk\",
\"password\": \"aaA1$2211\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'admin@b5digital.dk',
'password' => 'aaA1$2211',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "admin@b5digital.dk",
"password": "aaA1$2211"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"message": "You have logged in successfully",
"data": null,
}
}
Received response:
Request failed with error:
Logout
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/logout',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"message": "You have logged out successfully",
"data": null,
}
}
Received response:
Request failed with error:
Resend Email Verification.
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/auth/email/resend-verification/admin" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/auth/email/resend-verification/admin',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/email/resend-verification/admin"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Verification email sent."
}
Received response:
Request failed with error:
Verify email.
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/auth/email/verify/admin?expires=165623434&hash=35a3e83c342877e48bb249d6979b0f46aeb4d5ec&signature=095ff82b52815772a9ea9e2f505e46546a684a1b0df11bc23a3f5857e177f0a8" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/auth/email/verify/admin',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'expires'=> '165623434',
'hash'=> '35a3e83c342877e48bb249d6979b0f46aeb4d5ec',
'signature'=> '095ff82b52815772a9ea9e2f505e46546a684a1b0df11bc23a3f5857e177f0a8',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/auth/email/verify/admin"
);
const params = {
"expires": "165623434",
"hash": "35a3e83c342877e48bb249d6979b0f46aeb4d5ec",
"signature": "095ff82b52815772a9ea9e2f505e46546a684a1b0df11bc23a3f5857e177f0a8",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Email Verified"
}
Received response:
Request failed with error:
DemoAccessRequests
View AccessRequest As Demo
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9',
[
'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://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-fe-build-version: 21
vary: Origin
{
"type": "UNAUTHENTICATED",
"message": "Authentication failed. Please check your credentials and try again.",
"details": [],
"trace": ""
}
Received response:
Request failed with error:
List Request assets for given providers
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets?providers=META%2CGOOGLE" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"providerIds\": [
\"amet\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'providers'=> 'META,GOOGLE',
],
'json' => [
'providerIds' => [
'amet',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/assets"
);
const params = {
"providers": "META,GOOGLE",
};
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 = {
"providerIds": [
"amet"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Request assets listed successfully",
"data": [
{
"id": "GOOGLE",
"types": [
{
"type": "GOOGLE_ADS",
"assets": [
{
"id": 1,
"name": "Google Ads Account"
}
],
"error": ""
}
]
}
]
}
Received response:
Request failed with error:
Grant dummy access to certain request
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"requestId\": \"57497559-260d-3571-825c-923316fd60dd\",
\"providers\": [
{
\"id\": \"doloribus\",
\"assetTypes\": [
{
\"type\": \"omnis\",
\"assets\": [
{
\"id\": \"hanp\",
\"name\": \"nexegydaojkrpaddwltpmppdjiebqqtwljnevfbdrullgkrlqwlxeipawoppmngajjkszpkrylpowbelgdjcwriaaw\",
\"businessCenterId\": \"fmxnggqww\"
}
]
}
]
}
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'requestId' => '57497559-260d-3571-825c-923316fd60dd',
'providers' => [
[
'id' => 'doloribus',
'assetTypes' => [
[
'type' => 'omnis',
'assets' => [
[
'id' => 'hanp',
'name' => 'nexegydaojkrpaddwltpmppdjiebqqtwljnevfbdrullgkrlqwlxeipawoppmngajjkszpkrylpowbelgdjcwriaaw',
'businessCenterId' => 'fmxnggqww',
],
],
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/demo/access-requests/01a9af28-3ee1-4529-8a79-af6f5a447ba9/grant-access"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"requestId": "57497559-260d-3571-825c-923316fd60dd",
"providers": [
{
"id": "doloribus",
"assetTypes": [
{
"type": "omnis",
"assets": [
{
"id": "hanp",
"name": "nexegydaojkrpaddwltpmppdjiebqqtwljnevfbdrullgkrlqwlxeipawoppmngajjkszpkrylpowbelgdjcwriaaw",
"businessCenterId": "fmxnggqww"
}
]
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Endpoints
GET api/configurations
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/configurations" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/configurations',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/configurations"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-fe-build-version: 21
vary: Origin
{
"sessionLifetime": "600",
"fe_build_version": "21"
}
Received response:
Request failed with error:
POST api/configurations/fe-version/increment
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/configurations/fe-version/increment" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/configurations/fe-version/increment',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/configurations/fe-version/increment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
GET api/social-providers/google/ad-accounts
requires authentication
GET api/social-providers/google/analytics-accounts
requires authentication
GET api/social-providers/google/business-profile-accounts
requires authentication
GET api/social-providers/google/tag-manager-accounts
requires authentication
GET api/social-providers/google/search-console
requires authentication
GET api/demo/social-providers/google/ad-accounts
requires authentication
GET api/demo/social-providers/google/analytics-accounts
requires authentication
GET api/demo/social-providers/google/business-profile-accounts
requires authentication
GET api/demo/social-providers/google/tag-manager-accounts
requires authentication
GET api/demo/social-providers/google/search-console
requires authentication
GET api/social-providers/google/merchant
requires authentication
GET api/demo/social-providers/google/merchant
requires authentication
GET api/social-providers/google/ads/mcc
requires authentication
Insights
Get Total Verified Agencies
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/verified" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/verified',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/verified"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"count": 7
}
Received response:
Request failed with error:
Get Total Not Verified Agencies
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/not-verified" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/not-verified',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/not-verified"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"count": 1
}
Received response:
Request failed with error:
Get Total Sent Requests
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/all" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/all',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/all"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"count": 7
}
Received response:
Request failed with error:
Get Total Requests Per Agency
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/requests" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/requests',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/agencies/requests"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"average_requests": 2,
"total_requests_per_agency": [
{
"name": "Marwan",
"requests": 73
}
]
}
Received response:
Request failed with error:
Get Total Plans
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/prices" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/prices',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/prices"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"totalSubscriptions": 3,
"total_subscriptions_per_price": [
{
"name": "R prod",
"subscriptions": 1,
"percentage": 33
},
]
}
Received response:
Request failed with error:
Get Total Pending Requests
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/pending" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/pending',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/pending"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"count": 5
}
Received response:
Request failed with error:
Get Total Granted Requests
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/completed" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/completed',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/completed"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"granted_count": 7
}
Received response:
Request failed with error:
Get Total Pending Requests
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/in-progress" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/in-progress',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/insights/requests/in-progress"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"count": 5
}
Received response:
Request failed with error:
Invoices
List All Invoices
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/invoices/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/invoices/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://digitalsero-staging-api.b5digital.dk/api/invoices/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"amount_due": 0,
"amount_remaining": 0,
"amount_paid": null,
"currency": "$",
"status": null,
"account_name": null,
"billing_reason": "manual",
"description": "Over Usage Charge",
"paid": null,
"fileName": "DigitalSero_25-03-2024_",
"created_at": "2024-03-25T11:19:46.000000Z",
"invoice_items": [
{
"id": 1,
"invoice_id": 1,
"price_id": 14,
"amount": 0,
"currency": "usd",
"description": "1 × Free (at $0.00 / month)",
"period_start": "12-04-2023",
"period_end": "12-05-2023",
"created_at": "12-04-2023 12:57:44",
"updated_at": "12-04-2023 12:57:44"
}
],
"agency": {
"name": "name",
"email": "defaultplan@email.com",
"subdomainEnabled": 0,
"shouldApplySubdomain": false,
"subdomain": "demotest",
"subdomainHistory": [
"demotest"
],
"whitelabellingEnabled": 0,
"shouldApplyWhitelabelling": false,
"fontColor": null,
"logo": null,
"stripe_id": "cus_NhS97iBazpeg5u",
"subscriberType": "early-adopter",
"subscriberValue": null,
"paymentChannel": "customer_portal",
"billing_information": {
"name": "defaultplan",
"email": "defaultplan@email.com",
"phone": null,
"address": null,
"taxIds": []
},
"whitelabellingSettings": {
"backgroundColor": null,
"primaryColor": null,
"isDark": null,
"invertColor": null,
"headerColor": null,
"darkPrimaryColor": null
},
"current_subscription": {
"id": 268,
"name": "xxxxxx",
"requests_count": 0,
"usage": 0,
"overusage": 0,
"allow_overuse": 0,
"stripe_id": "sub_1Ol9qFHbOaBUtWUKzHGvWszH",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"current_period_start": "2024-03-18T12:51:35.000000Z",
"current_period_end": "2024-04-18T12:51:35.000000Z",
"price": {
"id": 14,
"stripe_id": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "10",
"created_at": "2023-04-12T12:46:57.000000Z",
"product": {
"id": 7,
"stripe_id": "prod_NM5Tfzq9jamT74",
"name": "Free",
"description": "Free Plan , Default for all new subscribers ",
"private": 1,
"active": 1,
"default": 1,
"default_price": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "10",
"users_number": "5",
"whitelabelling": 0,
"subdomain": 0,
"allow_overuse": 0,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
"ends_at": null,
"created_at": "2024-02-18T12:51:35.000000Z"
},
"createdAt": "2023-04-12T12:57:15.000000Z",
"updatedAt": "2024-02-18T12:51:35.000000Z"
}
},
{
"id": 1,
"amount_due": 0,
"amount_remaining": 0,
"amount_paid": null,
"currency": "$",
"status": null,
"account_name": null,
"billing_reason": "manual",
"description": "Over Usage Charge",
"paid": null,
"fileName": "DigitalSero_25-03-2024_",
"created_at": "2024-03-25T11:19:46.000000Z",
"invoice_items": [
{
"id": 1,
"invoice_id": 1,
"price_id": 14,
"amount": 0,
"currency": "usd",
"description": "1 × Free (at $0.00 / month)",
"period_start": "12-04-2023",
"period_end": "12-05-2023",
"created_at": "12-04-2023 12:57:44",
"updated_at": "12-04-2023 12:57:44"
}
],
"agency": {
"name": "name",
"email": "defaultplan@email.com",
"subdomainEnabled": 0,
"shouldApplySubdomain": false,
"subdomain": "demotest",
"subdomainHistory": [
"demotest"
],
"whitelabellingEnabled": 0,
"shouldApplyWhitelabelling": false,
"fontColor": null,
"logo": null,
"stripe_id": "cus_NhS97iBazpeg5u",
"subscriberType": "early-adopter",
"subscriberValue": null,
"paymentChannel": "customer_portal",
"billing_information": {
"name": "defaultplan",
"email": "defaultplan@email.com",
"phone": null,
"address": null,
"taxIds": []
},
"whitelabellingSettings": {
"backgroundColor": null,
"primaryColor": null,
"isDark": null,
"invertColor": null,
"headerColor": null,
"darkPrimaryColor": null
},
"current_subscription": {
"id": 268,
"name": "xxxxxx",
"requests_count": 0,
"usage": 0,
"overusage": 0,
"allow_overuse": 0,
"stripe_id": "sub_1Ol9qFHbOaBUtWUKzHGvWszH",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"current_period_start": "2024-03-18T12:51:35.000000Z",
"current_period_end": "2024-04-18T12:51:35.000000Z",
"price": {
"id": 14,
"stripe_id": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "10",
"created_at": "2023-04-12T12:46:57.000000Z",
"product": {
"id": 7,
"stripe_id": "prod_NM5Tfzq9jamT74",
"name": "Free",
"description": "Free Plan , Default for all new subscribers ",
"private": 1,
"active": 1,
"default": 1,
"default_price": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "10",
"users_number": "5",
"whitelabelling": 0,
"subdomain": 0,
"allow_overuse": 0,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
"ends_at": null,
"created_at": "2024-02-18T12:51:35.000000Z"
},
"createdAt": "2023-04-12T12:57:15.000000Z",
"updatedAt": "2024-02-18T12:51:35.000000Z"
}
}
]
}
Received response:
Request failed with error:
List Invoices For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/invoices" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/invoices',
[
'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://digitalsero-staging-api.b5digital.dk/api/invoices"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"amount_due": 0,
"amount_remaining": 0,
"amount_paid": null,
"currency": "$",
"status": null,
"account_name": null,
"billing_reason": "manual",
"description": "Over Usage Charge",
"paid": null,
"fileName": "DigitalSero_25-03-2024_",
"created_at": "2024-03-25T11:19:44.000000Z",
"invoice_items": [
{
"id": 1,
"invoice_id": 1,
"price_id": 14,
"amount": 0,
"currency": "usd",
"description": "1 × Free (at $0.00 / month)",
"period_start": "12-04-2023",
"period_end": "12-05-2023",
"created_at": "12-04-2023 12:57:44",
"updated_at": "12-04-2023 12:57:44"
}
],
"agency": {
"name": "name",
"email": "defaultplan@email.com",
"subdomainEnabled": 0,
"shouldApplySubdomain": false,
"subdomain": "demotest",
"subdomainHistory": [
"demotest"
],
"whitelabellingEnabled": 0,
"shouldApplyWhitelabelling": false,
"fontColor": null,
"logo": null,
"stripe_id": "cus_NhS97iBazpeg5u",
"subscriberType": "early-adopter",
"subscriberValue": null,
"paymentChannel": "customer_portal",
"billing_information": {
"name": "defaultplan",
"email": "defaultplan@email.com",
"phone": null,
"address": null,
"taxIds": []
},
"whitelabellingSettings": {
"backgroundColor": null,
"primaryColor": null,
"isDark": null,
"invertColor": null,
"headerColor": null,
"darkPrimaryColor": null
},
"current_subscription": {
"id": 268,
"name": "xxxxxx",
"requests_count": 0,
"usage": 0,
"overusage": 0,
"allow_overuse": 0,
"stripe_id": "sub_1Ol9qFHbOaBUtWUKzHGvWszH",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"current_period_start": "2024-03-18T12:51:35.000000Z",
"current_period_end": "2024-04-18T12:51:35.000000Z",
"price": {
"id": 14,
"stripe_id": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "10",
"created_at": "2023-04-12T12:46:57.000000Z",
"product": {
"id": 7,
"stripe_id": "prod_NM5Tfzq9jamT74",
"name": "Free",
"description": "Free Plan , Default for all new subscribers ",
"private": 1,
"active": 1,
"default": 1,
"default_price": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "10",
"users_number": "5",
"whitelabelling": 0,
"subdomain": 0,
"allow_overuse": 0,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
"ends_at": null,
"created_at": "2024-02-18T12:51:35.000000Z"
},
"createdAt": "2023-04-12T12:57:15.000000Z",
"updatedAt": "2024-02-18T12:51:35.000000Z"
}
},
{
"id": 1,
"amount_due": 0,
"amount_remaining": 0,
"amount_paid": null,
"currency": "$",
"status": null,
"account_name": null,
"billing_reason": "manual",
"description": "Over Usage Charge",
"paid": null,
"fileName": "DigitalSero_25-03-2024_",
"created_at": "2024-03-25T11:19:44.000000Z",
"invoice_items": [
{
"id": 1,
"invoice_id": 1,
"price_id": 14,
"amount": 0,
"currency": "usd",
"description": "1 × Free (at $0.00 / month)",
"period_start": "12-04-2023",
"period_end": "12-05-2023",
"created_at": "12-04-2023 12:57:44",
"updated_at": "12-04-2023 12:57:44"
}
],
"agency": {
"name": "name",
"email": "defaultplan@email.com",
"subdomainEnabled": 0,
"shouldApplySubdomain": false,
"subdomain": "demotest",
"subdomainHistory": [
"demotest"
],
"whitelabellingEnabled": 0,
"shouldApplyWhitelabelling": false,
"fontColor": null,
"logo": null,
"stripe_id": "cus_NhS97iBazpeg5u",
"subscriberType": "early-adopter",
"subscriberValue": null,
"paymentChannel": "customer_portal",
"billing_information": {
"name": "defaultplan",
"email": "defaultplan@email.com",
"phone": null,
"address": null,
"taxIds": []
},
"whitelabellingSettings": {
"backgroundColor": null,
"primaryColor": null,
"isDark": null,
"invertColor": null,
"headerColor": null,
"darkPrimaryColor": null
},
"current_subscription": {
"id": 268,
"name": "xxxxxx",
"requests_count": 0,
"usage": 0,
"overusage": 0,
"allow_overuse": 0,
"stripe_id": "sub_1Ol9qFHbOaBUtWUKzHGvWszH",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"current_period_start": "2024-03-18T12:51:35.000000Z",
"current_period_end": "2024-04-18T12:51:35.000000Z",
"price": {
"id": 14,
"stripe_id": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "10",
"created_at": "2023-04-12T12:46:57.000000Z",
"product": {
"id": 7,
"stripe_id": "prod_NM5Tfzq9jamT74",
"name": "Free",
"description": "Free Plan , Default for all new subscribers ",
"private": 1,
"active": 1,
"default": 1,
"default_price": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "10",
"users_number": "5",
"whitelabelling": 0,
"subdomain": 0,
"allow_overuse": 0,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
"ends_at": null,
"created_at": "2024-02-18T12:51:35.000000Z"
},
"createdAt": "2023-04-12T12:57:15.000000Z",
"updatedAt": "2024-02-18T12:51:35.000000Z"
}
}
],
"draw": "0",
"recordsTotal": "1",
"recordsFiltered": "1"
}
Received response:
Request failed with error:
Show Invoice
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/invoices/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/invoices/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://digitalsero-staging-api.b5digital.dk/api/invoices/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"amount_due": 0,
"amount_remaining": 0,
"amount_paid": null,
"currency": "$",
"status": null,
"account_name": null,
"billing_reason": "manual",
"description": "Over Usage Charge",
"paid": null,
"fileName": "DigitalSero_25-03-2024_",
"created_at": "2024-03-25T11:19:46.000000Z",
"invoice_items": [
{
"id": 1,
"invoice_id": 1,
"price_id": 14,
"amount": 0,
"currency": "usd",
"description": "1 × Free (at $0.00 / month)",
"period_start": "12-04-2023",
"period_end": "12-05-2023",
"created_at": "12-04-2023 12:57:44",
"updated_at": "12-04-2023 12:57:44"
}
],
"agency": {
"name": "name",
"email": "defaultplan@email.com",
"subdomainEnabled": 0,
"shouldApplySubdomain": false,
"subdomain": "demotest",
"subdomainHistory": [
"demotest"
],
"whitelabellingEnabled": 0,
"shouldApplyWhitelabelling": false,
"fontColor": null,
"logo": null,
"stripe_id": "cus_NhS97iBazpeg5u",
"subscriberType": "early-adopter",
"subscriberValue": null,
"paymentChannel": "customer_portal",
"billing_information": {
"name": "defaultplan",
"email": "defaultplan@email.com",
"phone": null,
"address": null,
"taxIds": []
},
"whitelabellingSettings": {
"backgroundColor": null,
"primaryColor": null,
"isDark": null,
"invertColor": null,
"headerColor": null,
"darkPrimaryColor": null
},
"current_subscription": {
"id": 268,
"name": "xxxxxx",
"requests_count": 0,
"usage": 0,
"overusage": 0,
"allow_overuse": 0,
"stripe_id": "sub_1Ol9qFHbOaBUtWUKzHGvWszH",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"current_period_start": "2024-03-18T12:51:35.000000Z",
"current_period_end": "2024-04-18T12:51:35.000000Z",
"price": {
"id": 14,
"stripe_id": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "10",
"created_at": "2023-04-12T12:46:57.000000Z",
"product": {
"id": 7,
"stripe_id": "prod_NM5Tfzq9jamT74",
"name": "Free",
"description": "Free Plan , Default for all new subscribers ",
"private": 1,
"active": 1,
"default": 1,
"default_price": "price_1MbNIwHbOaBUtWUKkMOTZN4v",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "10",
"users_number": "5",
"whitelabelling": 0,
"subdomain": 0,
"allow_overuse": 0,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
"ends_at": null,
"created_at": "2024-02-18T12:51:35.000000Z"
},
"createdAt": "2023-04-12T12:57:15.000000Z",
"updatedAt": "2024-02-18T12:51:35.000000Z"
}
}
}
Received response:
Request failed with error:
Download Invoice
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/invoices/1/download" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/invoices/1/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://digitalsero-staging-api.b5digital.dk/api/invoices/1/download"
);
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/social-providers/linked_in/pages
requires authentication
GET api/social-providers/linked_in/ad-accounts
requires authentication
POST api/social-providers/linked_in/pages/check-status
requires authentication
GET api/demo/social-providers/linked_in/pages
requires authentication
GET api/demo/social-providers/linked_in/ad-accounts
requires authentication
Meta
List Business Managers
requires authentication
List Business Managers
requires authentication
GET api/social-providers/meta/ad-accounts
requires authentication
GET api/social-providers/meta/pages
requires authentication
GET api/social-providers/meta/product-catalogs
requires authentication
GET api/demo/social-providers/meta/ad-accounts
requires authentication
GET api/demo/social-providers/meta/pages
requires authentication
GET api/demo/social-providers/meta/product-catalogs
requires authentication
List Industries
requires authentication
List Industries
requires authentication
List Currencies
requires authentication
List Currencies
requires authentication
Create Business Managers
requires authentication
Create Business Managers
requires authentication
GET api/social-providers/meta/pixels
requires authentication
GET api/demo/social-providers/meta/pixels
requires authentication
GET api/social-providers/meta/instagram-accounts
requires authentication
GET api/demo/social-providers/meta/instagram-accounts
requires authentication
PaymentMethods
List PaymentMethods For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/payment-methods" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods',
[
'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://digitalsero-staging-api.b5digital.dk/api/payment-methods"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
},
{
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
}
],
"draw": "0",
"recordsTotal": "1",
"recordsFiltered": "1"
}
Received response:
Request failed with error:
List All PaymentMethods
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/payment-methods/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/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://digitalsero-staging-api.b5digital.dk/api/payment-methods/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
},
{
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
}
]
}
Received response:
Request failed with error:
Show UserPaymentMethod
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/payment-methods/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/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://digitalsero-staging-api.b5digital.dk/api/payment-methods/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
}
}
Received response:
Request failed with error:
Delete UserPaymentMethod
requires authentication
Example request:
curl --request DELETE \
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/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://digitalsero-staging-api.b5digital.dk/api/payment-methods/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"message": "payment_method deleted successfully",
"data": null,
}
}
Received response:
Request failed with error:
Mark Payment Method As Default
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/mark-as-default" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payment_method_id\": 1
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/mark-as-default',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'payment_method_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/mark-as-default"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payment_method_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Great!. Your Default Payment Method Is Saved.",
"data": null
}
Received response:
Request failed with error:
Validate Add UserPaymentMethod
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/validate-store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--data "{
\"payment_method_data\": {
\"0\": \"molestiae\",
\"billing_details\": {
\"address\": {
\"postal_code\": \"31746\"
}
}
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/validate-store',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'json' => [
'payment_method_data' => [
'molestiae',
'billing_details' => [
'address' => [
'postal_code' => '31746',
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/validate-store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
let body = {
"payment_method_data": {
"0": "molestiae",
"billing_details": {
"address": {
"postal_code": "31746"
}
}
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 4,
"stripe_id": "pm_1Mw4PMHbOaBUtWUKkIb2izJs",
"name": null,
"postal_code": null,
"is_default": 1,
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2035,
"exp_month": 12
},
"created_at": "2023-04-12T14:12:26.000000Z"
},
"message": "payment_method have created successfully"
}
Received response:
Request failed with error:
Create Checkout Session
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/checkout-session" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/checkout-session',
[
'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://digitalsero-staging-api.b5digital.dk/api/payment-methods/checkout-session"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Checkout Done Successfully",
"data": {
"session": {
"id": "cs_test_a1r56zz93N1OzbcpVUBdN7Cv1bMJmFmzqU4C8Yd5TIpVZJPPn7S5qqXstz",
"object": "checkout.session",
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 250,
"amount_total": 250,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "http://192.168.56.56/subscriptions?succeeded=0",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"currency": "usd",
"customer": "cus_MIuXULsVAov3Pv",
"customer_creation": null,
"customer_details": {
"address": null,
"email": "kepef@mailinator.com",
"name": null,
"phone": null,
"tax_exempt": null,
"tax_ids": null
},
"customer_email": null,
"expires_at": 1661790807,
"livemode": false,
"locale": null,
"metadata": [],
"mode": "subscription",
"payment_intent": null,
"payment_link": null,
"payment_method_collection": "always",
"payment_method_options": null,
"payment_method_types": [
"card"
],
"payment_status": "unpaid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": null,
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
"shipping_rate": null,
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "http://192.168.56.56/subscriptions?succeeded=1",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"url": "https://checkout.stripe.com/pay/cs_test_a1r56zz93N1OzbcpVUBdN7Cv1bMJmFmzqU4C8Yd5TIpVZJPPn7S5qqXstz#fidkdWxOYHwnPyd1blpxYHZxWnM1SFYxSWxob0dxT1ZwZHBKNEwwT3w0QycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"
}
}
}
Received response:
Request failed with error:
Create Customer Portal Session
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/payment-methods/customer-portal-session" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/payment-methods/customer-portal-session',
[
'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://digitalsero-staging-api.b5digital.dk/api/payment-methods/customer-portal-session"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Checkout Done Successfully",
"data": {
"session": {
"id": "bps_1MgUShHlSdZh4mNS2OVJRKpR",
"object": "billing_portal.session",
"configuration": "bpc_1MMVvbHlSdZh4mNSLayW7O22",
"created": 1677595647,
"customer": "cus_NMltWmnoFS1rj2",
"flow": {
"after_completion": {
"hosted_confirmation": null,
"redirect": {
"return_url": "https://digitalsero-backend.test/subscriptions"
},
"type": "redirect"
},
"subscription_cancel": null,
"type": "payment_method_update"
},
"livemode": false,
"locale": null,
"on_behalf_of": null,
"return_url": "https://digitalsero-backend.test/subscriptions",
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xOGY5NExIbFNkWmg0bU5TLF9OUk5EOVVGVGpxcERCdlZJTUJEVXAzUGdlNVRzckRO0100LsXIBIa6/flow"
}
}
}
Received response:
Request failed with error:
Prices
List All Prices
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/prices/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/prices/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://digitalsero-staging-api.b5digital.dk/api/prices/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"stripe_id": "price_1MrHyfHbOaBUtWUKvgBI6L4F",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "250",
"created_at": "2023-04-12T12:46:56.000000Z",
"product": {
"id": 1,
"stripe_id": "prod_NcX2BPo03bIEN1",
"name": "Early launch plan",
"description": null,
"private": 1,
"active": 0,
"default": 0,
"default_price": "price_1MrHyfHbOaBUtWUKvgBI6L4F",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "250",
"users_number": "INF",
"whitelabelling": 1,
"subdomain": 1,
"allow_overuse": 1,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
},
{
"id": 1,
"stripe_id": "price_1MrHyfHbOaBUtWUKvgBI6L4F",
"amount": 0,
"hasDiscount": false,
"amountBeforeDiscount": 0,
"package_quantity": null,
"billing_scheme": "per_unit",
"currency": "$",
"interval": "month",
"interval_count": "1",
"requests_number": "250",
"created_at": "2023-04-12T12:46:56.000000Z",
"product": {
"id": 1,
"stripe_id": "prod_NcX2BPo03bIEN1",
"name": "Early launch plan",
"description": null,
"private": 1,
"active": 0,
"default": 0,
"default_price": "price_1MrHyfHbOaBUtWUKvgBI6L4F",
"associated_providers": [
"GOOGLE",
"META",
"LINKED_IN",
"TIKTOK"
],
"requests_number": "250",
"users_number": "INF",
"whitelabelling": 1,
"subdomain": 1,
"allow_overuse": 1,
"allow_multiple_social_accounts_per_provider": 0,
"extra_price": null
}
}
]
}
Received response:
Request failed with error:
Products
List Product Social Providers
requires authentication
Promotions
Check promotion is active by subscriber type
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/promotions/check-active" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"subscriber\": \"et\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/promotions/check-active',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subscriber' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/promotions/check-active"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subscriber": "et"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Promotion is active"
"data": null
}
Received response:
Request failed with error:
Roles & Permissions
List All User Roles
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/roles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/roles',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/roles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "SUPER_ADMIN",
"name": "Super Admin"
},
{
"id": "SUPER_ADMIN",
"name": "Super Admin"
}
]
}
Received response:
Request failed with error:
SocialProviders
List Social Providers
requires authentication
POST api/social-providers/assets/validate
requires authentication
POST api/demo/social-providers/assets/validate
requires authentication
Subscriptions
Cancel Subscription
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--data "{
\"subscription_id\": 1
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'json' => [
'subscription_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
let body = {
"subscription_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
'data': {
'message': 'subscription Canceled successfully',
'data': null,
}
}
Received response:
Request failed with error:
Create Customer Portal Session to cancel subscription
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel/customer-portal-session" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"subscription_id\": \"fuga\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel/customer-portal-session',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subscription_id' => 'fuga',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/cancel/customer-portal-session"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subscription_id": "fuga"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Portal Done Successfully",
"data": {
"session": {
"id": "bps_1MgUlIHlSdZh4mNSw4ghwsEd",
"object": "billing_portal.session",
"configuration": "bpc_1MMVvbHlSdZh4mNSLayW7O22",
"created": 1677596800,
"customer": "cus_NMltWmnoFS1rj2",
"flow": {
"after_completion": {
"hosted_confirmation": null,
"redirect": {
"return_url": "https://digitalsero-backend.test/subscriptions"
},
"type": "redirect"
},
"subscription_cancel": {
"subscription": "sub_1MgUjqHlSdZh4mNSiQIHKfxb"
},
"type": "subscription_cancel"
},
"livemode": false,
"locale": null,
"on_behalf_of": null,
"return_url": "https://digitalsero-backend.test/subscriptions",
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xOGY5NExIbFNkWmg0bU5TLF9OUk5XV1FwNmFDMld6TGpXMndGdXBibk5XdERSV2FQ0100cyUik2du/flow"
}
}
}
Received response:
Request failed with error:
Create Checkout Session for charge extra usage
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/charge-extra-usage/checkout-session" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/subscriptions/charge-extra-usage/checkout-session',
[
'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://digitalsero-staging-api.b5digital.dk/api/subscriptions/charge-extra-usage/checkout-session"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Checkout Done Successfully",
"data": {
"session": {
"id": "cs_test_a1r56zz93N1OzbcpVUBdN7Cv1bMJmFmzqU4C8Yd5TIpVZJPPn7S5qqXstz",
"object": "checkout.session",
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 250,
"amount_total": 250,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "http://192.168.56.56/subscriptions?succeeded=0",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"currency": "usd",
"customer": "cus_MIuXULsVAov3Pv",
"customer_creation": null,
"customer_details": {
"address": null,
"email": "kepef@mailinator.com",
"name": null,
"phone": null,
"tax_exempt": null,
"tax_ids": null
},
"customer_email": null,
"expires_at": 1661790807,
"livemode": false,
"locale": null,
"metadata": [],
"mode": "subscription",
"payment_intent": null,
"payment_link": null,
"payment_method_collection": "always",
"payment_method_options": null,
"payment_method_types": [
"card"
],
"payment_status": "unpaid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": null,
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
"shipping_rate": null,
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "http://192.168.56.56/subscriptions?succeeded=1",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"url": "https://checkout.stripe.com/pay/cs_test_a1r56zz93N1OzbcpVUBdN7Cv1bMJmFmzqU4C8Yd5TIpVZJPPn7S5qqXstz#fidkdWxOYHwnPyd1blpxYHZxWnM1SFYxSWxob0dxT1ZwZHBKNEwwT3w0QycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"
}
}
}
Received response:
Request failed with error:
Create Customer Portal Session to renew subscription
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/renew/customer-portal-session" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"subscription_id\": \"aut\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/subscriptions/renew/customer-portal-session',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subscription_id' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/renew/customer-portal-session"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subscription_id": "aut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Portal Done Successfully",
"data": {
"session": {
"id": "bps_1MgUlIHlSdZh4mNSw4ghwsEd",
"object": "billing_portal.session",
"configuration": "bpc_1MMVvbHlSdZh4mNSLayW7O22",
"created": 1677596800,
"customer": "cus_NMltWmnoFS1rj2",
"flow": {
"after_completion": {
"hosted_confirmation": null,
"redirect": {
"return_url": "https://digitalsero-backend.test/subscriptions"
},
"type": "redirect"
},
"subscription_cancel": {
"subscription": "sub_1MgUjqHlSdZh4mNSiQIHKfxb"
},
"type": "subscription_cancel"
},
"livemode": false,
"locale": null,
"on_behalf_of": null,
"return_url": "https://digitalsero-backend.test/subscriptions",
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xOGY5NExIbFNkWmg0bU5TLF9OUk5XV1FwNmFDMld6TGpXMndGdXBibk5XdERSV2FQ0100cyUik2du/flow"
}
}
}
Received response:
Request failed with error:
Update subscription price
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/update-price" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"price_id\": \"ea\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/subscriptions/update-price',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'price_id' => 'ea',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/subscriptions/update-price"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"price_id": "ea"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Checkout Done Successfully",
"data": {
"session": {
"id": "bps_1MgldOHlSdZh4mNSiP8XGd3x",
"object": "billing_portal.session",
"configuration": "bpc_1MMVvbHlSdZh4mNSLayW7O22",
"created": 1677661658,
"customer": "cus_NMn44Vx47uPaeq",
"flow": null,
"livemode": false,
"locale": null,
"on_behalf_of": null,
"return_url": "https://digitalsero-backend.test/subscriptions",
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xOGY5NExIbFNkWmg0bU5TLF9OUmV4VTNPQk9MUW5sOERmeWdoUm5ZS25WQnVuVHNY0100DR7sNYlu/subscriptions/sub_1Mc3VxHlSdZh4mNSvm8UtsKo/preview/price_1MdaF1HlSdZh4mNSyrCsx8Bw"
}
}
}
Received response:
Request failed with error:
Super Admin
List Users For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/users',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 101,
"name": "Alex",
"email": "alex@b5digital.dk",
"emailVerifiedAt": {
"date": "22-08-2022",
"datetime": "22-08-2022 06:47:00 PM",
"forHumans": "14 hours ago",
"formatted": "Mon, Aug 22, 2022 6:47 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "22-08-2022",
"datetime": "22-08-2022 06:45:12 PM",
"forHumans": "14 hours ago",
"formatted": "Mon, Aug 22, 2022 6:45 PM"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "23-08-2022",
"datetime": "23-08-2022 09:04:23 AM",
"forHumans": "1 second ago",
"formatted": "Tue, Aug 23, 2022 9:04 AM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 58,
"agency_id": 48,
"plan_id": 1,
"name": "Default Plan",
"stripe_id": "sub_1LZfeNHlSdZh4mNSxCLzBsSd",
"stripe_status": "active",
"stripe_price": "price_1LVXL7HlSdZh4mNSOMNmIT8z",
"quantity": 1,
"trial_ends_at": null,
"ends_at": null,
"created_at": "2022-08-22T18:47:04.000000Z",
"updated_at": "2022-08-22T18:47:04.000000Z",
"items": [
{
"id": 9,
"subscription_id": 58,
"stripe_id": "si_MIGAKvMVEPQffA",
"stripe_product": "prod_MDzJW5t2eL6uJK",
"stripe_price": "price_1LVXL7HlSdZh4mNSOMNmIT8z",
"quantity": 1,
"created_at": "2022-08-22T18:47:04.000000Z",
"updated_at": "2022-08-22T18:47:04.000000Z"
}
]
}
}
}
Received response:
Request failed with error:
Add User
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/admin/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"john\",
\"email\": \"john@b5digital.dk\",
\"roleId\": \"\\\"EMPLOYEE\\\"\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/admin/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'john',
'email' => 'john@b5digital.dk',
'roleId' => '"EMPLOYEE"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/admin/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "john",
"email": "john@b5digital.dk",
"roleId": "\"EMPLOYEE\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
List All User Roles
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/roles" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/roles',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "SUPER_ADMIN",
"name": "Super Admin"
},
{
"id": "SUPER_ADMIN",
"name": "Super Admin"
}
]
}
Received response:
Request failed with error:
List Agencies For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/admin/agencies/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/admin/agencies/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://digitalsero-staging-api.b5digital.dk/api/admin/agencies/list"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "4s8ZVRozDX",
"updated_at": "25-03-2024 11:19:38",
"created_at": "2024-03-25T11:19:38.000000Z",
"id": 2639,
"current_subscription": null
},
{
"name": "CMYYxm7svO",
"updated_at": "25-03-2024 11:19:38",
"created_at": "2024-03-25T11:19:38.000000Z",
"id": 2640,
"current_subscription": null
}
],
"draw": "0",
"recordsTotal": "1",
"recordsFiltered": "1"
}
Received response:
Request failed with error:
Activate User
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/active" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/active',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/active"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
DeActivate User
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/deactivate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/deactivate',
[
'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://digitalsero-staging-api.b5digital.dk/api/admin/users/admin/deactivate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Tiktok
List Business Centers
requires authentication
GET api/social-providers/tiktok/ad-accounts
requires authentication
GET api/demo/social-providers/tiktok/ad-accounts
requires authentication
UserSocialProviders
Set User Social Provider as Default
requires authentication
Users
Profile
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/users/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/users/me',
[
'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://digitalsero-staging-api.b5digital.dk/api/users/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Update Profile
requires authentication
Example request:
curl --request PUT \
"https://digitalsero-staging-api.b5digital.dk/api/users/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"john\",
\"email\": \"john@b5digital.dk\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://digitalsero-staging-api.b5digital.dk/api/users/me',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'john',
'email' => 'john@b5digital.dk',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/users/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "john",
"email": "john@b5digital.dk"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Remove Profile Picture
requires authentication
Example request:
curl --request PUT \
"https://digitalsero-staging-api.b5digital.dk/api/users/me/removeProfilePicture" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://digitalsero-staging-api.b5digital.dk/api/users/me/removeProfilePicture',
[
'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://digitalsero-staging-api.b5digital.dk/api/users/me/removeProfilePicture"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
List Users For Datatable
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/users',
[
'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://digitalsero-staging-api.b5digital.dk/api/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 101,
"name": "Alex",
"email": "alex@b5digital.dk",
"emailVerifiedAt": {
"date": "22-08-2022",
"datetime": "22-08-2022 06:47:00 PM",
"forHumans": "14 hours ago",
"formatted": "Mon, Aug 22, 2022 6:47 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "22-08-2022",
"datetime": "22-08-2022 06:45:12 PM",
"forHumans": "14 hours ago",
"formatted": "Mon, Aug 22, 2022 6:45 PM"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "23-08-2022",
"datetime": "23-08-2022 09:04:23 AM",
"forHumans": "1 second ago",
"formatted": "Tue, Aug 23, 2022 9:04 AM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 58,
"agency_id": 48,
"plan_id": 1,
"name": "Default Plan",
"stripe_id": "sub_1LZfeNHlSdZh4mNSxCLzBsSd",
"stripe_status": "active",
"stripe_price": "price_1LVXL7HlSdZh4mNSOMNmIT8z",
"quantity": 1,
"trial_ends_at": null,
"ends_at": null,
"created_at": "2022-08-22T18:47:04.000000Z",
"updated_at": "2022-08-22T18:47:04.000000Z",
"items": [
{
"id": 9,
"subscription_id": 58,
"stripe_id": "si_MIGAKvMVEPQffA",
"stripe_product": "prod_MDzJW5t2eL6uJK",
"stripe_price": "price_1LVXL7HlSdZh4mNSOMNmIT8z",
"quantity": 1,
"created_at": "2022-08-22T18:47:04.000000Z",
"updated_at": "2022-08-22T18:47:04.000000Z"
}
]
}
}
}
Received response:
Request failed with error:
Add User
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=john" \
--form "email=john@b5digital.dk" \
--form "roleId="EMPLOYEE"" \
--form "profilePicture=@/tmp/phpNwCeYD" $client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/users',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'john'
],
[
'name' => 'email',
'contents' => 'john@b5digital.dk'
],
[
'name' => 'roleId',
'contents' => '"EMPLOYEE"'
],
[
'name' => 'profilePicture',
'contents' => fopen('/tmp/phpNwCeYD', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'john');
body.append('email', 'john@b5digital.dk');
body.append('roleId', '"EMPLOYEE"');
body.append('profilePicture', document.querySelector('input[name="profilePicture"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Show User
requires authentication
Example request:
curl --request GET \
--get "https://digitalsero-staging-api.b5digital.dk/api/users/admin" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://digitalsero-staging-api.b5digital.dk/api/users/admin',
[
'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://digitalsero-staging-api.b5digital.dk/api/users/admin"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Update User
requires authentication
Example request:
curl --request PUT \
"https://digitalsero-staging-api.b5digital.dk/api/users/admin" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"john\",
\"roleId\": \"\\\"EMPLOYEE\\\"\",
\"email\": \"john@b5digital.dk\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://digitalsero-staging-api.b5digital.dk/api/users/admin',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'john',
'roleId' => '"EMPLOYEE"',
'email' => 'john@b5digital.dk',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/users/admin"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "john",
"roleId": "\"EMPLOYEE\"",
"email": "john@b5digital.dk"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
Delete User
requires authentication
Example request:
curl --request DELETE \
"https://digitalsero-staging-api.b5digital.dk/api/users/admin" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://digitalsero-staging-api.b5digital.dk/api/users/admin',
[
'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://digitalsero-staging-api.b5digital.dk/api/users/admin"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"message": "User deleted successfully",
"data": null,
}
}
Received response:
Request failed with error:
Set User Password
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/users/set-password/admin" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"password\": \"password\",
\"email\": \"john@b5digital.dk\",
\"password_confirmation\": \"password\",
\"token\": \"asd12rmfahf23\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/users/set-password/admin',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'password' => 'password',
'email' => 'john@b5digital.dk',
'password_confirmation' => 'password',
'token' => 'asd12rmfahf23',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://digitalsero-staging-api.b5digital.dk/api/users/set-password/admin"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "password",
"email": "john@b5digital.dk",
"password_confirmation": "password",
"token": "asd12rmfahf23"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "User retrieved successfully",
"data": {
"id": 113,
"name": "Hadley Rivas",
"email": "kepef@mailinator.com",
"emailVerifiedAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:59 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"profilePicture": null,
"lastActiveAt": null,
"createdAt": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:29:20 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:29 PM"
},
"agency": {
"id": 101,
"stripe_id": "cus_MIuXULsVAov3Pv",
"name": null,
"created_at": "2022-08-24T12:29:20.000000Z",
"updated_at": "2022-08-24T12:29:59.000000Z"
},
"roles": [
{
"id": "AGENCY_ADMIN",
"name": "Agency admin",
"createdAt": {
"date": "28-08-2022",
"datetime": "28-08-2022 03:25:51 PM",
"forHumans": "1 second ago",
"formatted": "Sun, Aug 28, 2022 3:25 PM"
}
}
],
"userSocialProviders": [],
"current_subscription": {
"id": 110,
"name": "Starter PLAN",
"stripe_status": "active",
"quantity": 1,
"trial_ends_at": null,
"plan": {
"id": 3,
"stripe_id": "starter",
"name": "Starter PLAN",
"active": 1,
"interval": "month",
"is_default": false,
"features": false,
"providers": [
{
"id": 7,
"plan_id": 3,
"provider_id": "META",
"limit": 15
},
{
"id": 8,
"plan_id": 3,
"provider_id": "GOOGLE",
"limit": 10
}
],
"price": {
"id": 3,
"stripe_id": "starter",
"amount": 3.59,
"billing_scheme": "per_unit",
"currency": "usd",
"interval": null,
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"created_at": {
"date": "16-08-2022",
"datetime": "16-08-2022 11:52:41 AM",
"forHumans": "1 week ago",
"formatted": "Tue, Aug 16, 2022 11:52 AM"
}
},
"ends_at": {
"date": "24-09-2022",
"datetime": "24-09-2022 12:52:16 PM",
"forHumans": "3 weeks from now",
"formatted": "Sat, Sep 24, 2022 12:52 PM"
},
"created_at": {
"date": "24-08-2022",
"datetime": "24-08-2022 12:30:01 PM",
"forHumans": "4 days ago",
"formatted": "Wed, Aug 24, 2022 12:30 PM"
}
}
}
}
Received response:
Request failed with error:
POST api/users/me/onboarding/video-watch
requires authentication
Example request:
curl --request POST \
"https://digitalsero-staging-api.b5digital.dk/api/users/me/onboarding/video-watch" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://digitalsero-staging-api.b5digital.dk/api/users/me/onboarding/video-watch',
[
'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://digitalsero-staging-api.b5digital.dk/api/users/me/onboarding/video-watch"
);
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: