The API resources allows you to use most of the features of Garchi Headless CMS to create your own Headless app.
This documentation is for v2 and aims to provide all the information you need to work with our 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).
The API has a rate limit of 600 requests per minute. If more than 600 requests are made within a 1 minute sliding window, the API will return a 429 "Too Many Requests" status code until the rate limit resets.
The rate limit window is measured in 1 minute intervals. If the rate limit is exceeded at 10:05, requests will be throttled until at least 10:06. The rate limit counter is reset after each 1 minute window has passed, allowing another 600 requests.
Getting throttled does not permanently block access; your code should handle the 429 response by retrying requests later.
Base URL
https://garchi.co.uk
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_API_TOKEN}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard. To create a new token check the Subscription section in your dashboard.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"firstname\": \"Aditya\",
\"lastname\": \"Kadam\",
\"email\": \"aditya@example.com\",
\"password\": \"Str0ngPa$$word\",
\"password_confirmation\": \"Str0ngPa$$word\",
\"contact\": \"0123092312312\",
\"cannotify\": \"true\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"password": "Str0ngPa$$word",
"password_confirmation": "Str0ngPa$$word",
"contact": "0123092312312",
"cannotify": "true"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/register',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'firstname' => 'Aditya',
'lastname' => 'Kadam',
'email' => 'aditya@example.com',
'password' => 'Str0ngPa$$word',
'password_confirmation' => 'Str0ngPa$$word',
'contact' => '0123092312312',
'cannotify' => 'true',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/register'
payload = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"password": "Str0ngPa$$word",
"password_confirmation": "Str0ngPa$$word",
"contact": "0123092312312",
"cannotify": "true"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/register";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"password": "Str0ngPa$$word",
"password_confirmation": "Str0ngPa$$word",
"contact": "0123092312312",
"cannotify": "true"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/register';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"password": "Str0ngPa$$word",
"password_confirmation": "Str0ngPa$$word",
"contact": "0123092312312",
"cannotify": "true"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "0123092312312",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Takes in email and password. On success returns the user details.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"email\": \"aditya@example.com\",
\"password\": \"Str0ngPa$$word\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"email": "aditya@example.com",
"password": "Str0ngPa$$word"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'email' => 'aditya@example.com',
'password' => 'Str0ngPa$$word',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/login'
payload = {
"email": "aditya@example.com",
"password": "Str0ngPa$$word"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/login";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"email": "aditya@example.com",
"password": "Str0ngPa$$word"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/login';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"email": "aditya@example.com",
"password": "Str0ngPa$$word"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "0123092312312",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Need to pass the uid of the person after the email is verified. Make sure that the email verification complete process has to be carried out by you. After making the request this api will simply set the timestamp of the request in the email_verified field
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/markemailverified" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"uid\": \"73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/markemailverified"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/markemailverified',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'uid' => '73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/markemailverified'
payload = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/markemailverified";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/markemailverified';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "0123092312312",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Need to pass in the uid of the user, and the new_password with confirmation. This API assumes that you have validated the password reset request of the user either by sending password reset link to their email or via some other secure method. Password should be a plain text. It will be hashed before storing.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/customer/changepassword" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"uid\": \"73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a\",
\"new_password\": \"NewStr0ngestPa$$word\",
\"new_password_confirmation\": \"NewStr0ngestPa$$word\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/customer/changepassword"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"new_password": "NewStr0ngestPa$$word",
"new_password_confirmation": "NewStr0ngestPa$$word"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/customer/changepassword',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'uid' => '73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a',
'new_password' => 'NewStr0ngestPa$$word',
'new_password_confirmation' => 'NewStr0ngestPa$$word',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/customer/changepassword'
payload = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"new_password": "NewStr0ngestPa$$word",
"new_password_confirmation": "NewStr0ngestPa$$word"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/customer/changepassword";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"new_password": "NewStr0ngestPa$$word",
"new_password_confirmation": "NewStr0ngestPa$$word"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/customer/changepassword';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"new_password": "NewStr0ngestPa$$word",
"new_password_confirmation": "NewStr0ngestPa$$word"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "1310003912322",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Updates details of the customers. Only provided fields will be updated rest will be kept as it is.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/customer/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"firstname\": \"Aditya\",
\"lastname\": \"Kadam\",
\"email\": \"aditya@example.com\",
\"uid\": \"73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a\",
\"contact\": \"1310003912322\",
\"notifyme\": true
}"
const url = new URL(
"https://garchi.co.uk/api/v2/customer/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"contact": "1310003912322",
"notifyme": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/customer/update',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'firstname' => 'Aditya',
'lastname' => 'Kadam',
'email' => 'aditya@example.com',
'uid' => '73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a',
'contact' => '1310003912322',
'notifyme' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/customer/update'
payload = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"contact": "1310003912322",
"notifyme": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/customer/update";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"contact": "1310003912322",
"notifyme": true
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/customer/update';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"contact": "1310003912322",
"notifyme": true
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "1310003912322",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Returns the list of registered customers. You can pass the filter like email to get the single customer details.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/customers?email=aditya%40example.com&size=50" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/customers"
);
const params = {
"email": "aditya@example.com",
"size": "50",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/customers',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'email'=> 'aditya@example.com',
'size'=> '50',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/customers'
params = {
'email': 'aditya@example.com',
'size': '50',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/customers";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"email": "aditya@example.com",
"size": "50",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/customers';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'email': 'aditya@example.com',
'size': '50',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "07948048596",
"uid": "de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8",
"email_verified": "2021-04-18 20:27:35"
},
],
"links": {
"first": "https://garchi.co.uk/api/v2/customers?page=1",
"last": "https://garchi.co.uk/api/v2/customers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/customers?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/customers",
"per_page": 50,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/customer/73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"firstname": "Aditya",
"lastname": "Kadam",
"email": "aditya@example.com",
"contact": "0123092312312",
"uid": "uid string",
"email_verified": null
}
}
Received response:
Request failed with error:
Creates new order for a customer. Make sure to call this api after successful payment transaction.You need to handle payment from your side. You can pass the payment_id and the payment_method (eg: stripe) as a part of request body for transaction records.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/order/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"cart_items\": [
{
\"item_id\": 2,
\"item_name\": \"Web Dev Book\",
\"quantity\": 2,
\"delivery_date\": \"2022-12-12\",
\"attributes\": [
{
\"attribute_name\": \"Date\",
\"selected_options\": [
{
\"subattr\": \"21st March\",
\"price\": 1,
\"subattr_id\": 3
}
]
}
]
}
],
\"shipping_amount\": 5,
\"sub_total_amount\": 80,
\"tax_amount\": 10,
\"customer_uid\": \"73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a\",
\"coupon_code\": \"AK123\",
\"coupon_id\": 2,
\"discount_value\": 12,
\"guest_name\": \"keep_blank_if_using_login_api_else_provide_user_full_name\",
\"guest_email\": \"keep_blank_if_using_login_api_else_provide_user_email\",
\"guest_contact\": \"keep_blank_if_using_login_api_else_provide_user_contact\",
\"delivery_address\": \"Street 1, XYZ Road, London, LLL 111\",
\"payment_id\": \"pi_1IglpAJBBrYOr00bW4tJ312\",
\"payment_provider\": \"stripe\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/order/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"cart_items": [
{
"item_id": 2,
"item_name": "Web Dev Book",
"quantity": 2,
"delivery_date": "2022-12-12",
"attributes": [
{
"attribute_name": "Date",
"selected_options": [
{
"subattr": "21st March",
"price": 1,
"subattr_id": 3
}
]
}
]
}
],
"shipping_amount": 5,
"sub_total_amount": 80,
"tax_amount": 10,
"customer_uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"coupon_code": "AK123",
"coupon_id": 2,
"discount_value": 12,
"guest_name": "keep_blank_if_using_login_api_else_provide_user_full_name",
"guest_email": "keep_blank_if_using_login_api_else_provide_user_email",
"guest_contact": "keep_blank_if_using_login_api_else_provide_user_contact",
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"payment_provider": "stripe"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/order/create',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'cart_items' => [
[
'item_id' => 2,
'item_name' => 'Web Dev Book',
'quantity' => 2,
'delivery_date' => '2022-12-12',
'attributes' => [
[
'attribute_name' => 'Date',
'selected_options' => [
[
'subattr' => '21st March',
'price' => 1.0,
'subattr_id' => 3,
],
],
],
],
],
],
'shipping_amount' => 5.0,
'sub_total_amount' => 80.0,
'tax_amount' => 10.0,
'customer_uid' => '73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a',
'coupon_code' => 'AK123',
'coupon_id' => 2,
'discount_value' => 12.0,
'guest_name' => 'keep_blank_if_using_login_api_else_provide_user_full_name',
'guest_email' => 'keep_blank_if_using_login_api_else_provide_user_email',
'guest_contact' => 'keep_blank_if_using_login_api_else_provide_user_contact',
'delivery_address' => 'Street 1, XYZ Road, London, LLL 111',
'payment_id' => 'pi_1IglpAJBBrYOr00bW4tJ312',
'payment_provider' => 'stripe',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/order/create'
payload = {
"cart_items": [
{
"item_id": 2,
"item_name": "Web Dev Book",
"quantity": 2,
"delivery_date": "2022-12-12",
"attributes": [
{
"attribute_name": "Date",
"selected_options": [
{
"subattr": "21st March",
"price": 1,
"subattr_id": 3
}
]
}
]
}
],
"shipping_amount": 5,
"sub_total_amount": 80,
"tax_amount": 10,
"customer_uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"coupon_code": "AK123",
"coupon_id": 2,
"discount_value": 12,
"guest_name": "keep_blank_if_using_login_api_else_provide_user_full_name",
"guest_email": "keep_blank_if_using_login_api_else_provide_user_email",
"guest_contact": "keep_blank_if_using_login_api_else_provide_user_contact",
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"payment_provider": "stripe"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/order/create";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"cart_items": [
{
"item_id": 2,
"item_name": "Web Dev Book",
"quantity": 2,
"delivery_date": "2022-12-12",
"attributes": [
{
"attribute_name": "Date",
"selected_options": [
{
"subattr": "21st March",
"price": 1,
"subattr_id": 3
}
]
}
]
}
],
"shipping_amount": 5,
"sub_total_amount": 80,
"tax_amount": 10,
"customer_uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"coupon_code": "AK123",
"coupon_id": 2,
"discount_value": 12,
"guest_name": "keep_blank_if_using_login_api_else_provide_user_full_name",
"guest_email": "keep_blank_if_using_login_api_else_provide_user_email",
"guest_contact": "keep_blank_if_using_login_api_else_provide_user_contact",
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"payment_provider": "stripe"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/order/create';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"cart_items": [
{
"item_id": 2,
"item_name": "Web Dev Book",
"quantity": 2,
"delivery_date": "2022-12-12",
"attributes": [
{
"attribute_name": "Date",
"selected_options": [
{
"subattr": "21st March",
"price": 1,
"subattr_id": 3
}
]
}
]
}
],
"shipping_amount": 5,
"sub_total_amount": 80,
"tax_amount": 10,
"customer_uid": "73110a91-385c-453a-96b4-a482ff7e1e3b2b2a3289-47be-438a-a102-b07314d619516927b77d-e70a-40d9-8df8-2230621c53d5a5ca4a10-8917-430d-a",
"coupon_code": "AK123",
"coupon_id": 2,
"discount_value": 12,
"guest_name": "keep_blank_if_using_login_api_else_provide_user_full_name",
"guest_email": "keep_blank_if_using_login_api_else_provide_user_email",
"guest_contact": "keep_blank_if_using_login_api_else_provide_user_contact",
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"payment_provider": "stripe"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 595
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Changes an ordered item status to refunded.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/order/markasrefunded" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"line_item_id\": 30,
\"invoice_number\": \"bd402d30-9810-43b3-8c98-3f1c0208c098\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/order/markasrefunded"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/order/markasrefunded',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'line_item_id' => 30,
'invoice_number' => 'bd402d30-9810-43b3-8c98-3f1c0208c098',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/order/markasrefunded'
payload = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/order/markasrefunded";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/order/markasrefunded';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"message": "Item order was marked as refunded"
}
Received response:
Request failed with error:
Changes an ordered item status to cancelled.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/order/markascancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"line_item_id\": 30,
\"invoice_number\": \"bd402d30-9810-43b3-8c98-3f1c0208c098\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/order/markascancel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/order/markascancel',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'line_item_id' => 30,
'invoice_number' => 'bd402d30-9810-43b3-8c98-3f1c0208c098',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/order/markascancel'
payload = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/order/markascancel";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/order/markascancel';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"line_item_id": 30,
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"message": "Item order cancelled"
}
Received response:
Request failed with error:
Marks the entire order status and the line items order status as cancelled.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/orders/markascancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"invoice_number\": \"bd402d30-9810-43b3-8c98-3f1c0208c098\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/orders/markascancel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/orders/markascancel',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'invoice_number' => 'bd402d30-9810-43b3-8c98-3f1c0208c098',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/orders/markascancel'
payload = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/orders/markascancel";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/orders/markascancel';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
message: The order with bd402d30-9810-43b3-8c98-3f1c0208c098 was cancelled successfully
}
Received response:
Request failed with error:
This is api is used to change status of the entire order/all the ordered items status to refunded
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/orders/markasrefund" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"invoice_number\": \"bd402d30-9810-43b3-8c98-3f1c0208c098\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/orders/markasrefund"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/orders/markasrefund',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'invoice_number' => 'bd402d30-9810-43b3-8c98-3f1c0208c098',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/orders/markasrefund'
payload = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/orders/markasrefund";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/orders/markasrefund';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"invoice_number": "bd402d30-9810-43b3-8c98-3f1c0208c098"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
message: The complete order with bd402d30-9810-43b3-8c98-3f1c0208c098 was marked as refunded successfully
}
Received response:
Request failed with error:
This api lists all the orders for a customer that you registered/created using third party resources like Firebase Auth, etc. If you are using register api then see this section
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/orders/guest" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"guest_email\": \"schroeder.art@example.net\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/orders/guest"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"guest_email": "schroeder.art@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/orders/guest',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'guest_email' => 'schroeder.art@example.net',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/orders/guest'
payload = {
"guest_email": "schroeder.art@example.net"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/orders/guest";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"guest_email": "schroeder.art@example.net"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/orders/guest';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"guest_email": "schroeder.art@example.net"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"invoice": "64ba7caf-e18d-40f8-b7bd-3ea291501618",
"sub_total_amount": 80,
"tax_amount": null,
"shipping_amount": 5,
"payment_transaction": {
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"refunded": false,
"payment_provider": "stripe",
"created_at": "2022-04-16T11:19:25.000000Z",
"last_updated": "2022-04-16T11:19:25.000000Z"
},
"line_items": [
{
"line_item_id": 38,
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"quantity": 2,
"options": null,
"price": 0,
"delivery_dt": "2022-12-12",
"status": "placed",
"placed_at": "2022-04-16T11:19:25.000000Z",
"items": {
"item_id": 15,
"sku": "SKU123123123",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS",
"name": "Web app with Vue 3 and Tailwind CSS",
"price": 40,
"space": {
"name": "Space 1"
}
}
},
]
}
]
}
Received response:
Request failed with error:
If you are not using login api for authenticating the user or if you are using third party authentication like Firebase or if you are handling the authentication by yourself then this api might be handy to keep the user record updated.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/orders/guest/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"guest_email\": \"aditya@example.com\",
\"guest_contact\": \"111111111\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/orders/guest/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"guest_email": "aditya@example.com",
"guest_contact": "111111111"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/orders/guest/update',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'guest_email' => 'aditya@example.com',
'guest_contact' => '111111111',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/orders/guest/update'
payload = {
"guest_email": "aditya@example.com",
"guest_contact": "111111111"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/orders/guest/update";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"guest_email": "aditya@example.com",
"guest_contact": "111111111"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/orders/guest/update';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"guest_email": "aditya@example.com",
"guest_contact": "111111111"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"message": "Details updated successfully"
}
Received response:
Request failed with error:
List order details for a registered customer. This API works for customers registered using Register API.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/orders/de3523f0-9661-4d94-b0d7-04b4a31c06663cb128d0-296d-430b-adfa-badeee6a51935971fc62-2425-4e40-a425-c46008d4f16f3d494fca-46d9-4be6-8';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"invoice": "64ba7caf-e18d-40f8-b7bd-3ea291501618",
"sub_total_amount": 80,
"tax_amount": null,
"shipping_amount": 5,
"payment_transaction": {
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"refunded": false,
"payment_provider": "stripe",
"created_at": "2022-04-16T11:19:25.000000Z",
"last_updated": "2022-04-16T11:19:25.000000Z"
},
"line_items": [
{
"line_item_id": 38,
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"quantity": 2,
"options": null,
"price": 0,
"delivery_dt": "2022-12-12",
"status": "placed",
"placed_at": "2022-04-16T11:19:25.000000Z",
"items": {
"item_id": 15,
"sku": "SKU123123123",
"external_link": "",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS",
"name": "Web app with Vue 3 and Tailwind CSS",
"price": 40,
"space": {
"name": "Space 1"
}
}
},
{
"line_item_id": 39,
"delivery_address": "Street 1, XYZ Road, London, LLL 111",
"quantity": 2,
"options": null,
"price": 0,
"delivery_dt": "2022-12-12",
"status": "placed",
"placed_at": "2022-04-16T11:19:25.000000Z",
"items": {
"item_id": 16,
"external_link": "",
"sku": null,
"slug": null,
"name": "Designing with Canva ",
"price": 15.99,
"space": {
"name": "Space 2"
}
}
}
]
}
]
}
Received response:
Request failed with error:
Provides the details of the invoice including the information of the line items ordered
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/order/bd402d30-9810-43b3-8c98-3f1c0208c098';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"invoice": "bd402d30-9810-43b3-8c98-3f1c0208c098",
"total_amount": 80,
"payment_transaction": {
"payment_id": "pi_1IglpAJBBrYOr00bW4tJ312",
"refunded": "entire",
"payment_provider": "stripe",
"created_at": "2022-02-18T01:30:26.000000Z",
"last_updated": "2022-02-22T18:28:38.000000Z"
},
"line_items": [
{
"line_item_id": 30,
"quantity": 2,
"options": null,
"price": 80,
"delivery_dt": "2022-12-12",
"status": "refunded",
"placed_at": "2022-02-18T01:30:26.000000Z",
"items": {
"item_id": 15,
"external_link": "",
"name": "Web app with Vue 3 and Tailwind CSS",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS",
"space": {
"name": "Space 1"
}
}
}
]
}
]
}
Received response:
Request failed with error:
Creates a new cateogry for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/category" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"space_uid\": \"635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1\",
\"category\": \"facilis\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/category"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "facilis"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/category',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'space_uid' => '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
'category' => 'facilis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/category'
payload = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "facilis"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/category";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "facilis"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/category';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "facilis"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"id": 43,
"name": "Events"
}
}
Received response:
Request failed with error:
Deletes a category and all the associated items of that category for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/delete/category/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1/43';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Category deleted successfully"
}
Received response:
Request failed with error:
Update a cateogry for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/update/category/43" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"space_uid\": \"635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1\",
\"category\": \"consequatur\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/update/category/43"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/update/category/43',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'space_uid' => '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
'category' => 'consequatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/update/category/43'
payload = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "consequatur"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/update/category/43";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "consequatur"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/update/category/43';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"category": "consequatur"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Category updated successfully"
}
Received response:
Request failed with error:
Returns all the categories of the specified space.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/space/b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab/categories';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"id": 22,
"name": "Web Development Bootcamp"
},
{
"id": 23,
"name": "Programming"
},
{
"id": 36,
"name": "Mobile App Development"
}
]
Received response:
Request failed with error:
Returns all the categories for all the spaces.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/categories',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/categories'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/categories";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/categories';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"id": 22,
"name": "Web Development Bootcamp"
},
{
"id": 23,
"name": "Programming"
},
{
"id": 36,
"name": "Mobile App Development"
}
]
Received response:
Request failed with error:
Adds a new item for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/item" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"space_uid\": \"ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9\",
\"name\": \"\\\"item ABC\\\"\",
\"categories\": [
44,
45
],
\"sku\": \"SKU11111\",
\"stock\": 5,
\"price\": \"10\",
\"scratched_price\": 5,
\"detail_description\": \"This is an amazing <b>item<\\/b>\",
\"external_url\": \"https:\\/\\/productabc.com\",
\"slug\": \"item-abc\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/item"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"categories": [
44,
45
],
"sku": "SKU11111",
"stock": 5,
"price": "10",
"scratched_price": 5,
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/productabc.com",
"slug": "item-abc"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/item',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'space_uid' => 'ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9',
'name' => '"item ABC"',
'categories' => [
44,
45,
],
'sku' => 'SKU11111',
'stock' => 5,
'price' => '10',
'scratched_price' => 5.0,
'detail_description' => 'This is an amazing <b>item</b>',
'external_url' => 'https://productabc.com',
'slug' => 'item-abc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/item'
payload = {
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"categories": [
44,
45
],
"sku": "SKU11111",
"stock": 5,
"price": "10",
"scratched_price": 5,
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/productabc.com",
"slug": "item-abc"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/item";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"categories": [
44,
45
],
"sku": "SKU11111",
"stock": 5,
"price": "10",
"scratched_price": 5,
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/productabc.com",
"slug": "item-abc"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/item';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"categories": [
44,
45
],
"sku": "SKU11111",
"stock": 5,
"price": "10",
"scratched_price": 5,
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/productabc.com",
"slug": "item-abc"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"item_id": 50,
"sku": "SKU111111",
"external_link": null,
"slug": null,
"name": "Item ABC",
"stock": 5,
"price": 10,
"scratched_price": 5,
"one_liner": null,
"description": null,
"delivery_type": null,
"main_image": "NA",
"other_images": [],
"space": {
"uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "Shop XYZ"
},
"avg_rating": null
}
}
Received response:
Request failed with error:
Deletes an item and it's associated meta data and attributes for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/delete/item" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"item_id\": 50,
\"space_uid\": \"ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/delete/item"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/delete/item',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'item_id' => 50,
'space_uid' => 'ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/delete/item'
payload = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/delete/item";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/delete/item';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Item deleted successfully"
}
}
Received response:
Request failed with error:
Update a item for a space
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/update/item" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"item_id\": 50,
\"space_uid\": \"ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9\",
\"name\": \"\\\"item ABC\\\"\",
\"sku\": \"SKU11111\",
\"stock\": 5,
\"categories\": [
44
],
\"price\": 10,
\"scratched_price\": \"5\",
\"detail_description\": \"This is an amazing <b>item<\\/b>\",
\"external_url\": \"https:\\/\\/itemabc.com\",
\"make_public\": \"true\",
\"slug\": \"item-abc\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/update/item"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"sku": "SKU11111",
"stock": 5,
"categories": [
44
],
"price": 10,
"scratched_price": "5",
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/itemabc.com",
"make_public": "true",
"slug": "item-abc"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/update/item',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'item_id' => 50,
'space_uid' => 'ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9',
'name' => '"item ABC"',
'sku' => 'SKU11111',
'stock' => 5,
'categories' => [
44,
],
'price' => 10.0,
'scratched_price' => '5',
'detail_description' => 'This is an amazing <b>item</b>',
'external_url' => 'https://itemabc.com',
'make_public' => 'true',
'slug' => 'item-abc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/update/item'
payload = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"sku": "SKU11111",
"stock": 5,
"categories": [
44
],
"price": 10,
"scratched_price": "5",
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/itemabc.com",
"make_public": "true",
"slug": "item-abc"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/update/item";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"sku": "SKU11111",
"stock": 5,
"categories": [
44
],
"price": 10,
"scratched_price": "5",
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/itemabc.com",
"make_public": "true",
"slug": "item-abc"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/update/item';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"item_id": 50,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9",
"name": "\"item ABC\"",
"sku": "SKU11111",
"stock": 5,
"categories": [
44
],
"price": 10,
"scratched_price": "5",
"detail_description": "This is an amazing <b>item<\/b>",
"external_url": "https:\/\/itemabc.com",
"make_public": "true",
"slug": "item-abc"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Item updated successfully"
}
}
Received response:
Request failed with error:
This api allows you to add extra information or meta data for a item. The data is added as a key value pair
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/item_meta" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"meta\": [
{
\"key\": \"website\",
\"value\": \"https:\\/\\/adiranids.com\",
\"type\": \"url\"
}
],
\"item_id\": 51
}"
const url = new URL(
"https://garchi.co.uk/api/v2/item_meta"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"meta": [
{
"key": "website",
"value": "https:\/\/adiranids.com",
"type": "url"
}
],
"item_id": 51
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/item_meta',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[
'stdClass' => [
'key' => [
'website',
],
'value' => [
'https://adiranids.com',
],
'type' => [
'url',
],
],
],
[
'meta' => [
$o[0],
],
'item_id' => 51,
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/item_meta'
payload = {
"meta": [
{
"key": "website",
"value": "https:\/\/adiranids.com",
"type": "url"
}
],
"item_id": 51
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/item_meta";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"meta": [
{
"key": "website",
"value": "https:\/\/adiranids.com",
"type": "url"
}
],
"item_id": 51
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/item_meta';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"meta": [
{
"key": "website",
"value": "https:\/\/adiranids.com",
"type": "url"
}
],
"item_id": 51
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"id": 606,
"key": "website",
"value": "https://adiranids.com",
"type": "url"
}
]
}
Received response:
Request failed with error:
This api allows you to delete extra information or meta data for a item. The data is added as a key value pair
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/delete/item_meta" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"meta_id\": 55,
\"item_id\": 51,
\"space_uid\": \"ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/delete/item_meta"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"meta_id": 55,
"item_id": 51,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/delete/item_meta',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'meta_id' => 55,
'item_id' => 51,
'space_uid' => 'ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/delete/item_meta'
payload = {
"meta_id": 55,
"item_id": 51,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/delete/item_meta";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"meta_id": 55,
"item_id": 51,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/delete/item_meta';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"meta_id": 55,
"item_id": 51,
"space_uid": "ca457162-6d04-4c3a-a3f6-2ab3e21b0fd00cca6914-5e72-4d54-b9db-fcf9"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Item meta deleted successfully"
}
Received response:
Request failed with error:
This api allows you to update extra information or meta data for a item. The data is added as a key value pair
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/update/item_meta" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"key\": \"website\",
\"type\": \"url\",
\"value\": \"https:\\/\\/adiranids.com\",
\"meta_id\": 55,
\"item_id\": 51
}"
const url = new URL(
"https://garchi.co.uk/api/v2/update/item_meta"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"key": "website",
"type": "url",
"value": "https:\/\/adiranids.com",
"meta_id": 55,
"item_id": 51
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/update/item_meta',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'key' => 'website',
'type' => 'url',
'value' => 'https://adiranids.com',
'meta_id' => 55,
'item_id' => 51,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/update/item_meta'
payload = {
"key": "website",
"type": "url",
"value": "https:\/\/adiranids.com",
"meta_id": 55,
"item_id": 51
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/update/item_meta";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"key": "website",
"type": "url",
"value": "https:\/\/adiranids.com",
"meta_id": 55,
"item_id": 51
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/update/item_meta';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"key": "website",
"type": "url",
"value": "https:\/\/adiranids.com",
"meta_id": 55,
"item_id": 51
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Item meta updated successfully"
}
Received response:
Request failed with error:
Returns list of all the items with pagination links for a particular space
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/space/facilis/items?size=8&order_key=price&order_by=desc&reactions=include&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/space/facilis/items"
);
const params = {
"size": "8",
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/space/facilis/items',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'size'=> '8',
'order_key'=> 'price',
'order_by'=> 'desc',
'reactions'=> 'include',
'description'=> 'exclude',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/space/facilis/items'
params = {
'size': '8',
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/space/facilis/items";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"size": "8",
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/space/facilis/items';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'size': '8',
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"item_id": 15,
"sku": "",
"name": "Web app with Vue 3 and Tailwind CSS",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS"
"price": 40,
"external_link": "",
"scratched_price": 0,
"one_liner": "A complete Vue.js course with front end web app development",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImg15png",
"other_images": [],
"attributes": [],
"scheduled_for": "2022-01-01 00:00",
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null
"created": "2021-12-01 00:00",
},
{
"item_id": 29,
"sku": "",
"external_link": "",
"name": "React native expo boot camp",
"slug": null,
"stock": 0,
"price": 75,
"scratched_price": 0,
"one_liner": "Learn react native expo from beginner to pro",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImgMain29png",
"other_images": [],
"attributes": [],
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null,
"item_meta": [
{
"key" : "website",
"value": "https://adiranids.com",
"type": "url"
}
]
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16"
},
],
"links": {
"first": "https://garchi.co.uk/api/v2/items?page=1",
"last": "https://garchi.co.uk/api/v2/items?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/items?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/items",
"per_page": 10,
"to": 3,
"total": 3
}
}
Received response:
Request failed with error:
Before you use this API make sure to create embeddings from your dashboard . This endpoint returns the list of items based on semantic search. The search is based on the description and name of the items. The response body is similar to list all items api .
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/items/semantic-search?q=web+app&threshold=0.5&reactions=include&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/items/semantic-search"
);
const params = {
"q": "web app",
"threshold": "0.5",
"reactions": "include",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/items/semantic-search',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'q'=> 'web app',
'threshold'=> '0.5',
'reactions'=> 'include',
'description'=> 'exclude',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items/semantic-search'
params = {
'q': 'web app',
'threshold': '0.5',
'reactions': 'include',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items/semantic-search";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"q": "web app",
"threshold": "0.5",
"reactions": "include",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items/semantic-search';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'q': 'web app',
'threshold': '0.5',
'reactions': 'include',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"item_id": 15,
"sku": "",
"name": "Web app with Vue 3 and Tailwind CSS",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS",
"price": 40,
"external_link": "",
"scratched_price": 0,
"one_liner": "A complete Vue.js course with front end web app development",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImg15png",
"other_images": [],
"attributes": [],
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null,
"scheduled_for": null,
"categories" : [
{
"id": 22,
"name": "Web Development Bootcamp"
}
],
"item_meta": [
{
"key" : "website",
"value": "https://adiranids.com",
"type": "url"
}
],
"reactions": [
{
"reaction_id": "9b08ce6c-350c-4f00-9858-37a866bd626f",
"reaction": "like",
"user_identifier": "aditya@example.com",
"created_at": "2024-01-07T09:54:12.000000Z",
"updated_at": "2024-01-07T09:54:12.000000Z"
}
],
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16"
"similarity": 0.8
},
{
"item_id": 29,
"sku": "",
"name": "React native expo boot camp",
"slug": null,
"stock": 0,
"price": 75,
"scratched_price": 0,
"one_liner": "Learn react native expo from beginner to pro",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImgMain29png",
"other_images": [],
"attributes": [],
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null,
"scheduled_for": null,
"item_meta": [
]
"categories" : [
{
"id": 23,
"name": "Mobile App Development Bootcamp"
}
],
"reactions": [],
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16",
"similarity": 0.6
}
],
"links": {
"first": "https://garchi.co.uk/api/v2/items?page=1",
"last": "https://garchi.co.uk/api/v2/items?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/items?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/items",
"per_page": 10,
"to": 3,
"total": 3
}
}
Received response:
Request failed with error:
This endpoint returns the list of featured items that you set from your dashboard. The response body is similar to list all items api .
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/items/featured?reactions=include&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/items/featured"
);
const params = {
"reactions": "include",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/items/featured',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'reactions'=> 'include',
'description'=> 'exclude',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items/featured'
params = {
'reactions': 'include',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items/featured";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"reactions": "include",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items/featured';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'reactions': 'include',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 599
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Returns details of a single item based on the item_id or slug passed.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/item/3?reactions=include" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/item/3"
);
const params = {
"reactions": "include",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/item/3',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'reactions'=> 'include',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/item/3'
params = {
'reactions': 'include',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/item/3";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"reactions": "include",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/item/3';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'reactions': 'include',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"item_id": 26,
"sku": "",
"name": "Webdev courses in depth",
"stock": 100,
"categories" : [
{
"id": 22,
"name": "Web Development Bootcamp"
}
]
"price": 40,
"external_link": "",
"scratched_price": null,
"one_liner": "Best book for begineer",
"description": "<p><strong>This book is fantastic</strong></p>\n<ol>\n<li>This</li>\n<li>Book</li>\n<li>is</li>\n<li>Fantastic</li>\n</ol>",
"delivery_type": "can_deliver",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImgMainpng",
"other_images": [
"https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImg1png",
"https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImg2png"
],
"attributes": [
{
"id": 16,
"name": "Book Cover",
"min": "1",
"options": [
{
"id": 29,
"name": "Paper",
"price": 0.5
},
{
"id": 30,
"name": "Binded",
"price": 1
}
]
}
],
"space": {
"uid": "b5f0d08a-7600-4b9e-81e9-1ffaf5ddb8d2cf268eeb-000a-4bfd-bba6-09ab",
"name": "Web Course Books"
},
"avg_rating": null,
"scheduled_for": null,
"item_meta": [
{
"key" : "website",
"value": "https://adiranids.com",
"type": "url"
}
],
"reactions": [
{
"reaction_id": "9b08ce6c-350c-4f00-9858-37a866bd626f",
"reaction": "like",
"user_identifier": "aditya@example.com",
"created_at": "2024-01-07T09:54:12.000000Z",
"updated_at": "2024-01-07T09:54:12.000000Z"
}
],
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16"
}
]
}
Received response:
Request failed with error:
Returns list of all the items with pagination links. You can also use this api to search items by their name, slug, or category.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/items?size=10&search_keyword=Web+app+with&order_key=price&order_by=desc&reactions=include&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/items"
);
const params = {
"size": "10",
"search_keyword": "Web app with",
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/items',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'size'=> '10',
'search_keyword'=> 'Web app with',
'order_key'=> 'price',
'order_by'=> 'desc',
'reactions'=> 'include',
'description'=> 'exclude',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items'
params = {
'size': '10',
'search_keyword': 'Web app with',
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"size": "10",
"search_keyword": "Web app with",
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'size': '10',
'search_keyword': 'Web app with',
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"item_id": 15,
"sku": "",
"name": "Web app with Vue 3 and Tailwind CSS",
"slug": "Web-app-with-Vue-3-and-Tailwind-CSS",
"price": 40,
"external_link": "",
"scratched_price": 0,
"one_liner": "A complete Vue.js course with front end web app development",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImg15png",
"other_images": [],
"attributes": [],
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null,
"scheduled_for": null,
"categories" : [
{
"id": 22,
"name": "Web Development Bootcamp"
}
],
"item_meta": [
{
"key" : "website",
"value": "https://adiranids.com",
"type": "url"
}
],
"reactions": [
{
"reaction_id": "9b08ce6c-350c-4f00-9858-37a866bd626f",
"reaction": "like",
"user_identifier": "aditya@example.com",
"created_at": "2024-01-07T09:54:12.000000Z",
"updated_at": "2024-01-07T09:54:12.000000Z"
}
],
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16"
},
{
"item_id": 29,
"sku": "",
"name": "React native expo boot camp",
"slug": null,
"stock": 0,
"price": 75,
"scratched_price": 0,
"one_liner": "Learn react native expo from beginner to pro",
"delivery_type": "online",
"main_image": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/Products/ProductImgMain29png",
"other_images": [],
"attributes": [],
"space": {
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya"
},
"avg_rating": null,
"scheduled_for": null,
"item_meta": [
]
"categories" : [
{
"id": 23,
"name": "Mobile App Development Bootcamp"
}
],
"reactions": [],
"created": "2022-11-06 20:52:39",
"updated": "2023-07-08 15:09:16"
}
],
"links": {
"first": "https://garchi.co.uk/api/v2/items?page=1",
"last": "https://garchi.co.uk/api/v2/items?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/items?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/items",
"per_page": 10,
"to": 3,
"total": 3
}
}
Received response:
Request failed with error:
Based on the filters passed, does logically and of all filters and returns the list of items with pagination. The response body is similar to list all items api . The accepted filters are spaces, categories and priceOrder. If any of these filter is null or blank or empty then it will be ignored.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/items/filter?reactions=include&order_key=price&order_by=desc&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"spaces\": \"[\'2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1\']\",
\"categories\": \"[23,4,1]\",
\"priceOrder\": \"\\\"low-high\\\"\",
\"size\": \"10\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/items/filter"
);
const params = {
"reactions": "include",
"order_key": "price",
"order_by": "desc",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"spaces": "['2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1']",
"categories": "[23,4,1]",
"priceOrder": "\"low-high\"",
"size": "10"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/items/filter',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'reactions'=> 'include',
'order_key'=> 'price',
'order_by'=> 'desc',
'description'=> 'exclude',
],
'json' => [
'spaces' => '[\'2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1\']',
'categories' => '[23,4,1]',
'priceOrder' => '"low-high"',
'size' => '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items/filter'
payload = {
"spaces": "['2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1']",
"categories": "[23,4,1]",
"priceOrder": "\"low-high\"",
"size": "10"
}
params = {
'reactions': 'include',
'order_key': 'price',
'order_by': 'desc',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items/filter";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"spaces": "['2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1']",
"categories": "[23,4,1]",
"priceOrder": "\"low-high\"",
"size": "10"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
Map<Object, Object> params = {
"reactions": "include",
"order_key": "price",
"order_by": "desc",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items/filter';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"spaces": "['2z5088d1-8772-2912-ab9w-cbdd8bcd806fb6138bbf-296e-94b4-9cf1-03x1']",
"categories": "[23,4,1]",
"priceOrder": "\"low-high\"",
"size": "10"
};
$client->withBody($body);
$queryParams = {
'reactions': 'include',
'order_key': 'price',
'order_by': 'desc',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 598
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Based on the filters passed for the meta data (Extra details added for an item) and the operation specified, filters the items. Does logical and of the filters. The response body is similar to list all items api .
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/items/filter/bymeta?order_key=price&order_by=desc&reactions=include" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"meta_filters\": [
{
\"key\": \"date\",
\"value\": \"[\'2021-11-21\', \'2020-12-12\']\",
\"operator\": \"in\"
}
]
}"
const url = new URL(
"https://garchi.co.uk/api/v2/items/filter/bymeta"
);
const params = {
"order_key": "price",
"order_by": "desc",
"reactions": "include",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"meta_filters": [
{
"key": "date",
"value": "['2021-11-21', '2020-12-12']",
"operator": "in"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/items/filter/bymeta',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'order_key'=> 'price',
'order_by'=> 'desc',
'reactions'=> 'include',
],
'json' => [
'meta_filters' => [
[
'key' => 'date',
'value' => '[\'2021-11-21\', \'2020-12-12\']',
'operator' => 'in',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items/filter/bymeta'
payload = {
"meta_filters": [
{
"key": "date",
"value": "['2021-11-21', '2020-12-12']",
"operator": "in"
}
]
}
params = {
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items/filter/bymeta";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"meta_filters": [
{
"key": "date",
"value": "['2021-11-21', '2020-12-12']",
"operator": "in"
}
]
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
Map<Object, Object> params = {
"order_key": "price",
"order_by": "desc",
"reactions": "include",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items/filter/bymeta';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"meta_filters": [
{
"key": "date",
"value": "['2021-11-21', '2020-12-12']",
"operator": "in"
}
]
};
$client->withBody($body);
$queryParams = {
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
};
$url .= '?'. $queryParams;
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 597
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
This endpoint returns list of items based on items_ids given. It could be use to list specific list of items on landing page. The response body is similar to list all items api .
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/items/byids?order_key=price&order_by=desc&reactions=include&description=exclude" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"item_ids\": [
15,
29
]
}"
const url = new URL(
"https://garchi.co.uk/api/v2/items/byids"
);
const params = {
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"item_ids": [
15,
29
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/items/byids',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'order_key'=> 'price',
'order_by'=> 'desc',
'reactions'=> 'include',
'description'=> 'exclude',
],
'json' => [
'item_ids' => [
15,
29,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/items/byids'
payload = {
"item_ids": [
15,
29
]
}
params = {
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/items/byids";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"item_ids": [
15,
29
]
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
Map<Object, Object> params = {
"order_key": "price",
"order_by": "desc",
"reactions": "include",
"description": "exclude",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/items/byids';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"item_ids": [
15,
29
]
};
$client->withBody($body);
$queryParams = {
'order_key': 'price',
'order_by': 'desc',
'reactions': 'include',
'description': 'exclude',
};
$url .= '?'. $queryParams;
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 596
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/reviews/item" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"item_id\": 4,
\"rating\": 4,
\"review_body\": \"This is a best selling item.\",
\"user_email\": \"aditya@example.com\",
\"user_name\": \"Aditya\",
\"parent_id\": 4
}"
const url = new URL(
"https://garchi.co.uk/api/v2/reviews/item"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"item_id": 4,
"rating": 4,
"review_body": "This is a best selling item.",
"user_email": "aditya@example.com",
"user_name": "Aditya",
"parent_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/reviews/item',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'item_id' => 4,
'rating' => 4,
'review_body' => 'This is a best selling item.',
'user_email' => 'aditya@example.com',
'user_name' => 'Aditya',
'parent_id' => 4,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/reviews/item'
payload = {
"item_id": 4,
"rating": 4,
"review_body": "This is a best selling item.",
"user_email": "aditya@example.com",
"user_name": "Aditya",
"parent_id": 4
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/reviews/item";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"item_id": 4,
"rating": 4,
"review_body": "This is a best selling item.",
"user_email": "aditya@example.com",
"user_name": "Aditya",
"parent_id": 4
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/reviews/item';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"item_id": 4,
"rating": 4,
"review_body": "This is a best selling item.",
"user_email": "aditya@example.com",
"user_name": "Aditya",
"parent_id": 4
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"review_id": 15,
"review_body": "This is a best selling item",
"rating": 4,
"user": {
"name": "Aditya",
"email": "aditya@example.com"
},
"item_id": 15,
}
}
Received response:
Request failed with error:
Edits a review. Only provided fields will be updated rest will be ignored.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/reviews/edit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"review_id\": 4,
\"review_body\": \"This is an amazing seller.\",
\"rating\": 4
}"
const url = new URL(
"https://garchi.co.uk/api/v2/reviews/edit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"review_id": 4,
"review_body": "This is an amazing seller.",
"rating": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/reviews/edit',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'review_id' => 4,
'review_body' => 'This is an amazing seller.',
'rating' => 4,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/reviews/edit'
payload = {
"review_id": 4,
"review_body": "This is an amazing seller.",
"rating": 4
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/reviews/edit";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"review_id": 4,
"review_body": "This is an amazing seller.",
"rating": 4
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/reviews/edit';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"review_id": 4,
"review_body": "This is an amazing seller.",
"rating": 4
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"message": "1 reviews updated"
}
Received response:
Request failed with error:
Permenantly deletes a specific review.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/reviews/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"review_id\": 3
}"
const url = new URL(
"https://garchi.co.uk/api/v2/reviews/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"review_id": 3
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/reviews/delete',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'review_id' => 3,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/reviews/delete'
payload = {
"review_id": 3
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/reviews/delete";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"review_id": 3
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/reviews/delete';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"review_id": 3
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"message": "1 reviews deleted"
}
Received response:
Request failed with error:
Returns the reviews for an item
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/reviews/item/15?size=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/reviews/item/15"
);
const params = {
"size": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/reviews/item/15',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'size'=> '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/reviews/item/15'
params = {
'size': '10',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/reviews/item/15";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"size": "10",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/reviews/item/15';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'size': '10',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"review_id": 15,
"review_body": "This is a best selling item",
"rating": 4,
"guest": null,
"user": {
"fname": "Adi",
"lname": "Kadam"
},
"item_id": 15,
"reviewed_at": "2022-02-23T23:00:45.000000Z",
"replies": []
"reactions": [],
}
],
"links": {
"first": "https://garchi.co.uk/api/v2/reviews/seller/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1?page=1",
"last": "https://garchi.co.uk/api/v2/reviews/seller/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/reviews/seller/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/reviews/seller/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"per_page": "10",
"to": 3,
"total": 3
}
}
Received response:
Request failed with error:
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/spaces?size=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/spaces"
);
const params = {
"size": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/spaces',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'size'=> '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/spaces'
params = {
'size': '10',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/spaces";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"size": "10",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/spaces';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'size': '10',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": [
{
"uid": "3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1",
"name": "Aditya Kadam",
"logo_url": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/SellersLogo/SellerLogo97T-1633021175.jpg",
"number_of_items": 3,
},
],
"links": {
"first": "https://garchi.co.uk/api/v2/spaces?page=1",
"last": "https://garchi.co.uk/api/v2/spaces?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://garchi.co.uk/api/v2/spaces?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://garchi.co.uk/api/v2/spaces",
"per_page": 10,
"to": 3,
"total": 3
}
}
Received response:
Request failed with error:
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/space/3d5f84d6-8914-4061-b9be-cbdd8bcd806fb6138bbf-296e-44b4-9cf1-03b1';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"data": {
"uid": "52690642-cc29-4c4d-a9dc-752d4036869e9b64f419-c900-49a8-9109-208a",
"name": null,
"logo_url": "https://garchi.s3.eu-west-2.amazonaws.com/whitelabel_assets/SellersLogo/SellerLogo191.svg",
"number_of_items": 24,
"average_rating": null,
}
}
Received response:
Request failed with error:
Creates a new space.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/space" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--form "name="Aditya Kadam"" \
--form "logo=@/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpui7uXo"
const url = new URL(
"https://garchi.co.uk/api/v2/space"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
const body = new FormData();
body.append('name', '"Aditya Kadam"');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/space',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'multipart' => [
[
'name' => 'name',
'contents' => '"Aditya Kadam"'
],
[
'name' => 'logo',
'contents' => fopen('/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpui7uXo', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/space'
files = {
'logo': open('/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpui7uXo', 'rb')
}
payload = {
"name": "\"Aditya Kadam\""
}
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/space";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Path> files = new HashMap<>();
files.put("logo", Path.of("/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpui7uXo"));
builder.POST(HttpRequest.BodyPublishers.ofByteArray(files));
String body = {
"name": "\"Aditya Kadam\""
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "multipart/form-data");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/space';
$headers = [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"name": "\"Aditya Kadam\""
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
"data": {
"uid": "3cbec0da-0c9f-4cd3-99e3-0b962477816dededd79c-d150-45ec-93b6-859c2f52b234",
"name": "Aditya Kadam",
"logo_url": "NA",
"number_of_products": null,
}
Received response:
Request failed with error:
Deletes space record and associated records.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/delete/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Space details deleted successfully"
}
Received response:
Request failed with error:
Updates space details.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--form "name="Aditya Kadam"" \
--form "logo=@/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpj55BkB"
const url = new URL(
"https://garchi.co.uk/api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
const body = new FormData();
body.append('name', '"Aditya Kadam"');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'multipart' => [
[
'name' => 'name',
'contents' => '"Aditya Kadam"'
],
[
'name' => 'logo',
'contents' => fopen('/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpj55BkB', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1'
files = {
'logo': open('/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpj55BkB', 'rb')
}
payload = {
"name": "\"Aditya Kadam\""
}
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Path> files = new HashMap<>();
files.put("logo", Path.of("/private/var/folders/ls/1kl78ms907qfpl8147rw3bsr0000gn/T/phpj55BkB"));
builder.POST(HttpRequest.BodyPublishers.ofByteArray(files));
String body = {
"name": "\"Aditya Kadam\""
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "multipart/form-data");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/update/space/635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1';
$headers = [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"name": "\"Aditya Kadam\""
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"data": "Space details updated successfully"
}
Received response:
Request failed with error:
Compound query is useful when you want to fetch data using complex filters. It is advisable to use compound query only in limited cases as it involves querying using multiple conditions which can be slow.
You need to provide the dataset to query, the fields to query, the conditions for the fields, the values for the conditions and the logic whether to perform logical and/or of the conditions.
Field restriction varies based on the dataset.
Allowed fields for items [item_id, name, slug, description, categories, ratings, price, created]
Allowed fields for categories [category_id, category_name]
Allowed fields for reviews [review_id, item_id, rating, review, created]
You can have duplicate fields in the fields array.
The response schema depends on the dataset. Depending on the dataset the response schema will be as follows:
items: list all items api .
reviews: get reviews for a item api .
categories: get all categories api .
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/compound_query?order_key=created&order_by=desc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"dataset\": \"items\",
\"fields\": [
\"name\",
\"price\"
],
\"conditions\": [
\"eq\",
\"lte\"
],
\"values\": [
\"Apple\",
100
],
\"logic\": \"[\\\"and\\\"]\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/compound_query"
);
const params = {
"order_key": "created",
"order_by": "desc",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"dataset": "items",
"fields": [
"name",
"price"
],
"conditions": [
"eq",
"lte"
],
"values": [
"Apple",
100
],
"logic": "[\"and\"]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/compound_query',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'order_key'=> 'created',
'order_by'=> 'desc',
],
'json' => [
'dataset' => 'items',
'fields' => [
'name',
'price',
],
'conditions' => [
'eq',
'lte',
],
'values' => [
'Apple',
100,
],
'logic' => '["and"]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/compound_query'
payload = {
"dataset": "items",
"fields": [
"name",
"price"
],
"conditions": [
"eq",
"lte"
],
"values": [
"Apple",
100
],
"logic": "[\"and\"]"
}
params = {
'order_key': 'created',
'order_by': 'desc',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/compound_query";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"dataset": "items",
"fields": [
"name",
"price"
],
"conditions": [
"eq",
"lte"
],
"values": [
"Apple",
100
],
"logic": "[\"and\"]"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
Map<Object, Object> params = {
"order_key": "created",
"order_by": "desc",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/compound_query';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"dataset": "items",
"fields": [
"name",
"price"
],
"conditions": [
"eq",
"lte"
],
"values": [
"Apple",
100
],
"logic": "[\"and\"]"
};
$client->withBody($body);
$queryParams = {
'order_key': 'created',
'order_by': 'desc',
};
$url .= '?'. $queryParams;
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 593
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
This api is used to get the asset (media file) for a space based on the name of the asset.
Example request:
curl --request GET \
--get "https://garchi.co.uk/api/v2/space/assets/logo?space_uid=635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}"
const url = new URL(
"https://garchi.co.uk/api/v2/space/assets/logo"
);
const params = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://garchi.co.uk/api/v2/space/assets/logo',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'query' => [
'space_uid'=> '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/space/assets/logo'
params = {
'space_uid': '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/space/assets/logo";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
Map<Object, Object> params = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
};
builder.uri(URI.create(url + "?" + toQueryString(params)));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/space/assets/logo';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$queryParams = {
'space_uid': '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
};
$url .= '?'. $queryParams;
$response = $client->GET($url);
$responseBody = $response->json();
Example response (200):
{
"id": "06f3310d-d550-4ab2-b824-d47f65ad3b29",
"path": "https://garchi.s3.eu-west-2.amazonaws.com/headlessweb/62931923-b209-4e5c-9b91-57065cb443d279df607f-3026-45de-b684-5bee/myself2-1692799469.jpg",
"size": "157.08KB",
"type": "uploaded-image"
}
Received response:
Request failed with error:
This api is used to get a page by slug and space_uid.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/page" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"space_uid\": \"635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1\",
\"slug\": \"\\/\",
\"lang\": \"en-US\",
\"mode\": \"draft\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/page"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"slug": "\/",
"lang": "en-US",
"mode": "draft"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/page',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'space_uid' => '635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1',
'slug' => '/',
'lang' => 'en-US',
'mode' => 'draft',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/page'
payload = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"slug": "\/",
"lang": "en-US",
"mode": "draft"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/page";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"slug": "\/",
"lang": "en-US",
"mode": "draft"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/page';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"space_uid": "635c09ed-d55f-407d-a4c0-45f5ad9f2b44c2321f02-a835-4024-9b83-c4a1",
"slug": "\/",
"lang": "en-US",
"mode": "draft"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (200):
{
"id": "99bef509-c85a-4957-8340-8b4325421869",
"title": "Home",
"slug": "/",
"image": "http://garchi.s3.eu-west-2.amazonaws.com/headlesswebpages/c7ba17eb-4004-45ef-b5b3-1d557c5c85f4c34f4a69-3d08-444f-86e0-852b/some_file.png",
"description": "a great space to be",
"sections": [
{
"id": "99c21f3c-c434-4eb5-89ad-46e958a11081",
"name": "Card",
"description": "",
"props": {
"title": "This is great",
"description": "Thanks for telling this",
"image": "http://garchi.s3.eu-west-2.amazonaws.com/headlessweb/c7ba17eb-4004-45ef-b5b3-1d557c5c85f4c34f4a69-3d08-444f-86e0-852b/Header Image-1690661182",
"header": "http://garchi.s3.eu-west-2.amazonaws.com/headlessweb/c7ba17eb-4004-45ef-b5b3-1d557c5c85f4c34f4a69-3d08-444f-86e0-852b/Header Image-1690661182",
"data-garchi-section-id": "99c21f3c-c434-4eb5-89ad-46e958a11081",
"data-garchi-page-id": "99bef509-c85a-4957-8340-8b4325421869"
},
"children": [],
"order": 0
},
{
"id": "99c210e4-330d-458f-9af3-b5eea6af228d",
"name": "Navbar",
"description": "/components/Navbar",
"props": {
"title": "Home",
"link": "https://google.com",
"data-garchi-section-id": "99c210e4-330d-458f-9af3-b5eea6af228d",
"data-garchi-page-id": "99bef509-c85a-4957-8340-8b4325421869"
},
"children": [
{
"id": "99c3f4f6-7193-471e-a9c0-00ebca35811f",
"name": "Logo",
"description": "Main logo for the home page",
"props": {
"src": "http://garchi.s3.eu-west-2.amazonaws.com/headlessweb/c7ba17eb-4004-45ef-b5b3-1d557c5c85f4c34f4a69-3d08-444f-86e0-852b/Logo-1690661165",
"data-garchi-section-id": "99c3f4f6-7193-471e-a9c0-00ebca35811f",
"data-garchi-page-id": "99bef509-c85a-4957-8340-8b4325421869"
},
"children": [
{
"id": "99c4274d-941e-42ad-845c-8c34258c729e",
"name": "Navbar",
"description": "/components/Navbar",
"props": {
"title": "Logo",
"link": "/",
"data-garchi-section-id": "99c4274d-941e-42ad-845c-8c34258c729e",
"data-garchi-page-id": "99bef509-c85a-4957-8340-8b4325421869"
},
"children": [],
"order": 0
}
],
"order": 0
}
],
"order": 1
},
{
"id": "99c21ab9-e234-4a1a-a8af-324369332fc5",
"name": "Logo",
"description": "Main logo for the home page",
"props": {
"src": "http://garchi.s3.eu-west-2.amazonaws.com/headlessweb/c7ba17eb-4004-45ef-b5b3-1d557c5c85f4c34f4a69-3d08-444f-86e0-852b/Logo-1690661165",
"data-garchi-section-id": "99c21ab9-e234-4a1a-a8af-324369332fc5",
"data-garchi-page-id": "99bef509-c85a-4957-8340-8b4325421869"
},
"children": [],
"order": 2
}
]
}
Received response:
Request failed with error:
This api is used to create or update section templates for a space. Section templates are used to create reusable sections on a page.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/section_template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"space_uid\": \"5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e\",
\"section_templates\": [
{
\"name\": \"HeroSection\",
\"description\": \"This is a hero section.\",
\"prev_name\": null,
\"props\": [
{
\"key\": \"icon\",
\"type\": \"select\",
\"allowed_values\": \"CheckIcon,CheckCircleIcon\"
}
]
}
]
}"
const url = new URL(
"https://garchi.co.uk/api/v2/section_template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"space_uid": "5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e",
"section_templates": [
{
"name": "HeroSection",
"description": "This is a hero section.",
"prev_name": null,
"props": [
{
"key": "icon",
"type": "select",
"allowed_values": "CheckIcon,CheckCircleIcon"
}
]
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/section_template',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'space_uid' => '5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e',
'section_templates' => [
[
'name' => 'HeroSection',
'description' => 'This is a hero section.',
'prev_name' => null,
'props' => [
[
'key' => 'icon',
'type' => 'select',
'allowed_values' => 'CheckIcon,CheckCircleIcon',
],
],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/section_template'
payload = {
"space_uid": "5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e",
"section_templates": [
{
"name": "HeroSection",
"description": "This is a hero section.",
"prev_name": null,
"props": [
{
"key": "icon",
"type": "select",
"allowed_values": "CheckIcon,CheckCircleIcon"
}
]
}
]
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/section_template";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"space_uid": "5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e",
"section_templates": [
{
"name": "HeroSection",
"description": "This is a hero section.",
"prev_name": null,
"props": [
{
"key": "icon",
"type": "select",
"allowed_values": "CheckIcon,CheckCircleIcon"
}
]
}
]
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/section_template';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"space_uid": "5f0b3b2d-3b4e-4b6e-8b3e-3e3e3e3e3e3e",
"section_templates": [
{
"name": "HeroSection",
"description": "This is a hero section.",
"prev_name": null,
"props": [
{
"key": "icon",
"type": "select",
"allowed_values": "CheckIcon,CheckCircleIcon"
}
]
}
]
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 592
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Creates a reaction for review, item. If the reaction already exists it will be deleted and a new one will be added.
Example request:
curl --request POST \
"https://garchi.co.uk/api/v2/manage-reaction" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {Your_API_Key}" \
--data "{
\"reaction\": \"like\",
\"user_identifier\": \"aditya@example.com\",
\"review_id\": 4,
\"item_id\": 4,
\"reaction_for\": \"review\"
}"
const url = new URL(
"https://garchi.co.uk/api/v2/manage-reaction"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {Your_API_Key}",
};
let body = {
"reaction": "like",
"user_identifier": "aditya@example.com",
"review_id": 4,
"item_id": 4,
"reaction_for": "review"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://garchi.co.uk/api/v2/manage-reaction',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}',
],
'json' => [
'reaction' => 'like',
'user_identifier' => 'aditya@example.com',
'review_id' => 4,
'item_id' => 4,
'reaction_for' => 'review',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://garchi.co.uk/api/v2/manage-reaction'
payload = {
"reaction": "like",
"user_identifier": "aditya@example.com",
"review_id": 4,
"item_id": 4,
"reaction_for": "review"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {Your_API_Key}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
String baseUrl = "https://garchi.co.uk";
String endpointUri = "api/v2/manage-reaction";
URI url = URI.create(baseUrl + endpointUri);
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder(url);
String body = {
"reaction": "like",
"user_identifier": "aditya@example.com",
"review_id": 4,
"item_id": 4,
"reaction_for": "review"
};
builder.POST(HttpRequest.BodyPublishers.ofString(body));
builder.header("Content-Type", "application/json");
builder.header("Accept", "application/json");
builder.header("Authorization", "Bearer {Your_API_Key}");
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());
// Parse JSON response
JSONObject json = new JSONObject(response.body());
use Illuminate\Support\Facades\Http;
$url = 'https://garchi.co.uk/api/v2/manage-reaction';
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {Your_API_Key}'
]
$client = Http::withHeaders($headers);
$body = {
"reaction": "like",
"user_identifier": "aditya@example.com",
"review_id": 4,
"item_id": 4,
"reaction_for": "review"
};
$client->withBody($body);
$response = $client->POST($url);
$responseBody = $response->json();
Example response (401):
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 600
x-ratelimit-remaining: 594
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error: