MENU navbar-image

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": ""
}
 

Request   

GET api/access-requests/list

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());

Request   

POST api/access-requests/send-email

Body Parameters

requestId  string  

email  string  

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": ""
}
 

Request   

GET api/access-requests

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());

Request   

POST api/access-requests

Body Parameters

providers  object[] optional  

providers[].id  string  

providers[].businessManagerId  string optional  

This field is required when providers.*.id is META.

providers[].businessManagerName  string optional  

This field is required when providers.*.id is META.

providers[].email  string optional  

This field is required when providers.*.id is GOOGLE. Must be a valid email address.

providers[].externalUserId  string optional  

This field is required when providers.*.id is LINKED_IN.

providers[].businessCenterId  string optional  

This field is required when providers.*.id is TIKTOK.

providers[].businessCenterName  string optional  

This field is required when providers.*.id is TIKTOK.

providers[].assets  object[] optional  

providers[].assets[].type  string  

providers[].assets[].role  string optional  

This field is required when providers..assets..manager is not present.

providers[].assets[].manager  object optional  

providers[].assets[].manager.id  string optional  

providers[].assets[].manager.name  string optional  

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,
     }
 }
 

Request   

DELETE api/access-requests/{requestId}

URL Parameters

requestId  string  

id  string  

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": ""
                }
            ]
        }
    ]
}
 

Request   

GET api/access-requests/{requestId}/assets

URL Parameters

requestId  string  

Query Parameters

providers  string  

Body Parameters

providerIds  string[]  

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": ""
}
 

Request   

GET api/access-requests/{requestId}

URL Parameters

requestId  string  

id  string  

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": ""
}
 

Request   

GET api/access-requests/{requestId}

URL Parameters

requestId  string  

id  string  

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());

Request   

POST api/access-requests/{requestId}/grant-access

URL Parameters

requestId  string  

Body Parameters

requestId  string  

validation.uuid.

providers  object[] optional  

providers[].id  string  

providers[].assetTypes  object[] optional  

providers[].assetTypes[].type  string  

providers[].assetTypes[].assets  object[] optional  

providers[].assetTypes[].assets[].id  string  

Must not be greater than 50 characters.

providers[].assetTypes[].assets[].name  string optional  

Must not be greater than 255 characters.

providers[].assetTypes[].assets[].businessCenterId  string optional  

This field is required when providers.*.id is TIKTOK. Must not be greater than 50 characters.

providers[].assetTypes[].assets[].business  object optional  

providers[].assetTypes[].assets[].business.id  string optional  

Must not be greater than 50 characters.

providers[].assetTypes[].assets[].business.name  string optional  

Must not be greater than 255 characters.

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());

Request   

POST api/access-requests/{requestId}/clone

URL Parameters

requestId  string  

id  string  

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());

Request   

POST api/access-requests/{requestId}/request-access

URL Parameters

requestId  string  

Body Parameters

requestId  string  

validation.uuid.

providers  object[] optional  

providers[].id  string  

providers[].assetTypes  object[] optional  

providers[].assetTypes[].type  string  

providers[].assetTypes[].assets  object[] optional  

providers[].assetTypes[].assets[].id  string  

Must not be greater than 50 characters.

providers[].assetTypes[].assets[].name  string optional  

Must not be greater than 255 characters.

providers[].assetTypes[].assets[].businessCenterId  string optional  

This field is required when providers.*.id is TIKTOK. Must not be greater than 50 characters.

providers[].assetTypes[].assets[].business  object optional  

providers[].assetTypes[].assets[].business.id  string optional  

Must not be greater than 50 characters.

providers[].assetTypes[].assets[].business.name  string optional  

Must not be greater than 255 characters.

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": ""
}
 

Request   

GET api/agencies/me

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());

Request   

PUT api/agencies/me

Body Parameters

name  string optional  

whitelabellingEnabled  boolean optional  

fontColor  string optional  

whitelabellingSettings  object optional  

whitelabellingSettings.primaryColor  string optional  

This field is required when whitelabellingEnabled is true.

whitelabellingSettings.backgroundColor  string optional  

This field is required when whitelabellingEnabled is true.

whitelabellingSettings.headerColor  string optional  

This field is required when whitelabellingEnabled is true.

whitelabellingSettings.darkPrimaryColor  string optional  

This field is required when whitelabellingEnabled is true.

whitelabellingSettings.invertColor  boolean optional  

This field is required when whitelabellingEnabled is true.

whitelabellingSettings.isDark  boolean optional  

This field is required when whitelabellingEnabled is true.

logo  string optional  

This field is required when whitelabellingEnabled is true.

subdomainEnabled  boolean optional  

subdomain  string optional  

This field is required when subdomainEnabled is true.

primaryColor  string optional  

backgroundColor  string optional  

requires authentication

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": ""
}
 

Request   

GET api/agencies

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());

Request   

POST api/agencies/invite

Body Parameters

name  string optional  

Must not be greater than 100 characters.

primaryColor  string optional  

fontColor  string optional  

backgroundColor  string optional  

subdomain  string optional  

admin  object optional  

admin.name  string  

Must not be greater than 100 characters.

admin.email  string  

Must be a valid email address. Must not be greater than 254 characters.

admin.password  string  

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());

Request   

POST api/agencies/me/logo/remove

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"
        }
    }
}
 

Request   

PUT api/agencies/me/billing-info

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!",
}
 

Request   

POST api/auth/forgot-password

Body Parameters

email  string  

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!",
}
 

Request   

POST api/auth/reset-password

Body Parameters

token  string  

email  string  

password  string  

password_confirmation  string  

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"
            }
        }
    }
}
 

Request   

POST api/auth/register

Body Parameters

name  string  

email  string  

password  string  

password_confirmation  string  

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>>",
     }
 }
 

Request   

POST api/auth/create-testing-token

Body Parameters

email  string  

password  string  

roleId  string  

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,
     }
 }
 

Request   

POST api/auth/change-password

Body Parameters

old_password  string  

new_password  string  

new_password_confirmation  string  

Generate RedirectUrl to your different providers.

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-login/META?userType=CLIENT%2FPARTNER" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"providerId\": \"impedit\",
    \"userType\": \"accusamus\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://digitalsero-staging-api.b5digital.dk/api/social-login/META',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'userType'=> 'CLIENT/PARTNER',
        ],
        'json' => [
            'providerId' => 'impedit',
            'userType' => 'accusamus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-login/META"
);

const params = {
    "userType": "CLIENT/PARTNER",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "providerId": "impedit",
    "userType": "accusamus"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
     "message": "Redirect Link Generated Successfully"
     "data": {
         "redirectUrl": "{provider-redirect-url}"
     }
 }
 

Request   

GET api/social-login/{providerId}

URL Parameters

providerId  string  

Query Parameters

userType  string  

Body Parameters

providerId  string  

userType  string  

requestId  string optional  

This field is required when userType is CLIENT.

socialAction  string optional  

This field is required when userType is CLIENT.

Handle callback from your provider. add user to system and login if not logged in yet.

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-login/META/callback?userType=CLIENT%2FPARTNER&code=et" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"providerId\": \"voluptatum\",
    \"userType\": \"quis\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://digitalsero-staging-api.b5digital.dk/api/social-login/META/callback',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'userType'=> 'CLIENT/PARTNER',
            'code'=> 'et',
        ],
        'json' => [
            'providerId' => 'voluptatum',
            'userType' => 'quis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-login/META/callback"
);

const params = {
    "userType": "CLIENT/PARTNER",
    "code": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "providerId": "voluptatum",
    "userType": "quis"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
     "message": "Connected Successfully"
     "data": null
 }
 

Request   

GET api/social-login/{providerId}/callback

URL Parameters

providerId  string  

Query Parameters

userType  string  

code  string  

Body Parameters

providerId  string  

userType  string  

requestId  string optional  

This field is required when userType is CLIENT.

socialAction  string optional  

This field is required when userType is CLIENT.

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,
     }
 }
 

Request   

POST api/auth/login

Body Parameters

email  string  

password  string  

roleId  string optional  

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,
     }
 }
 

Request   

POST api/auth/logout

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."
}
 

Request   

POST api/auth/email/resend-verification/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

slug  string  

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"
}
 

Request   

GET api/auth/email/verify/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

slug  string  

Query Parameters

expires  integer  

hash  string  

signature  string  

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": ""
}
 

Request   

GET api/demo/access-requests/{requestId}

URL Parameters

requestId  string  

id  string  

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": ""
                }
            ]
        }
    ]
}
 

Request   

GET api/demo/access-requests/{requestId}/assets

URL Parameters

requestId  string  

Query Parameters

providers  string  

Body Parameters

providerIds  string[]  

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());

Request   

POST api/demo/access-requests/{requestId}/grant-access

URL Parameters

requestId  string  

Body Parameters

requestId  string  

validation.uuid.

providers  object[] optional  

providers[].id  string  

providers[].assetTypes  object[] optional  

providers[].assetTypes[].type  string  

providers[].assetTypes[].assets  object[] optional  

providers[].assetTypes[].assets[].id  string  

Must not be greater than 50 characters.

providers[].assetTypes[].assets[].name  string optional  

Must not be greater than 255 characters.

providers[].assetTypes[].assets[].businessCenterId  string optional  

This field is required when providers.*.id is TIKTOK. Must not be greater than 50 characters.

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"
}
 

Request   

GET api/configurations

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());

Request   

POST api/configurations/fe-version/increment

Google

GET api/social-providers/google/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/ad-accounts" \
    --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/social-providers/google/ad-accounts',
    [
        '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/social-providers/google/ad-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/google/ad-accounts

GET api/social-providers/google/analytics-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/analytics-accounts" \
    --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/social-providers/google/analytics-accounts',
    [
        '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/social-providers/google/analytics-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/google/analytics-accounts

GET api/social-providers/google/business-profile-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/business-profile-accounts" \
    --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/social-providers/google/business-profile-accounts',
    [
        '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/social-providers/google/business-profile-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/google/business-profile-accounts

GET api/social-providers/google/tag-manager-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/tag-manager-accounts" \
    --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/social-providers/google/tag-manager-accounts',
    [
        '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/social-providers/google/tag-manager-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/google/tag-manager-accounts

GET api/social-providers/google/search-console

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/search-console" \
    --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/social-providers/google/search-console',
    [
        '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/social-providers/google/search-console"
);

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": ""
}
 

Request   

GET api/social-providers/google/search-console

GET api/demo/social-providers/google/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/ad-accounts" \
    --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/social-providers/google/ad-accounts',
    [
        '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/social-providers/google/ad-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/ad-accounts

GET api/demo/social-providers/google/analytics-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/analytics-accounts" \
    --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/social-providers/google/analytics-accounts',
    [
        '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/social-providers/google/analytics-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/analytics-accounts

GET api/demo/social-providers/google/business-profile-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/business-profile-accounts" \
    --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/social-providers/google/business-profile-accounts',
    [
        '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/social-providers/google/business-profile-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/business-profile-accounts

GET api/demo/social-providers/google/tag-manager-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/tag-manager-accounts" \
    --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/social-providers/google/tag-manager-accounts',
    [
        '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/social-providers/google/tag-manager-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/tag-manager-accounts

GET api/demo/social-providers/google/search-console

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/search-console" \
    --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/social-providers/google/search-console',
    [
        '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/social-providers/google/search-console"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/search-console

GET api/social-providers/google/merchant

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/merchant" \
    --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/social-providers/google/merchant',
    [
        '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/social-providers/google/merchant"
);

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": ""
}
 

Request   

GET api/social-providers/google/merchant

GET api/demo/social-providers/google/merchant

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/google/merchant" \
    --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/social-providers/google/merchant',
    [
        '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/social-providers/google/merchant"
);

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": ""
}
 

Request   

GET api/demo/social-providers/google/merchant

GET api/social-providers/google/ads/mcc

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/google/ads/mcc" \
    --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/social-providers/google/ads/mcc',
    [
        '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/social-providers/google/ads/mcc"
);

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": ""
}
 

Request   

GET api/social-providers/google/ads/mcc

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
}
 

Request   

GET api/admin/insights/agencies/verified

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
}
 

Request   

GET api/admin/insights/agencies/not-verified

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
}
 

Request   

GET api/admin/insights/requests/all

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
        }
    ]
}
 

Request   

GET api/admin/insights/agencies/requests

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
 },
]
}
 

Request   

GET api/admin/insights/prices

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
}
 

Request   

GET api/admin/insights/requests/pending

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
}
 

Request   

GET api/admin/insights/requests/completed

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
}
 

Request   

GET api/admin/insights/requests/in-progress

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"
            }
        }
    ]
}
 

Request   

GET api/invoices/list

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"
}
 

Request   

GET api/invoices

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"
        }
    }
}
 

Request   

GET api/invoices/{id}

URL Parameters

id  integer  

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());

Request   

POST api/invoices/{id}/download

URL Parameters

id  integer  

LinkedIn

GET api/social-providers/linked_in/pages

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/linked_in/pages" \
    --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/social-providers/linked_in/pages',
    [
        '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/social-providers/linked_in/pages"
);

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": ""
}
 

Request   

GET api/social-providers/linked_in/pages

GET api/social-providers/linked_in/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/linked_in/ad-accounts" \
    --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/social-providers/linked_in/ad-accounts',
    [
        '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/social-providers/linked_in/ad-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/linked_in/ad-accounts

POST api/social-providers/linked_in/pages/check-status

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/linked_in/pages/check-status" \
    --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/social-providers/linked_in/pages/check-status',
    [
        '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/social-providers/linked_in/pages/check-status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/social-providers/linked_in/pages/check-status

GET api/demo/social-providers/linked_in/pages

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/linked_in/pages" \
    --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/social-providers/linked_in/pages',
    [
        '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/social-providers/linked_in/pages"
);

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": ""
}
 

Request   

GET api/demo/social-providers/linked_in/pages

GET api/demo/social-providers/linked_in/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/linked_in/ad-accounts" \
    --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/social-providers/linked_in/ad-accounts',
    [
        '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/social-providers/linked_in/ad-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/linked_in/ad-accounts

Meta

List Business Managers

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers" \
    --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/social-providers/meta/business-managers',
    [
        '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/social-providers/meta/business-managers"
);

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": "Business managers listed successfully"
     "data": [
         {
             "id": "12121212121",
             "name": "Manager name"
         }
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers

List Business Managers

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers" \
    --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/social-providers/meta/business-managers',
    [
        '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/social-providers/meta/business-managers"
);

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": "Business managers listed successfully"
     "data": [
         {
             "id": "12121212121",
             "name": "Manager name"
         }
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers

GET api/social-providers/meta/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/ad-accounts" \
    --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/social-providers/meta/ad-accounts',
    [
        '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/social-providers/meta/ad-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/meta/ad-accounts

GET api/social-providers/meta/pages

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/pages" \
    --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/social-providers/meta/pages',
    [
        '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/social-providers/meta/pages"
);

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": ""
}
 

Request   

GET api/social-providers/meta/pages

GET api/social-providers/meta/product-catalogs

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/product-catalogs" \
    --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/social-providers/meta/product-catalogs',
    [
        '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/social-providers/meta/product-catalogs"
);

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": ""
}
 

Request   

GET api/social-providers/meta/product-catalogs

GET api/demo/social-providers/meta/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/meta/ad-accounts" \
    --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/social-providers/meta/ad-accounts',
    [
        '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/social-providers/meta/ad-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/meta/ad-accounts

GET api/demo/social-providers/meta/pages

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/meta/pages" \
    --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/social-providers/meta/pages',
    [
        '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/social-providers/meta/pages"
);

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": ""
}
 

Request   

GET api/demo/social-providers/meta/pages

GET api/demo/social-providers/meta/product-catalogs

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/meta/product-catalogs" \
    --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/social-providers/meta/product-catalogs',
    [
        '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/social-providers/meta/product-catalogs"
);

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": ""
}
 

Request   

GET api/demo/social-providers/meta/product-catalogs

List Industries

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/industries" \
    --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/social-providers/meta/business-managers/industries',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/industries"
);

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": [
         "ADVERTISING",
         "AUTOMOTIVE",
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers/industries

List Industries

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/industries" \
    --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/social-providers/meta/business-managers/industries',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/industries"
);

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": [
         "ADVERTISING",
         "AUTOMOTIVE",
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers/industries

List Currencies

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/currencies" \
    --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/social-providers/meta/business-managers/currencies',
    [
        '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/social-providers/meta/business-managers/currencies"
);

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": [
         "USD",
         "EUR",
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers/currencies

List Currencies

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers/currencies" \
    --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/social-providers/meta/business-managers/currencies',
    [
        '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/social-providers/meta/business-managers/currencies"
);

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": [
         "USD",
         "EUR",
     ]
 }
 

Request   

GET api/social-providers/meta/business-managers/currencies

Create Business Managers

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"porro\",
    \"industry\": \"et\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'porro',
            'industry' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "porro",
    "industry": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
     "message": "Business managers created successfully"
     "data": [
         {
             "id": "12121212121",
             "name": "Manager name"
         }
     ]
 }
 

Request   

POST api/social-providers/meta/business-managers

Body Parameters

name  string  

test

industry  string  

ADVERTISING

Create Business Managers

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"aut\",
    \"industry\": \"facere\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'aut',
            'industry' => 'facere',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/business-managers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "aut",
    "industry": "facere"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
     "message": "Business managers created successfully"
     "data": [
         {
             "id": "12121212121",
             "name": "Manager name"
         }
     ]
 }
 

Request   

POST api/social-providers/meta/business-managers

Body Parameters

name  string  

test

industry  string  

ADVERTISING

GET api/social-providers/meta/pixels

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/pixels" \
    --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/social-providers/meta/pixels',
    [
        '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/social-providers/meta/pixels"
);

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": ""
}
 

Request   

GET api/social-providers/meta/pixels

GET api/demo/social-providers/meta/pixels

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/meta/pixels" \
    --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/social-providers/meta/pixels',
    [
        '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/social-providers/meta/pixels"
);

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": ""
}
 

Request   

GET api/demo/social-providers/meta/pixels

GET api/social-providers/meta/instagram-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/meta/instagram-accounts" \
    --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/social-providers/meta/instagram-accounts',
    [
        '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/social-providers/meta/instagram-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/meta/instagram-accounts

GET api/demo/social-providers/meta/instagram-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/meta/instagram-accounts" \
    --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/social-providers/meta/instagram-accounts',
    [
        '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/social-providers/meta/instagram-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/meta/instagram-accounts

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"
}
 

Request   

GET api/payment-methods

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"
        }
    ]
}
 

Request   

GET api/payment-methods/list

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"
    }
}
 

Request   

GET api/payment-methods/{id}

URL Parameters

id  integer  

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,
     }
 }
 

Request   

DELETE api/payment-methods/{id}

URL Parameters

id  integer  

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
}
 

Request   

POST api/payment-methods/mark-as-default

Body Parameters

payment_method_id  integer  

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"
}
 

Request   

POST api/payment-methods/validate-store

Body Parameters

payment_method_data  string[]  

payment_method_data.type  string  

payment_method_data.billing_details  string[]  

payment_method_data.billing_details.name  string  

payment_method_data.billing_details.address  object optional  

payment_method_data.billing_details.address.postal_code  string  

payment_method_data.card  string[]  

payment_method_data.card.number  numeric  

payment_method_data.card.cvc  numeric  

payment_method_data.card.exp_month  numeric  

payment_method_data.card.exp_year  numeric  

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"
        }
    }
}
 

Request   

POST api/payment-methods/checkout-session

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"
        }
    }
}
 

Request   

POST api/payment-methods/customer-portal-session

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
            }
        }
    ]
}
 

Request   

GET api/prices/list

Products

List Product Social Providers

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/products/social-providers" \
    --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/products/social-providers',
    [
        '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/products/social-providers"
);

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": "Social Providers listed successfully"
     "data": [
         {
             "id": 1,
             "name": "META"
         }
     ]
 }
 

Request   

GET api/products/social-providers

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
 }
 

Request   

GET api/promotions/check-active

Body Parameters

subscriber  string  

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"
        }
    ]
}
 

Request   

GET api/roles

SocialProviders

List Social Providers

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers" \
    --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/social-providers',
    [
        '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/social-providers"
);

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": "Social Providers listed successfully"
     "data": [
         {
             "id": 1,
             "name": "META"
         }
     ]
 }
 

Request   

GET api/social-providers

POST api/social-providers/assets/validate

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/assets/validate" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"requestId\": \"c939ce89-0075-3a7e-95b9-4c2aeac3aabd\",
    \"providerId\": \"sapiente\",
    \"assetTypeId\": \"quisquam\",
    \"assetId\": \"cumque\",
    \"parentId\": \"sit\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://digitalsero-staging-api.b5digital.dk/api/social-providers/assets/validate',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'requestId' => 'c939ce89-0075-3a7e-95b9-4c2aeac3aabd',
            'providerId' => 'sapiente',
            'assetTypeId' => 'quisquam',
            'assetId' => 'cumque',
            'parentId' => 'sit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/social-providers/assets/validate"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "requestId": "c939ce89-0075-3a7e-95b9-4c2aeac3aabd",
    "providerId": "sapiente",
    "assetTypeId": "quisquam",
    "assetId": "cumque",
    "parentId": "sit"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/social-providers/assets/validate

Body Parameters

requestId  string  

validation.uuid.

providerId  string  

assetTypeId  string  

assetId  string  

parentId  string optional  

POST api/demo/social-providers/assets/validate

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/assets/validate" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"requestId\": \"2ec44954-2ceb-3d37-8256-2b07e16509d8\",
    \"providerId\": \"quae\",
    \"assetTypeId\": \"sequi\",
    \"assetId\": \"dolore\",
    \"parentId\": \"fugiat\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/assets/validate',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'requestId' => '2ec44954-2ceb-3d37-8256-2b07e16509d8',
            'providerId' => 'quae',
            'assetTypeId' => 'sequi',
            'assetId' => 'dolore',
            'parentId' => 'fugiat',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/assets/validate"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "requestId": "2ec44954-2ceb-3d37-8256-2b07e16509d8",
    "providerId": "quae",
    "assetTypeId": "sequi",
    "assetId": "dolore",
    "parentId": "fugiat"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/demo/social-providers/assets/validate

Body Parameters

requestId  string  

validation.uuid.

providerId  string  

assetTypeId  string  

assetId  string  

parentId  string optional  

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,
     }
 }
 

Request   

POST api/subscriptions/cancel

Body Parameters

subscription_id  integer  

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"
        }
    }
}
 

Request   

POST api/subscriptions/cancel/customer-portal-session

Body Parameters

subscription_id  string  

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"
        }
    }
}
 

Request   

POST api/subscriptions/charge-extra-usage/checkout-session

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"
        }
    }
}
 

Request   

POST api/subscriptions/renew/customer-portal-session

Body Parameters

subscription_id  string  

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"
        }
    }
}
 

Request   

POST api/subscriptions/update-price

Body Parameters

price_id  string  

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"
                }
            ]
        }
    }
}
 

Request   

GET api/admin/users

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"
            }
        }
    }
}
 

Request   

POST api/admin/users

Body Parameters

name  string  

email  string  

roleId  string  

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"
        }
    ]
}
 

Request   

GET api/admin/roles

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"
}
 

Request   

GET api/admin/agencies/list

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"
            }
        }
    }
}
 

Request   

POST api/admin/users/{user_slug}/active

URL Parameters

user_slug  string  

The slug of the user.

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"
            }
        }
    }
}
 

Request   

POST api/admin/users/{user_slug}/deactivate

URL Parameters

user_slug  string  

The slug of the user.

Tiktok

List Business Centers

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/tiktok/business-centers" \
    --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/social-providers/tiktok/business-centers',
    [
        '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/social-providers/tiktok/business-centers"
);

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": "Business centers listed successfully"
     "data": [
         {
             "id": "12121212121",
             "name": "Center name"
         }
     ]
 }
 

Request   

GET api/social-providers/tiktok/business-centers

GET api/social-providers/tiktok/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/social-providers/tiktok/ad-accounts" \
    --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/social-providers/tiktok/ad-accounts',
    [
        '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/social-providers/tiktok/ad-accounts"
);

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": ""
}
 

Request   

GET api/social-providers/tiktok/ad-accounts

GET api/demo/social-providers/tiktok/ad-accounts

requires authentication

Example request:
curl --request GET \
    --get "https://digitalsero-staging-api.b5digital.dk/api/demo/social-providers/tiktok/ad-accounts" \
    --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/social-providers/tiktok/ad-accounts',
    [
        '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/social-providers/tiktok/ad-accounts"
);

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": ""
}
 

Request   

GET api/demo/social-providers/tiktok/ad-accounts

UserSocialProviders

Set User Social Provider as Default

requires authentication

Example request:
curl --request POST \
    "https://digitalsero-staging-api.b5digital.dk/api/user-social-providers/6/default" \
    --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/user-social-providers/6/default',
    [
        '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/user-social-providers/6/default"
);

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": "Your social Account set to default."
     "data": []
 }
 

Request   

POST api/user-social-providers/{userSocialProvider_id}/default

URL Parameters

userSocialProvider_id  integer  

The ID of the userSocialProvider.

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"
            }
        }
    }
}
 

Request   

GET api/users/me

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"
            }
        }
    }
}
 

Request   

PUT api/users/me

Body Parameters

name  string  

email  string  

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"
            }
        }
    }
}
 

Request   

PUT api/users/me/removeProfilePicture

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"
                }
            ]
        }
    }
}
 

Request   

GET api/users

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"
            }
        }
    }
}
 

Request   

POST api/users

Body Parameters

name  string  

email  string  

roleId  string  

profilePicture  file optional  

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"
            }
        }
    }
}
 

Request   

GET api/users/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

slug  string  

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"
            }
        }
    }
}
 

Request   

PUT api/users/{user_slug}

PATCH api/users/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

slug  string  

Body Parameters

name  string  

roleId  string  

email  string  

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,
     }
 }
 

Request   

DELETE api/users/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

slug  string  

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"
            }
        }
    }
}
 

Request   

POST api/users/set-password/{user_slug}

URL Parameters

user_slug  string  

The slug of the user.

Body Parameters

password  string  

email  string  

password_confirmation  string  

token  string  

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());

Request   

POST api/users/me/onboarding/video-watch