Introduction
This documentation aims to provide all the information you need to work with the Apostle API. Here you will be able to see what kind of requests are available and how to make the correct calls to the API. As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).
Base URL
api-apostle.comAuthenticating 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.
Logging in and using API-calls with the Apostle API is a bit different than normal. First when logging in, there is the option to give the domainname of a Team. This will make it so the User will log in to that specific Team. When logging in, a user_token and membership_token will be given. The user_token is supposed to be used like an authentication bearer, as is the case with most APIs. The membership_token is a token that you're supposed to enter with every call in the parameters. This will make it so the API understands what Team you're logged in to and thus return the right information. Every API call always uses the membership_token, except the login. Always enter it with the parameter name 'membership_token'
An account to test the API with is:
email: test@apostle.nl
password: passwordAuthentication
API-calls to manage authentication and logging in.
Register
requires authentication
Creates an User under a newly registered Team, Brand and then gets placed under the Apostle organization.
Example request:
curl -X POST \
"api-apostle.com/api/register" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"brand_name":"velit","team_name":"error","team_domain":"ut","email":"repudiandae","first_name":"soluta","last_name":"vitae","password":"est"}'
const url = new URL(
"api-apostle.com/api/register"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"brand_name": "velit",
"team_name": "error",
"team_domain": "ut",
"email": "repudiandae",
"first_name": "soluta",
"last_name": "vitae",
"password": "est"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, OK):
"data": {
"items": [
{
"email": "rickmartens@home.nl",
"first_name": "Rick",
"last_name": "Martens",
"created_at": "2021-01-29T09:56:13.000000Z",
"id": 201
},
{
"name": "testbrand",
"updated_at": "2021-01-29T09:56:13.000000Z",
"created_at": "2021-01-29T09:56:13.000000Z",
"id": 101
},
{
"name": "testTeam",
"domain": "tts",
"updated_at": "2021-01-29T09:56:13.000000Z",
"created_at": "2021-01-29T09:56:13.000000Z",
"id": 123
},
{
"updated_at": "2021-01-29T09:56:13.000000Z",
"created_at": "2021-01-29T09:56:13.000000Z",
"id": 9048
}
]
}
}
Example response (400, Incorrect input):
The data that has been put in could not be validated.
Received response:
Request failed with error:
Login
requires authentication
Logs the user in based on their email, password and team_domain. A membership_token and user_token are returned.
Example request:
curl -X POST \
"api-apostle.com/api/login" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"accusantium","password":"et","team_domain":"eos"}'
const url = new URL(
"api-apostle.com/api/login"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "accusantium",
"password": "et",
"team_domain": "eos"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, OK):
"data": {
"user_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMzk5OTMyMmMzNTVmNjI0MzhkNzFkMGMzYjM1M2EwZmQ0NjE5M2RjYTJjNTgyNzkxNDllMmQ3NTUxZmU2NjlmNDEzYWQwNzVkZDUxOGI3YTEiLCJpYXQiOiIxNjExOTEzODk0Ljk2ODQwNCIsIm5iZiI6IjE2MTE5MTM4OTQuOTY4NDExIiwiZXhwIjoiMTY0MzQ0OTg5NC45MzU5OTQiLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.MMzVlOrYgw7ITdRlgxwx7BwzCvjf5KDClc7IYH6DG7BlZ0rSYJtZ8yrt0wggnsvd8nsGjcFF4gvmglvDdoPzSneVGjQtEX2T8wXgl9A4R-PHTkggDHmETyuQdEQL1k3es7CHK_uL2cqO-k5NSDxFkAmqwEZ4NGNDK3ZR4P3LLqPR_QuCJe97QyDiQzy7Du5DdoiSUWExovnf45xbHgzPdSUE2U6wKMb0nfw83tm_g5lyU0NeEfbhhzkAKuF9kSJh-A9U68e9hep0GAm4jN1y_SmU41zc128iVxN-jrRzH8ElCFwWuTsuEZ-KvfIFHuKTNmN-AbAbTL8TxlhtNvOl8jwvlYu97PRiBOcSr1_c4AXwyETNDjxGbdzLlYrjL-KyXaAEpDXtXi6_OMiib1nlLzd0J2f6BvMJNbaGxfRITj8k21Bh24iCegjMmYDN0tZjZhUTnNfOxdlfbRLPfAbzBAz1L7iXyVyg43CnecWdU5a6iWjqXxzfT0tDa0OuB6MKmrw30nInvt216p5pv1aGsVWHYAPf3IDjVu7opQHm3vzAND1ED01NSQnsVVtkUVMZRfWxbKUHPWbPTeQzqxxdO1FYI6jmC9TI3R442nGn30fY4SCjakbrHa1TsEcISS34uiqxhQ3YIQDOMYUbdy-kXYFNYXvZiuyTE-1JYJIuQ7w",
"membership_token": "eyJpdiI6IkhWSkhnTXc3cEtSdjVNeTUwUkFFcEE9PSIsInZhbHVlIjoiTXVmME1VNW1NczJDQldYYU9IN3VKUT09IiwibWFjIjoiZDhiNTdjZmZiNWJhNTVhN2Y2Y2FhYzM4MGE3NzAwNjViZDljMWQ1YWFjZDcwMzdiMWMyMjdmOThlZDcwYzBkMyJ9"
}
Example response (404, Not found):
Either the login credentials are incorrect, or there was no user with that email found within the database.
Received response:
Request failed with error:
Send magic link
requires authentication
Request a magic link to be sent to user e-mail address. A membership_token and user_token are returned.
Example request:
curl -X POST \
"api-apostle.com/api/login/magic/send" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"e-mail":"quibusdam"}'
const url = new URL(
"api-apostle.com/api/login/magic/send"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"e-mail": "quibusdam"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, Not found):
User not found.
Received response:
Request failed with error:
Magic login
requires authentication
Use token to login once, after this te token will be deleted. A membership_token and user_token are returned.
Example request:
curl -X GET \
-G "api-apostle.com/api/login/magic" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"excepturi","team_domain":"dolor"}'
const url = new URL(
"api-apostle.com/api/login/magic"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "excepturi",
"team_domain": "dolor"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, Not found):
Invalid token or User not found.
Example response (403, Forbidden):
Token has timed-out.
Received response:
Request failed with error:
Logout
requires authentication
Logout for the User
Example request:
curl -X GET \
-G "api-apostle.com/api/logout" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/logout"
);
let 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, Not logged in):
There is no User logged in to log out.
Received response:
Request failed with error:
Send password reset link
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/password/reset/send" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/password/reset/send"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (422):
{
"success": false,
"code": 115,
"locale": "nl_NL",
"message": "The given data was invalid.",
"data": {
"messages": {
"email": [
"The email field is required."
]
}
},
"debug": {
"trace": {
"class": "Illuminate\\Validation\\ValidationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Validation\/Validator.php",
"line": 466
}
}
}
Received response:
Request failed with error:
Reset password with token
requires authentication
Example request:
curl -X POST \
"api-apostle.com/api/password/reset" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/password/reset"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/impersonate/{user}
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/impersonate/non" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/impersonate/non"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Brands
A slug to group Teams within a Brand by.
Index
requires authentication
Retrieve all Brands under the same organization as the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/brand/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"perferendis","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/brand/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "perferendis",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
{
"id": 4,
"name": "corrupti",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
"organization_id": 5,
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
},
{
"id": 10,
"name": "marcetti",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
"organization_id": 5,
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, No Brands found):
There were no Brands found within our database.
Received response:
Request failed with error:
Me
requires authentication
Get the details of Brand of the logged in Member
Example request:
curl -X GET \
-G "api-apostle.com/api/brand/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"illum"}'
const url = new URL(
"api-apostle.com/api/brand/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "illum"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, No Team found):
There was no Team found associated to the given Membership.
Example response (500):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Resolve
requires authentication
Search a Brand that possesses the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/brand/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"et","search_query":"in"}'
const url = new URL(
"api-apostle.com/api/brand/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "et",
"search_query": "in"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"values": [
[
{
"id": 1,
"name": "sit",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
]
]
}
Example response (404, No Brands found):
There were no Brands found based on the query given.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Brand that is available under the same Organization as the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/brand/detail/2" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"neque"}'
const url = new URL(
"api-apostle.com/api/brand/detail/2"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "neque"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "corrupti",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
]
}
Example response (404, No Brand found):
There was no Brand found with that ID.
Example response (409, Conflict):
The Brand you're trying to see does not fall under your Organization, thus you are unauthorized.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Brand with the given parameters as attributes of said Brand.
Example request:
curl -X POST \
"api-apostle.com/api/brand/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"quibusdam","name":"doloribus","organization_id":14}'
const url = new URL(
"api-apostle.com/api/brand/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "quibusdam",
"name": "doloribus",
"organization_id": 14
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"name": "Scortini",
"updated_at": "2021-01-13T08:46:55.000000Z",
"created_at": "2021-01-13T08:46:55.000000Z",
"id": 134,
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
]
}
Example response (400, Wrong values):
The given values to create the Brand either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Brand could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Brand with the given parameters as the new attributes of the given Brand.
Example request:
curl -X PATCH \
"api-apostle.com/api/brand/edit/20" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"tempora","name":"doloribus"}'
const url = new URL(
"api-apostle.com/api/brand/edit/20"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "tempora",
"name": "doloribus"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "Scorccini",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
]
}
Example response (404, Brand not found):
Could not find the Brand associated with the ID that was given.
Example response (409, Conflict):
The Brand attempted to edit did not fall under the same Organization as the given Membership and is thus unauthorized to be edited.
Received response:
Request failed with error:
Update
requires authentication
Updates the authenticated User with the given parameters.
Example request:
curl -X PATCH \
"api-apostle.com/api/brand/me/edit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ratione","email":"a","password":"et","first_name":"cupiditate","last_name":"voluptatem","dob":"ab","phone":"et","language":"quia","consent":true,"avatar":"qui"}'
const url = new URL(
"api-apostle.com/api/brand/me/edit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ratione",
"email": "a",
"password": "et",
"first_name": "cupiditate",
"last_name": "voluptatem",
"dob": "ab",
"phone": "et",
"language": "quia",
"consent": true,
"avatar": "qui"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"email": "test@gmail.com",
"first_name": "Rick",
"last_name": "Martens",
"created_at": "2021-01-19T11:40:17.000000Z",
"id": 101
}
]
}
Example response (404, User not found):
Could not find the User associated with the ID that was given.
Example response (409, Conflict):
The User could not be updated.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Brands based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/brand/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"soluta","array":"doloremque"}'
const url = new URL(
"api-apostle.com/api/brand/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "soluta",
"array": "doloremque"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 6,
"id": 8,
}
]
}
Example response (409, Could not be deleted):
Some or all Brands given could not be deleted.
Received response:
Request failed with error:
Destroy Me
requires authentication
Destroys the current Brand.
Example request:
curl -X DELETE \
"api-apostle.com/api/brand/me/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"qui"}'
const url = new URL(
"api-apostle.com/api/brand/me/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "qui"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Endpoints
api/permission/all
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/permission/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/all"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Check one or more columns against a value delimited per item on semicolon ';'
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/permission/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/resolve"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/permission/detail/{id}
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/permission/detail/at" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/detail/at"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/permission/create
requires authentication
Example request:
curl -X POST \
"api-apostle.com/api/permission/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/permission/edit/{id}
requires authentication
Example request:
curl -X PATCH \
"api-apostle.com/api/permission/edit/labore" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/edit/labore"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/permission/delete
requires authentication
Example request:
curl -X DELETE \
"api-apostle.com/api/permission/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/permission/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/translation/all
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/translation/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/all"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/translation/resolve
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/translation/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/resolve"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/translation/detail/{id}
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/translation/detail/at" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/detail/at"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/translation/create
requires authentication
Example request:
curl -X POST \
"api-apostle.com/api/translation/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/translation/edit/{id}
requires authentication
Example request:
curl -X PATCH \
"api-apostle.com/api/translation/edit/itaque" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/edit/itaque"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/translation/delete
requires authentication
Example request:
curl -X DELETE \
"api-apostle.com/api/translation/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/translation/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Groups
A slug to group members within a team by.
Memberships
requires authentication
Retrieve all Memberships under the same requested Group
Example request:
curl -X GET \
-G "api-apostle.com/api/group/memberships/expedita" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"quae","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/group/memberships/expedita"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "quae",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (400, No pagination):
No pagination parameter given.
Example response (401, Not authorized):
No access.
Example response (404, No Group found):
There was no Group with the given id found within our database.
Example response (409, Not authorized):
Group and Membership do not belong to the same Team.
Received response:
Request failed with error:
Membership Add
requires authentication
Adds membership to given Group.
Example request:
curl -X POST \
"api-apostle.com/api/group/add/membership" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"alias","group_id":20,"membership_id":15}'
const url = new URL(
"api-apostle.com/api/group/add/membership"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "alias",
"group_id": 20,
"membership_id": 15
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401, Not authorized):
No access.
Example response (400, Wrong values):
You entered wrong values.
Example response (403, No access):
Group doesn't belong to your team.
Example response (409, Conflict):
This relation already exists.
Received response:
Request failed with error:
Membership Delete
requires authentication
Deletes membership from given Group.
Example request:
curl -X DELETE \
"api-apostle.com/api/group/delete/membership" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"sint","group_id":7,"membership_id":12}'
const url = new URL(
"api-apostle.com/api/group/delete/membership"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "sint",
"group_id": 7,
"membership_id": 12
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401, Not authorized):
No access.
Example response (400, Wrong values):
You entered wrong values.
Example response (403, No access):
Group doesn't belong to your team.
Example response (403, No access):
The given Membership does not belong to your Team.
Example response (409, Conflict):
This relation already exists.
Example response (503, Service Unavailable):
Could not remove relation, something went wrong. Please contact developers.
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Groups under the same Team as the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/group/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ut","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/group/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ut",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 4,
"name": "corrupti",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
},
{
"id": 10,
"name": "marcetti",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Groups found):
There were no Groups found within our database.
Received response:
Request failed with error:
Resolve
requires authentication
Search a Group with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/group/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptatum","search_query":"itaque"}'
const url = new URL(
"api-apostle.com/api/group/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptatum",
"search_query": "itaque"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sit",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"team_id": 8,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Groups found):
There were no Groups found based on the query given.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Group that is available under the same Team as the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/group/detail/9" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolore"}'
const url = new URL(
"api-apostle.com/api/group/detail/9"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolore"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "corrupti",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Group found):
There was no Group found with that ID.
Example response (409, Conflict):
The Group you're trying to see does not fall under your Team, thus you are unauthorized.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Group with the given parameters as attributes of said Group.
Example request:
curl -X POST \
"api-apostle.com/api/group/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"sunt","name":"accusantium","team_id":11}'
const url = new URL(
"api-apostle.com/api/group/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "sunt",
"name": "accusantium",
"team_id": 11
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"name": "Scortini",
"updated_at": "2021-01-13T08:46:55.000000Z",
"created_at": "2021-01-13T08:46:55.000000Z",
"id": 134,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (400, Wrong values):
The given values to create the Group either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Group you are trying to create does not belong to your Team.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Group with the given parameters as the new attributes of the given Group.
Example request:
curl -X PATCH \
"api-apostle.com/api/group/edit/13" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"sapiente","name":"a"}'
const url = new URL(
"api-apostle.com/api/group/edit/13"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "sapiente",
"name": "a"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "Scorccini",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, Group not found):
Could not find the Group associated with the ID that was given.
Example response (409, Conflict):
The Group attempted to edit did not fall under the same Team as the given Membership and is thus unauthorized to be edited.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Groups based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/group/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolores","array":"cumque"}'
const url = new URL(
"api-apostle.com/api/group/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolores",
"array": "cumque"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 6,
"id": 8,
}
]
}
Example response (409, Could not be deleted):
Some or all Groups given could not be deleted.
Received response:
Request failed with error:
Images
Image handling
api/images/all
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/images/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/images/all"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Check one or more columns against a value delimited per item on semicolon ';'
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/images/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/images/resolve"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
api/images/detail/{id}
requires authentication
Example request:
curl -X GET \
-G "api-apostle.com/api/images/detail/quo" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/images/detail/quo"
);
let 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):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Store
requires authentication
Stores a single Image and generates a 40x40 thumbnail
Example request:
curl -X POST \
"api-apostle.com/api/images/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "membership_token=consectetur" \
-F "title=dolore" \
-F "description=voluptas" \
-F "alt=non" \
-F "image=@/tmp/phpduvEI8"
const url = new URL(
"api-apostle.com/api/images/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('membership_token', 'consectetur');
body.append('title', 'dolore');
body.append('description', 'voluptas');
body.append('alt', 'non');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (201, Created):
"data": {
"items": [
{
"id": 132,
"title": "title",
"description": "description",
"src": "images/LdQgUpRo0scMynLtEQGxK7x9VyI2jH0ly8aDHNEd.jpg",
"filename": "php0i6liU",
"extension": "jpeg",
"filesize": 116082000,
"width": 1600,
"height": 1600,
"alt": null,
"thumbnail_id": 132,
"created_at": null,
"updated_at": null,
"thumbnail": {
"id": 132,
"src": "thumbnails/php0i6liU.jpg",
"created_at": null,
"updated_at": null
}
}
]
}
Received response:
Request failed with error:
Store Multiple
requires authentication
Stores multiple Images and generates 40x40 thumbnails
Example request:
curl -X POST \
"api-apostle.com/api/images/create/multiple" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "membership_token=hic" \
-F "image=@/tmp/phpqW0PWX"
const url = new URL(
"api-apostle.com/api/images/create/multiple"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('membership_token', 'hic');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (201, Created):
"data": {
"items": [
{
"id": 132,
"title": "title",
"description": "description",
"src": "images/LdQgUpRo0scMynLtEQGxK7x9VyI2jH0ly8aDHNEd.jpg",
"filename": "php0i6liU",
"extension": "jpeg",
"filesize": 116082000,
"width": 1600,
"height": 1600,
"alt": null,
"thumbnail_id": 132,
"created_at": null,
"updated_at": null,
"thumbnail": {
"id": 132,
"src": "thumbnails/php0i6liU.jpg",
"created_at": null,
"updated_at": null
}
}
]
}
Received response:
Request failed with error:
api/images/edit/{id}
requires authentication
Example request:
curl -X PATCH \
"api-apostle.com/api/images/edit/veritatis" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/images/edit/veritatis"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/images/delete
requires authentication
Example request:
curl -X DELETE \
"api-apostle.com/api/images/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"api-apostle.com/api/images/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Invites
API-calls to manage and view the Invites.
Accept
requires authentication
Accepts an Invite based on the token given in the email.
Example request:
curl -X POST \
"api-apostle.com/api/invite/accept/dolor" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"password":"illo","email":"velit","first_name":"est","last_name":"fuga"}'
const url = new URL(
"api-apostle.com/api/invite/accept/dolor"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "illo",
"email": "velit",
"first_name": "est",
"last_name": "fuga"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"user_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiY2NlOTYzNTI3ZGNhZTE3ZDA5N2Q4ZDRkZTFkZTg2YmM0ODU4OGU3MzI4YWZlN2UwODhjOGY3ZDg5ODVlOWJjNWQ3MDY4OTc4MWQxZDRlNTAiLCJpYXQiOiIxNjEwOTcxNTg0LjUyNTQwNiIsIm5iZiI6IjE2MTA5NzE1ODQuNTI1NDM5IiwiZXhwIjoiMTY0MjUwNzU4NC40ODczNDIiLCJzdWIiOiIxMDEiLCJzY29wZXMiOltdfQ.rShoJwanYO6zgXmkR3aEoZYYGOUgyRh4qcKWat_B5l42-jFMLbWrw2CoTvLSijJTGQ-rApCH0qyZTjm8eTKQ3aRVwdXYUc24jjjVRrpzosWDGXl8OnkSueM6V23QUU8rUYjwoPoQlBiPihS3xFDRDyR0szuD0YIhVDN_CsO14naW2SbqSuPqtVolW2GAXICN8Ily7N0kk-4vZ4ZeeIhGJocHlBlmwEtjjcM5yN6he7oL1QhN8UeCdJDDREIa3aflf6xrN9mGtYUDDRhZ6ScA5GrQrfyMHfteT6iZZpMyXFKZbufYlzyub2m4lyeYTqZdTHM38d1X9ByBmHgsiS0ZWHyWDe5u9mh2bDXzFPNp91ssOmgUaLjG683FgxgjqWqznzBi0exD-wXRCMRoTaYN1-A2xQWYDZy_AxR9mEZPKgy5YByMPACnEhBwKhhfEdz7eO8itZZOohy2766KIJ_aOl0Fw_tm4dZLdQPJRungDGXG2dWWA35OaW3H9Yi6Z8LyEnxIclrACTcdiXvirYP6pb86bkAhzxBUHRKbHYEyNKalEMVIBoThGKkoiZ_yZ2s1vh0ZQl7lHQvlBbIfMGRDBT62Kxu3vvajUo_Fkgy5dqFM8aLpqbjlzMVqB9sQkVg1niK8B7QtA-3Z8gwNUB0nCpH_MKZTxn02pYBr-DjVwVQ",
"membership_token": "eyJpdiI6ImJVUGNNZldDcDFXOWZjSEhxWko2TUE9PSIsInZhbHVlIjoiKzNOYnArdjNMeWE0eXNYWUVpTGNUUT09IiwibWFjIjoiNjI4NGM3OTdkNDI3ZDM2ZjA3ZTI2MzQ2OGQ4MGQxYjY0OGZjNDgxZTQ0OTYyMWMzOTMzNTY1NzE2MDZhOTYyYiJ9"
}
Example response (401, Unauthorized):
The Invite you're trying to send does not belong to your Team.
Example response (404, Invite not found):
The invite you're trying to accept can not be found.
Example response (409, Conflict):
The new user could not be logged in.
Example response (400, Bad Request):
Either the token could not be found, or the User already has a Membership with that Team.
Received response:
Request failed with error:
Send
requires authentication
Send a created Invite to the email address in the object.
Example request:
curl -X GET \
-G "api-apostle.com/api/invite/send/suscipit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"modi"}'
const url = new URL(
"api-apostle.com/api/invite/send/suscipit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "modi"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 101,
"state": "pending",
"token": "ZiBzVqTGkConoJQ0GVVhI65KE7cA38HG8P8CovPOC12nfdXlaSwN7sISnY2gmv5v",
"email": "test@gmail.com",
"name": "mister master man",
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
},
"sent_at": "2021-01-18T12:02:45.677520Z",
"accepted_at": null,
"message": "Ik ben een testbericht!",
"created_at": "2021-01-18T12:01:29.000000Z",
"updated_at": "2021-01-18T12:02:45.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (401, Unauthorized):
The Invite you're trying to send does not belong to your Team.
Example response (404, No Invite found):
There was no Invite found with that ID.
Received response:
Request failed with error:
Resolve
requires authentication
Search an Invite with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/invite/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"nostrum","search_query":"dolore"}'
const url = new URL(
"api-apostle.com/api/invite/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "nostrum",
"search_query": "dolore"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"state": "pending",
"token": "PakN8cRgw2vydzxYj4m7pplJMTYX35O0aCkl3mXBYTWrxqtrOvumOZKoy7xQbl6o",
"email": "iharris@hotmail.com",
"name": "Blaze Veum",
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z"
},
"sent_at": null,
"accepted_at": null,
"message": "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen.",
"created_at": "1994-09-13T13:44:09.000000Z",
"updated_at": "1991-03-14T03:15:05.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Invites found):
There were no Invites found based on the query given.
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Invites under the same Team of the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/invite/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dicta","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/invite/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dicta",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"state": "pending",
"token": "PakN8cRgw2vydzxYj4m7pplJMTYX35O0aCkl3mXBYTWrxqtrOvumOZKoy7xQbl6o",
"email": "iharris@hotmail.com",
"name": "Blaze Veum",
"role_id": 1,
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
},
"sent_at": null,
"accepted_at": null,
"message": "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen.",
"created_at": "1994-09-13T13:44:09.000000Z",
"updated_at": "1991-03-14T03:15:05.000000Z",
"team_id": 8,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand_id": 6,
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization_id": 10,
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Invites found):
There were no Invites found within our database.
Received response:
Request failed with error:
Show
requires authentication
Show the details of an Invite that is available under the same Team,.
Example request:
curl -X GET \
-G "api-apostle.com/api/invite/detail/13" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"eius"}'
const url = new URL(
"api-apostle.com/api/invite/detail/13"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "eius"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"state": "pending",
"token": "PakN8cRgw2vydzxYj4m7pplJMTYX35O0aCkl3mXBYTWrxqtrOvumOZKoy7xQbl6o",
"email": "iharris@hotmail.com",
"name": "Blaze Veum",
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
},
"sent_at": null,
"accepted_at": null,
"message": "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen.",
"created_at": "1994-09-13T13:44:09.000000Z",
"updated_at": "1991-03-14T03:15:05.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Invite found):
There was no Invite found with that ID.
Example response (409, Conflict):
The Invite you're trying to see does not fall under your Team, thus you are unauthorized.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Invite with the given parameters as attributes of said Invite.
Example request:
curl -X POST \
"api-apostle.com/api/invite/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"perspiciatis","team_id":12,"state":"cupiditate","name":"ea","token":"voluptatibus","email":"fugit","role_id":1,"message":"maiores"}'
const url = new URL(
"api-apostle.com/api/invite/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "perspiciatis",
"team_id": 12,
"state": "cupiditate",
"name": "ea",
"token": "voluptatibus",
"email": "fugit",
"role_id": 1,
"message": "maiores"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"state": "pending",
"name": "mister master man",
"token": "ZiBzVqTGkConoJQ0GVVhI65KE7cA38HG8P8CovPOC12nfdXlaSwN7sISnY2gmv5v",
"email": "test@gmail.com",
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
},
"message": "Ik ben een testbericht!",
"updated_at": "2021-01-18T12:01:29.000000Z",
"created_at": "2021-01-18T12:01:29.000000Z",
"id": 101,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (400, Wrong values):
The given values to create the Invite either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Invite could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Invite with the given parameters as the new attributes of the given Invite.
Example request:
curl -X PATCH \
"api-apostle.com/api/invite/edit/illum" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"illo","state":"aut","role_id":8,"message":"provident","sent_at":"voluptate","accepted_at":"beatae"}'
const url = new URL(
"api-apostle.com/api/invite/edit/illum"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "illo",
"state": "aut",
"role_id": 8,
"message": "provident",
"sent_at": "voluptate",
"accepted_at": "beatae"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"state": "pending",
"token": "PakN8cRgw2vydzxYj4m7pplJMTYX35O0aCkl3mXBYTWrxqtrOvumOZKoy7xQbl6o",
"email": "iharris@hotmail.com",
"name": "Blaze Veum",
"role": {
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
},
"sent_at": null,
"accepted_at": null,
"message": "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen.",
"created_at": "1994-09-13T13:44:09.000000Z",
"updated_at": "2021-01-19T09:03:15.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, Invite not found):
Could not find the Invite associated with the ID that was given.
Example response (409, Conflict):
The Invite you're trying to access does not belong to your Team.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Invites based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/invite/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"recusandae","array":"ratione"}'
const url = new URL(
"api-apostle.com/api/invite/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "recusandae",
"array": "ratione"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 1,
"id": 3,
}
]
}
Example response (409, Could not be deleted):
Some or all Invites given could not be deleted.
Received response:
Request failed with error:
Memberships
API-calls to manage and view the Memberships.
Assign Role
requires authentication
Assign a Role to a Membership
Example request:
curl -X POST \
"api-apostle.com/api/membership/assign/role/reiciendis/ut" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptate","membership_id":"maxime"}'
const url = new URL(
"api-apostle.com/api/membership/assign/role/reiciendis/ut"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptate",
"membership_id": "maxime"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, No Roles found):
There were no Roles found based on the query given.
Received response:
Request failed with error:
Resolve
requires authentication
Search and filter trough Memberships within your team/brand/org and retrieve the User objects related to those Memberships Every search parameter can bu used with multiple search-terms by concatenating the term with a semicolon like this (term1;term2;term3)
Example request:
curl -X GET \
-G "api-apostle.com/api/membership/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"facilis","type":"nihil","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access","membership_role":11,"membership_ghost":true,"user_first_name":"sequi","user_last_name":"eaque","user_dob":"qui","user_email":"quidem","user_phone":"dolorem","user_language":"expedita"}'
const url = new URL(
"api-apostle.com/api/membership/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "facilis",
"type": "nihil",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access",
"membership_role": 11,
"membership_ghost": true,
"user_first_name": "sequi",
"user_last_name": "eaque",
"user_dob": "qui",
"user_email": "quidem",
"user_phone": "dolorem",
"user_language": "expedita"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, No Memberships found):
There were no Memberships found based on the query given.
Received response:
Request failed with error:
Me
requires authentication
Get the details of the authenticated Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/membership/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"eaque"}'
const url = new URL(
"api-apostle.com/api/membership/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "eaque"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Memberships under the same Team, Brand or Organization
Example request:
curl -X GET \
-G "api-apostle.com/api/membership/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"saepe","type":"et","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/membership/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "saepe",
"type": "et",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, No Memberships found):
There were no Memberships found within our database.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Membership with the given parameters as attributes of said Membership.
Example request:
curl -X POST \
"api-apostle.com/api/membership/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"culpa","user_id":19,"team_id":10,"role_id":11,"ghost":true}'
const url = new URL(
"api-apostle.com/api/membership/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "culpa",
"user_id": 19,
"team_id": 10,
"role_id": 11,
"ghost": true
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"updated_at": "2021-01-13T08:46:55.000000Z",
"created_at": "2021-01-13T08:46:55.000000Z",
"id": 134,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
},
"role": {
"id": 6,
"name": "Apostle Software-engineer",
"level": "developer",
"created_at": "2021-02-02T12:15:42.000000Z",
"updated_at": "2021-02-02T12:15:42.000000Z"
},
"user": {
"id": 1,
"first_name": "Wava",
"last_name": "Purdy",
"dob": "1999-08-20",
"email": "test@apostle.nl",
"phone": "441-775-9608",
"email_verified_at": "1977-12-28T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?37555",
"language": "nl",
"created_at": "2021-02-02T12:15:43.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
}
]
}
Example response (400, Wrong values):
The given values to create the Membership either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Membership could not be created.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Membership that is available under the same Team, Brand or Organization.
Example request:
curl -X GET \
-G "api-apostle.com/api/membership/detail/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"et","type":"inventore"}'
const url = new URL(
"api-apostle.com/api/membership/detail/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "et",
"type": "inventore"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"last_login": "1995-09-18 00:00:00",
"ghost": 0,
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
},
"role": {
"id": 6,
"name": "Apostle Software-engineer",
"level": "developer",
"created_at": "2021-02-02T12:15:42.000000Z",
"updated_at": "2021-02-02T12:15:42.000000Z"
},
"user": {
"id": 1,
"first_name": "Wava",
"last_name": "Purdy",
"dob": "1999-08-20",
"email": "test@apostle.nl",
"phone": "441-775-9608",
"email_verified_at": "1977-12-28T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?37555",
"language": "nl",
"created_at": "2021-02-02T12:15:43.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
}
]
}
Example response (404, No Membership found):
There was no Membership found with that ID.
Example response (409, Conflict):
The Membership you're trying to see does not fall under your Team, Brand or Organization thus you are unauthorized.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Membership with the given parameters as the new attributes of the given Membership.
Example request:
curl -X PATCH \
"api-apostle.com/api/membership/edit/9" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"nam","role_id":2,"ghost":false}'
const url = new URL(
"api-apostle.com/api/membership/edit/9"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "nam",
"role_id": 2,
"ghost": false
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 21,
"last_login": "2014-09-15 00:00:00",
"ghost": 0,
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
},
"role": {
"id": 6,
"name": "Apostle Software-engineer",
"level": "developer",
"created_at": "2021-02-02T12:15:42.000000Z",
"updated_at": "2021-02-02T12:15:42.000000Z"
},
"user": {
"id": 1,
"first_name": "Wava",
"last_name": "Purdy",
"dob": "1999-08-20",
"email": "test@apostle.nl",
"phone": "441-775-9608",
"email_verified_at": "1977-12-28T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?37555",
"language": "nl",
"created_at": "2021-02-02T12:15:43.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
}
]
}
Example response (404, Membership not found):
Could not find the Membership associated with the ID that was given.
Example response (409, Conflict):
The Membership attempted to edit did not fall under the same Team as the given Membership and is thus unauthorized to be edited.
Received response:
Request failed with error:
Update Me
requires authentication
Updates the authenticated Membership with the given parameters as the new attributes of the given Membership.
Example request:
curl -X PATCH \
"api-apostle.com/api/membership/me/edit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ea","role_id":7,"ghost":false}'
const url = new URL(
"api-apostle.com/api/membership/me/edit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ea",
"role_id": 7,
"ghost": false
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 21,
"last_login": "2014-09-15 00:00:00",
"ghost": 0,
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"deleted_at": null,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
},
"role": {
"id": 6,
"name": "Apostle Software-engineer",
"level": "developer",
"created_at": "2021-02-02T12:15:42.000000Z",
"updated_at": "2021-02-02T12:15:42.000000Z"
},
"user": {
"id": 1,
"first_name": "Wava",
"last_name": "Purdy",
"dob": "1999-08-20",
"email": "test@apostle.nl",
"phone": "441-775-9608",
"email_verified_at": "1977-12-28T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?37555",
"language": "nl",
"created_at": "2021-02-02T12:15:43.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
}
]
}
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Memberships based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/membership/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptas","array":"voluptate"}'
const url = new URL(
"api-apostle.com/api/membership/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptas",
"array": "voluptate"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 21,
"id": 44,
}
]
}
Example response (409, Could not be deleted):
Some or all Memberships given could not be deleted.
Received response:
Request failed with error:
Destroy Me
requires authentication
Destroys a the authenticated Membership.
Example request:
curl -X DELETE \
"api-apostle.com/api/membership/me/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"quia"}'
const url = new URL(
"api-apostle.com/api/membership/me/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "quia"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Organizations
A slug to group all Brands under.
Resolve
requires authentication
Search an Organization with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/organization/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"aut","search_query":"autem"}'
const url = new URL(
"api-apostle.com/api/organization/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "aut",
"search_query": "autem"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sit",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z"
}
]
}
Example response (404, No Organizations found):
There were no Organizations found based on the query given.
Received response:
Request failed with error:
Me
requires authentication
Get the details of the Organization belonging to the logged in Member
Example request:
curl -X GET \
-G "api-apostle.com/api/organization/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"eum"}'
const url = new URL(
"api-apostle.com/api/organization/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "eum"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Mitchell",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z"
}
]
}
Example response (404, No Organization found):
There could not be an Organization found belonging to the given Membership.
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Organizations
Example request:
curl -X GET \
-G "api-apostle.com/api/organization/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"aut","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/organization/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "aut",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "Greenfelder",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
},
{
"id": 2,
"name": "Franecki",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z"
}
]
}
Example response (404, No Organizations found):
There were no Organizations found within our database.
Received response:
Request failed with error:
Show
requires authentication
Show the details of an Organization.
Example request:
curl -X GET \
-G "api-apostle.com/api/organization/detail/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"velit"}'
const url = new URL(
"api-apostle.com/api/organization/detail/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "velit"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "corrupti",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
}
]
}
Example response (404, No Organization found):
There was no Organization found with that ID.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Organization with the given parameters as attributes of said Organization.
Example request:
curl -X POST \
"api-apostle.com/api/organization/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"commodi","name":"nobis"}'
const url = new URL(
"api-apostle.com/api/organization/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "commodi",
"name": "nobis"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"name": "Scortini",
"id": 134
}
]
}
Example response (400, Wrong values):
The given values to create the Organization either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Organization could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Organization with the given parameters as the new attributes of the given Organization.
Example request:
curl -X PATCH \
"api-apostle.com/api/organization/edit/15" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"quaerat","name":"ut"}'
const url = new URL(
"api-apostle.com/api/organization/edit/15"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "quaerat",
"name": "ut"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "Scorccini",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z"
}
]
}
Example response (404, Organization not found):
Could not find the Organization associated with the ID that was given.
Example response (409, Conflict):
The Organization could not be edited.
Received response:
Request failed with error:
Update Me
requires authentication
Updates the Organization belonging to the authenticated Membership with the given parameters as the new attributes of the given Organization.
Example request:
curl -X PATCH \
"api-apostle.com/api/organization/me/edit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"fuga","name":"sit"}'
const url = new URL(
"api-apostle.com/api/organization/me/edit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "fuga",
"name": "sit"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 21,
"name": "jenny",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"deleted_at": null,
}
}
}
Example response (404, No Organizations found):
No Organization linked to the given Membership could be found.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Organizations based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/organization/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"nihil","array":"aliquam"}'
const url = new URL(
"api-apostle.com/api/organization/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "nihil",
"array": "aliquam"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 6,
"id": 61,
}
]
}
Example response (409, Could not be deleted):
Some or all Organizations given could not be deleted.
Received response:
Request failed with error:
Destroy Me
requires authentication
Destroys the Organization linked with the authenticated Membership.
Example request:
curl -X DELETE \
"api-apostle.com/api/organization/me/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"quo"}'
const url = new URL(
"api-apostle.com/api/organization/me/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "quo"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Roles
API-calls to manage and view the Roles.
Index
requires authentication
Retrieve all Roles
Example request:
curl -X GET \
-G "api-apostle.com/api/role/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ut","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/role/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ut",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z",
},
{
"id": 2,
"name": "Social Master",
"level": "team_admin",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z"
}
]
}
Example response (404, No Roles found):
There were no Roles found within our database.
Received response:
Request failed with error:
Resolve
requires authentication
Search a Role with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/role/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptatem","search_query":"quia"}'
const url = new URL(
"api-apostle.com/api/role/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptatem",
"search_query": "quia"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "Ambassador",
"level": "user",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z"
}
]
}
Example response (404, No Roles found):
There were no Roles found based on the query given.
Received response:
Request failed with error:
Me
requires authentication
Get the details of Role of the logged in Member
Example request:
curl -X GET \
-G "api-apostle.com/api/role/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolor"}'
const url = new URL(
"api-apostle.com/api/role/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolor"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (404, No Team found):
There was no Team found associated to the given Membership.
Example response (500):
{
"success": false,
"code": 113,
"locale": "nl_NL",
"message": "Unauthenticated.",
"data": null,
"debug": {
"trace": {
"class": "Illuminate\\Auth\\AuthenticationException",
"file": "\/home\/vagrant\/feniks\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
"line": 82
}
}
}
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Role
Example request:
curl -X GET \
-G "api-apostle.com/api/role/detail/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptatem"}'
const url = new URL(
"api-apostle.com/api/role/detail/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptatem"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 3,
"name": "Brand Master",
"level": "brand_admin",
"created_at": "2021-01-12T12:21:56.000000Z",
"updated_at": "2021-01-12T12:21:56.000000Z"
}
]
}
Example response (404, No Role found):
There was no Role found with that ID.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Role with the given parameters as attributes of said Role.
Example request:
curl -X POST \
"api-apostle.com/api/role/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"consequatur","name":"optio"}'
const url = new URL(
"api-apostle.com/api/role/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "consequatur",
"name": "optio"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"name": "Big Boss",
"updated_at": "2021-01-13T08:46:55.000000Z",
"created_at": "2021-01-13T08:46:55.000000Z",
"id": 134
}
]
}
Example response (400, Wrong values):
The given values to create the Role either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Role could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Role with the given parameters as the new attributes of the given Role.
Example request:
curl -X PATCH \
"api-apostle.com/api/role/edit/tenetur" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"eum","name":"incidunt"}'
const url = new URL(
"api-apostle.com/api/role/edit/tenetur"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "eum",
"name": "incidunt"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"name": "Big Boss",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:56:33.000000Z",
"id": 134
}
]
}
Example response (404, Role not found):
Could not find the Role associated with the ID that was given.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Role based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/role/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"accusantium","array":"ut"}'
const url = new URL(
"api-apostle.com/api/role/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "accusantium",
"array": "ut"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 6,
"id": 16,
}
]
}
Example response (409, Could not be deleted):
Some or all Roles given could not be deleted.
Received response:
Request failed with error:
Teams
A grouping of Memberships, belonging to a Brand.
Resolve
requires authentication
Search a Team with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/team/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"optio","search_query":"error"}'
const url = new URL(
"api-apostle.com/api/team/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "optio",
"search_query": "error"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sit",
"domain": "marquadth",
"logo": "https://lorempixel.com/640/480/?95714",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, No Teams found):
There were no Teams found based on the query given.
Received response:
Request failed with error:
Me
requires authentication
Get the details of Team of the logged in Member
Example request:
curl -X GET \
-G "api-apostle.com/api/team/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"cum"}'
const url = new URL(
"api-apostle.com/api/team/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "cum"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Kessler Ltd",
"domain": "walsh",
"logo": "https://lorempixel.com/640/480/?32874",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, No Team found):
There was no Team found associated to the given Membership.
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Teams under the same Brand or Organization
Example request:
curl -X GET \
-G "api-apostle.com/api/team/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"modi","type":"voluptatibus","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/team/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "modi",
"type": "voluptatibus",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Kessler Ltd",
"domain": "walsh",
"logo": "https://lorempixel.com/640/480/?32874",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"brand_id": 1,
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization_id": 5,
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, No Team found):
There were no Teams found associated to the given Membership under the same Brand or Organization.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Team that is available under the same Brand or Organization.
Example request:
curl -X GET \
-G "api-apostle.com/api/team/detail/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"incidunt","type":"nulla"}'
const url = new URL(
"api-apostle.com/api/team/detail/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "incidunt",
"type": "nulla"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 6,
"name": "Spinka, Roob and Bogan",
"domain": "yundt",
"logo": "https://lorempixel.com/640/480/?77923",
"created_at": "2021-01-13T08:14:25.000000Z",
"updated_at": "2021-01-13T08:14:25.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, No Team found):
There was no Team found with that ID.
Example response (409, Conflict):
The Team you're trying to see does not fall under your Brand or Organization thus you are unauthorized.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Team with the given parameters as attributes of said Team.
Example request:
curl -X POST \
"api-apostle.com/api/team/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"corporis","name":"alias","domain":"qui","logo":"nihil","brand_id":"ratione","theme_id":"atque"}'
const url = new URL(
"api-apostle.com/api/team/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "corporis",
"name": "alias",
"domain": "qui",
"logo": "nihil",
"brand_id": "ratione",
"theme_id": "atque"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Kessler Ltd",
"domain": "walsh",
"logo": "https://lorempixel.com/640/480/?32874",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (400, Wrong values):
The given values to create the Team either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Team could not be created.
Example response (200, Brand not found):
status= 404 No Brand associated with the Membership could be found and thus no Team could be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Team with the given parameters as the new attributes of the given Team.
Example request:
curl -X PATCH \
"api-apostle.com/api/team/edit/20" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"atque","name":"laboriosam","theme_id":2,"domain":"quis","logo":"sed"}'
const url = new URL(
"api-apostle.com/api/team/edit/20"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "atque",
"name": "laboriosam",
"theme_id": 2,
"domain": "quis",
"logo": "sed"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Kessler Ltd",
"domain": "walsh",
"logo": "https://lorempixel.com/640/480/?32874",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Example response (404, Team not found):
Could not find the Team associated with the ID that was given.
Received response:
Request failed with error:
Update Me
requires authentication
Updates the Team of the authenticated Membership with the given parameters as the new attributes of the given Team.
Example request:
curl -X PATCH \
"api-apostle.com/api/team/me/edit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"est","name":"libero","theme_id":15,"domain":"harum","logo":"ipsa"}'
const url = new URL(
"api-apostle.com/api/team/me/edit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "est",
"name": "libero",
"theme_id": 15,
"domain": "harum",
"logo": "ipsa"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 59,
"name": "Kessler Ltd",
"domain": "walsh",
"logo": "https://lorempixel.com/640/480/?32874",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"brand": {
"id": 1,
"name": "aspernatur",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 5,
"name": "Bartell-Carter",
"created_at": null,
"updated_at": null
}
}
}
]
}
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Teams based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/team/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolores","array":"magnam"}'
const url = new URL(
"api-apostle.com/api/team/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolores",
"array": "magnam"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 37,
"id": 17,
}
]
}
Example response (409, Could not be deleted):
Some or all Teams given could not be deleted.
Received response:
Request failed with error:
Destroy Me
requires authentication
Destroys the current Team.
Example request:
curl -X DELETE \
"api-apostle.com/api/team/me/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"harum"}'
const url = new URL(
"api-apostle.com/api/team/me/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "harum"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Themes
API-calls to manage and view the Themes.
Index
requires authentication
Retrieve all Themes under the same Team as the given Membership
Example request:
curl -X GET \
-G "api-apostle.com/api/theme/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolore","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/theme/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolore",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sunt",
"active": 0,
"logo": "https://lorempixel.com/640/480/?70291",
"font": "Prof. Ole Upton",
"text_color": "WhiteSmoke",
"primary_color": "Tan",
"secondary_color": "SeaShell",
"background_color": "Purple",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"team_id": 8,
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand_id": 6,
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization_id": 10,
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Themes found):
There were no Themes found associated to the Team of the given Membership.
Received response:
Request failed with error:
Resolve
requires authentication
Search a Theme with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/theme/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"non","search_query":"sequi"}'
const url = new URL(
"api-apostle.com/api/theme/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "non",
"search_query": "sequi"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sunt",
"active": 0,
"logo": "https://lorempixel.com/640/480/?70291",
"font": "Prof. Ole Upton",
"text_color": "WhiteSmoke",
"primary_color": "Tan",
"secondary_color": "SeaShell",
"background_color": "Purple",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Themes found):
There were no Themes found based on the query given.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a Theme
Example request:
curl -X GET \
-G "api-apostle.com/api/theme/detail/1" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"in"}'
const url = new URL(
"api-apostle.com/api/theme/detail/1"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "in"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sunt",
"active": 0,
"logo": "https://lorempixel.com/640/480/?70291",
"font": "Prof. Ole Upton",
"text_color": "WhiteSmoke",
"primary_color": "Tan",
"secondary_color": "SeaShell",
"background_color": "Purple",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, No Theme found):
There was no Theme found with that ID.
Example response (409, Conflict):
The Theme you're trying to access does not belong to your Team.
Received response:
Request failed with error:
Store
requires authentication
Stores a single Theme with the given parameters as attributes of said Theme.
Example request:
curl -X POST \
"api-apostle.com/api/theme/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"eius","name":"similique","logo":"facere","font":"aut","text_color":"est","primary_color":"voluptatum","secondary_color":"et","background_color":"neque"}'
const url = new URL(
"api-apostle.com/api/theme/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "eius",
"name": "similique",
"logo": "facere",
"font": "aut",
"text_color": "est",
"primary_color": "voluptatum",
"secondary_color": "et",
"background_color": "neque"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"id": 1,
"name": "sunt",
"active": 0,
"logo": "https://lorempixel.com/640/480/?70291",
"font": "Prof. Ole Upton",
"text_color": "WhiteSmoke",
"primary_color": "Tan",
"secondary_color": "SeaShell",
"background_color": "Purple",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (400, Wrong values):
The given values to create the Theme either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The Theme could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single Theme with the given parameters as the new attributes of the given Theme.
Example request:
curl -X PATCH \
"api-apostle.com/api/theme/edit/aspernatur" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptate","name":"repellat","logo":"quas","font":"quaerat","text_color":"perferendis","primary_color":"architecto","secondary_color":"praesentium","background_color":"quasi"}'
const url = new URL(
"api-apostle.com/api/theme/edit/aspernatur"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptate",
"name": "repellat",
"logo": "quas",
"font": "quaerat",
"text_color": "perferendis",
"primary_color": "architecto",
"secondary_color": "praesentium",
"background_color": "quasi"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"name": "sunt",
"active": 0,
"logo": "https://lorempixel.com/640/480/?70291",
"font": "Prof. Ole Upton",
"text_color": "WhiteSmoke",
"primary_color": "Tan",
"secondary_color": "SeaShell",
"background_color": "Purple",
"created_at": "2021-01-18T10:38:02.000000Z",
"updated_at": "2021-01-18T10:38:02.000000Z",
"team": {
"id": 8,
"name": "Pfannerstill, Halvorson and Marquardt",
"domain": "herman",
"logo": "https://lorempixel.com/640/480/?51237",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"brand": {
"id": 6,
"name": "ut",
"created_at": "2021-02-02T12:15:41.000000Z",
"updated_at": "2021-02-02T12:15:41.000000Z",
"organization": {
"id": 10,
"name": "Wintheiser, Barton and Beahan",
"created_at": null,
"updated_at": null
}
}
}
}
]
}
Example response (404, Theme not found):
Could not find the Theme associated with the ID that was given.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Themes based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/theme/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ipsa","array":"sit"}'
const url = new URL(
"api-apostle.com/api/theme/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ipsa",
"array": "sit"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 4,
"id": 14,
}
]
}
Example response (409, Could not be deleted):
Some or all Themes given could not be deleted.
Received response:
Request failed with error:
Users
API-calls to manage and view the Users.
Resolve
requires authentication
Search an User with the given attributes.
Example request:
curl -X GET \
-G "api-apostle.com/api/user/resolve" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"ut","search_query":"dolore"}'
const url = new URL(
"api-apostle.com/api/user/resolve"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "ut",
"search_query": "dolore"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"first_name": "Manuela",
"last_name": "Gulgowski",
"dob": "1994-12-07",
"email": "spencer.madie@russel.com",
"phone": "640.573.2808 x666",
"email_verified_at": "1984-10-11T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?62835",
"language": "nl",
"created_at": "2021-01-19T10:28:33.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
]
}
Example response (404, No Users found):
There were no Users found based on the query given.
Received response:
Request failed with error:
Me
requires authentication
Get the details of logged in Member
Example request:
curl -X GET \
-G "api-apostle.com/api/user/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"dolor"}'
const url = new URL(
"api-apostle.com/api/user/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "dolor"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"first_name": "Manuela",
"last_name": "Gulgowski",
"dob": "1994-12-07",
"email": "spencer.madie@russel.com",
"phone": "640.573.2808 x666",
"email_verified_at": "1984-10-11T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?62835",
"language": "nl",
"created_at": "2021-01-19T10:28:33.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
]
}
Example response (404, User not found):
The User could not be found.
Received response:
Request failed with error:
Index
requires authentication
Retrieve all Users under the same Team, Brand or Organization
Example request:
curl -X GET \
-G "api-apostle.com/api/user/all" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"deleniti","type":"dolorem","pagination":"\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"}'
const url = new URL(
"api-apostle.com/api/user/all"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "deleniti",
"type": "dolorem",
"pagination": "\"2,3\" The first number will be the amount of items per page, the second is the current page you want to access"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 1,
"first_name": "Manuela",
"last_name": "Gulgowski",
"dob": "1994-12-07",
"email": "spencer.madie@russel.com",
"phone": "640.573.2808 x666",
"email_verified_at": "1984-10-11T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?62835",
"language": "nl",
"created_at": "2021-01-19T10:28:33.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
]
}
Example response (404, No Users found):
There were no Users found within our database.
Received response:
Request failed with error:
Show
requires authentication
Show the details of a User that is available under the same Team, Brand or Organization.
Example request:
curl -X GET \
-G "api-apostle.com/api/user/detail/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"voluptas","type":"aut"}'
const url = new URL(
"api-apostle.com/api/user/detail/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "voluptas",
"type": "aut"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"id": 8,
"first_name": "Torrey",
"last_name": "Eichmann",
"dob": "2007-12-31",
"email": "layne.hagenes@osinski.com",
"phone": "752-632-8081",
"email_verified_at": "2015-12-15T23:00:00.000000Z",
"consent": 0,
"avatar": "https://lorempixel.com/640/480/?91458",
"language": "nl",
"created_at": "2021-01-19T10:28:33.000000Z",
"deleted_at": null,
"provider": null,
"provider_id": null
}
]
}
Example response (404, No User found):
There was no User found with that ID.
Example response (409, Conflict):
The User you're trying to see does not fall under your Team, Brand or Organization, thus you are unauthorized.
Received response:
Request failed with error:
Store
requires authentication
Stores a single User with the given parameters as attributes of said User.
Example request:
curl -X POST \
"api-apostle.com/api/user/create" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"nihil","email":"nisi","password":"nihil","first_name":"vel","last_name":"rem","dob":"commodi","phone":"delectus","language":"sed"}'
const url = new URL(
"api-apostle.com/api/user/create"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "nihil",
"email": "nisi",
"password": "nihil",
"first_name": "vel",
"last_name": "rem",
"dob": "commodi",
"phone": "delectus",
"language": "sed"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"email": "test@gmail.com",
"first_name": "Rick",
"last_name": "Martens",
"created_at": "2021-01-19T11:40:17.000000Z",
"id": 101
}
]
}
Example response (400, Wrong values):
The given values to create the User either already exist within the database or are of the wrong type.
Example response (409, Could not be created):
The User could not be created.
Received response:
Request failed with error:
Update
requires authentication
Updates a single User with the given parameters as the new attributes of the given User.
Example request:
curl -X PATCH \
"api-apostle.com/api/user/edit/19" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"accusamus","email":"recusandae","password":"officia","first_name":"inventore","last_name":"quis","dob":"reiciendis","phone":"itaque","language":"hic","consent":false,"avatar":"repudiandae"}'
const url = new URL(
"api-apostle.com/api/user/edit/19"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "accusamus",
"email": "recusandae",
"password": "officia",
"first_name": "inventore",
"last_name": "quis",
"dob": "reiciendis",
"phone": "itaque",
"language": "hic",
"consent": false,
"avatar": "repudiandae"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, success):
"data": {
"items": [
{
"email": "test@gmail.com",
"first_name": "Rick",
"last_name": "Martens",
"created_at": "2021-01-19T11:40:17.000000Z",
"id": 101
}
]
}
Example response (404, User not found):
Could not find the User associated with the ID that was given.
Example response (409, Conflict):
The User could not be updated.
Received response:
Request failed with error:
Update Me
requires authentication
Updates the authenticated User with the given parameters.
Example request:
curl -X PATCH \
"api-apostle.com/api/user/me/edit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"soluta","email":"officiis","password":"sit","first_name":"ex","last_name":"vero","dob":"cupiditate","phone":"iste","language":"veniam","consent":false,"avatar":"a"}'
const url = new URL(
"api-apostle.com/api/user/me/edit"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "soluta",
"email": "officiis",
"password": "sit",
"first_name": "ex",
"last_name": "vero",
"dob": "cupiditate",
"phone": "iste",
"language": "veniam",
"consent": false,
"avatar": "a"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, success):
"data": {
"items": [
{
"email": "test@gmail.com",
"first_name": "Rick",
"last_name": "Martens",
"created_at": "2021-01-19T11:40:17.000000Z",
"id": 101
}
]
}
Example response (404, User not found):
Could not find the User associated with the ID that was given.
Example response (409, Conflict):
The User could not be updated.
Received response:
Request failed with error:
Destroy
requires authentication
Destroys a single or list of Users based on the IDs given in the parameters.
Example request:
curl -X DELETE \
"api-apostle.com/api/user/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"mollitia","array":"facilis"}'
const url = new URL(
"api-apostle.com/api/user/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "mollitia",
"array": "facilis"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (212, Deleted):
"data": {
"items": [
{
"id": 8,
"id": 81,
}
]
}
Example response (409, Could not be deleted):
Some or all Users given could not be deleted.
Received response:
Request failed with error:
Destroy Me
requires authentication
Destroys the authenticated User.
Example request:
curl -X DELETE \
"api-apostle.com/api/user/me/delete" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"membership_token":"perferendis"}'
const url = new URL(
"api-apostle.com/api/user/me/delete"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"membership_token": "perferendis"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error: