Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://merk.loc
Authenticating requests
This API is not authenticated.
Contact
Contact Us Send Form
Example request:
const url = new URL(
"http://merk.loc/api/contacts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "efrain53@example.org",
"name": "dolor",
"phone": "quaerat",
"subject": "sunt",
"message": "voluptate",
"is_subscription": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Successfully sent"
}
Example response (422):
{
"errors": {
"email": [
"The Email Address field is required."
],
"name": [
"The Your Name field is required."
],
"subject": [
"The Subject field is required."
],
"message": [
"The Message field is required."
],
"is_subscription": [
"The Subscribe me field is required."
]
}
}
Received response:
Request failed with error:
Subscription
Example request:
const url = new URL(
"http://merk.loc/api/contacts/subscription"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "bwiza@example.net",
"name": "modi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "You successfully subscribed"
}
Example response (422):
{
"errors": {
"email": [
"The Email Address field is required."
],
"name": [
"The Your Name field is required."
]
}
}
Received response:
Request failed with error: