Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Brands
APIs for managing brands.
Get brands.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/brands"
);
const params = {
"limit": "13",
"page": "6",
"orderDirection": "asc",
"orderBy": "name",
"searchTerm": "officiis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/brands',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '13',
'page' => '6',
'orderDirection' => 'asc',
'orderBy' => 'name',
'searchTerm' => 'officiis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
vary: Origin
{
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'order clause' (SQL: select * from `brands` order by `name` asc limit 15 offset 75)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 760,
"trace": [
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 720,
"function": "runQueryCallback",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 422,
"function": "run",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2706,
"function": "select",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2694,
"function": "runSelect",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 3230,
"function": "Illuminate\\Database\\Query\\{closure}",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2695,
"function": "onceWithColumns",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 710,
"function": "get",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 694,
"function": "getModels",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 899,
"function": "get",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/app/Http/Controllers/v1/BrandController.php",
"line": 44,
"function": "paginate",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "index",
"class": "App\\Http\\Controllers\\v1\\BrandController",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 43,
"function": "callAction",
"class": "Illuminate\\Routing\\Controller",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 260,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 205,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 798,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"line": 50,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 126,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 102,
"function": "handleRequest",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 54,
"function": "handleRequestUsingNamedLimiter",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php",
"line": 33,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Laravel\\Sanctum\\Http\\Middleware\\{closure}",
"class": "Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php",
"line": 34,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 799,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 776,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 740,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 729,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 190,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/app/Http/Middleware/SetLocale.php",
"line": 22,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "App\\Http\\Middleware\\SetLocale",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
"line": 31,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 86,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 62,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 165,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 134,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 299,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 287,
"function": "callLaravelOrLumenRoute",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 92,
"function": "makeApiCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 45,
"function": "makeResponseCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 35,
"function": "makeResponseCallIfConditionsPass",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 209,
"function": "__invoke",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 166,
"function": "iterateThroughStrategies",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 95,
"function": "fetchResponses",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 124,
"function": "processRoute",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 71,
"function": "extractEndpointsInfoFromLaravelApp",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 49,
"function": "extractEndpointsInfoAndWriteToDisk",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
"line": 51,
"function": "get",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 36,
"function": "handle",
"class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php",
"line": 41,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 93,
"function": "unwrapIfClosure",
"class": "Illuminate\\Container\\Util",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 37,
"function": "callBoundMethod",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 661,
"function": "call",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 183,
"function": "call",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Command/Command.php",
"line": 312,
"function": "execute",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 153,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 1022,
"function": "run",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 314,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 168,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php",
"line": 102,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
"line": 155,
"function": "run",
"class": "Illuminate\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/artisan",
"line": 37,
"function": "handle",
"class": "Illuminate\\Foundation\\Console\\Kernel",
"type": "->"
}
]
}
Received response:
Request failed with error:
Create a new brand.
requires authentication
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/brands"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'facilis');
body.append('description', 'Ducimus enim harum praesentium ut voluptatum harum atque.');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/v1/brands',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'facilis'
],
[
'name' => 'description',
'contents' => 'Ducimus enim harum praesentium ut voluptatum harum atque.'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpuARGpF', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Get a specified brand.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/brands/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/brands/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
vary: Origin
{
"data": {
"id": 1,
"name": "corporis",
"description": "Quas corporis voluptas dolor. Nihil et consequatur occaecati quam. Aut sit ipsam quae. In hic optio a. Sed non unde minus dolores quia vel quia. Impedit eligendi repudiandae aperiam ullam est.",
"created_at": "2023-02-08T20:25:40.000000Z",
"updated_at": "2023-02-08T20:25:40.000000Z",
"image": {
"type": "main",
"path": "storage/https://via.placeholder.com/640x480.png/008877?text=ipsa"
}
}
}
Received response:
Request failed with error:
Update the specified brand.
requires authentication
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/brands/1"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'lwfxwnhzgzm');
body.append('description', 'Blanditiis modi nemo itaque consequatur.');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.ostrapp.com/v1/brands/1',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'lwfxwnhzgzm'
],
[
'name' => 'description',
'contents' => 'Blanditiis modi nemo itaque consequatur.'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phptiHUsS', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Remove the specified brand.
requires authentication
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/brands/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.ostrapp.com/v1/brands/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Categories
APIs for managing categories.
Get categories.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/categories"
);
const params = {
"limit": "18",
"page": "10",
"orderDirection": "desc",
"orderBy": "id",
"searchTerm": "ea",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/categories',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '18',
'page' => '10',
'orderDirection' => 'desc',
'orderBy' => 'id',
'searchTerm' => 'ea',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
vary: Origin
{
"data": [],
"links": {
"first": "http://localhost/v1/categories?page=1",
"last": "http://localhost/v1/categories?page=1",
"prev": "http://localhost/v1/categories?page=9",
"next": null
},
"meta": {
"current_page": 10,
"from": null,
"last_page": 1,
"links": [
{
"url": "http://localhost/v1/categories?page=9",
"label": "« Previous",
"active": false
},
{
"url": "http://localhost/v1/categories?page=1",
"label": "1",
"active": false
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://localhost/v1/categories",
"per_page": 15,
"to": null,
"total": 15
}
}
Received response:
Request failed with error:
Store a newly created category.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/categories"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'wfqguaacrhlesrnfy');
body.append('description', 'Sed ipsam est quae et.');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/v1/categories',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'wfqguaacrhlesrnfy'
],
[
'name' => 'description',
'contents' => 'Sed ipsam est quae et.'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phprg612r', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Display the specified category.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/categories/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
vary: Origin
{
"data": {
"id": 1,
"name": "earum",
"description": "Necessitatibus eos tempora qui minima sit. Debitis iste et aspernatur voluptatem. Delectus ipsum pariatur mollitia animi consequatur aliquam. Dicta dolores dolore tenetur neque veniam.",
"created_at": "2023-02-08T20:25:40.000000Z",
"updated_at": "2023-02-08T20:25:40.000000Z",
"image": {
"type": "main",
"path": "storage/https://via.placeholder.com/640x480.png/0066ee?text=distinctio"
}
}
}
Received response:
Request failed with error:
Update the specified category.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/categories/1"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'hntk');
body.append('description', 'Nisi praesentium perferendis fugiat.');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.ostrapp.com/v1/categories/1',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'hntk'
],
[
'name' => 'description',
'contents' => 'Nisi praesentium perferendis fugiat.'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpXro7GP', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Remove the specified category.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.ostrapp.com/v1/categories/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Endpoints
Update the user's profile information.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/profile-information"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.ostrapp.com/user/profile-information',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Update the user's password.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.ostrapp.com/user/password',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Get the password confirmation status.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/confirmed-password-status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/user/confirmed-password-status',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IlhSMDdGSDRaNXlURlpMOE43aWdVNVE9PSIsInZhbHVlIjoiOEhyZ0N2c0ZpU091djMxSW1SMGVaR0JWV0VnUjE5ZHI0UUE3U0FRRlA1TWlJM0EyYzQvTVU0TWJqdnBHNk1ReGJSa1oyLzRrakNxS3pDa0MzT1RkeFpPUWgrUm8ycWNHSXpZTHpiMEZOdWVZN2V0aHpEOHJicGRpSVlUUmJFTDUiLCJtYWMiOiI5NjVhNGEzNDEzNmRlMTYyNDFjYWM5YWRlMzA4M2E2ZDUyNTU2YzY0YzYxOTdlYzgwOWU5NTg0ZGRhNjRkMzY3IiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:24 GMT; Max-Age=7200; path=/; domain=localhost; samesite=lax; ostrapp_session=eyJpdiI6ImMzYjFtRTE1WnFsSGxERkVscEgxS2c9PSIsInZhbHVlIjoiQVN5Z0tQSmU2SHUxWFNDRUorenFIT05OUVR3SDIvUnowMVhpU1VRUnJGdVJlVTR4ZnkrN21PTkUydXpDZkdTUEZONG1JeFQ3dm94M2pJdnlMai9yb0xUYUw0c0pYNEF1M0R4M0hMakttZkFHTndYdGRLZVkwUHlLTThkOWwxSDciLCJtYWMiOiIxMDY2ZWE5MGEzMTFhZDQxOGE1NTQwNTM3OTZlZGRlMzU2YTczNTNkMzg1YmExZWMyZTcwN2NhOWI4YWVlODRhIiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:24 GMT; Max-Age=7200; path=/; domain=localhost; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Confirm the user's password.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/confirm-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/user/confirm-password',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Attempt to authenticate a new session using the two factor authentication code.
Example request:
const url = new URL(
"https://api.ostrapp.com/two-factor-challenge"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "sunt",
"recovery_code": "quia"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/two-factor-challenge',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'code' => 'sunt',
'recovery_code' => 'quia',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Enable two factor authentication for the user.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-authentication"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/user/two-factor-authentication',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Enable two factor authentication for the user.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/confirmed-two-factor-authentication"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/user/confirmed-two-factor-authentication',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Disable two factor authentication for the user.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-authentication"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.ostrapp.com/user/two-factor-authentication',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Get the SVG element for the user's two factor authentication QR code.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-qr-code"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/user/two-factor-qr-code',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IjZ3QWljOEVPN2p4U09pNjExd3dPcUE9PSIsInZhbHVlIjoiTFpBVS9EaDBkeXphZG8rS1pPUHJQL01oa3plVDhheTBUc3FZbkhsN3YvUW9SUDNkUkdtdnkzQ2doSkRTdXp6L3I1WTFjNmdjZG1MckZ0aUxEYnd5alVOaGJiOEZJNzhhWmdUT2JWYnFHRXdFWVJVSDRqQnhLaThDU0UyTzVpYSsiLCJtYWMiOiI0OWQ1ZTUwOGJhMDdkNjhkYzY0ZGIwMjcwYzM3MjI4NDVmZDBlNzc1NGI0NGI2ZWIzNmZjODM1NDkzNTE1NmVkIiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:24 GMT; Max-Age=7200; path=/; domain=localhost; samesite=lax; ostrapp_session=eyJpdiI6Ing2elRNcG5naW5jeTloTmxBc2NqNlE9PSIsInZhbHVlIjoiTk55cGRBU3RyVmhBS1NWSEh0REJXL1ltS2NXbFJMVUxCek9NV2hLc3Y5cFh0OGlveTZXN3ZaalRSb2lURlFaODhhSk9Yb1V3VU82Vk84SWRsbG1FZkU5TjFzMjhZSDFrN3BHWkZxWHVlUU1GQjdGa0JkU2lreVZqRWdPYVliU2MiLCJtYWMiOiJkZDk5MjVkZTIzNTk3NTI3YjU4NzFhY2UwYWNlZDkxNzEyMmY2OTJjYTcxYzJlNjMwNWE5MzQzMGYzMjg3MWRkIiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:24 GMT; Max-Age=7200; path=/; domain=localhost; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Get the current user's two factor authentication setup / secret key.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-secret-key"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/user/two-factor-secret-key',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6ImVhMFI0aWFCL2ZacDBvUXo5RUdlQWc9PSIsInZhbHVlIjoiRDlnc0pDUlk2d2VTR2VYNDRmZDJvOHN6ODlnclZsbitnOU1zVFpWMlFMaXdTVlRHTTVISGN2OXhhNDg5ZkZ3M3U3eVUrL1RLNHF3OUFYdzRHK3J2a055TU9WK3NCK3Z4Zm5Yc1M4Nk9NNTRnK1JsOGxIWVJYMHFUSE85dXk3S0IiLCJtYWMiOiJlYmRmMTg2NzQxNDBkYTlmNGYwMjJlNjM2YTY4ZTNhMTAwOGI0OWVmNTVjZGZkOGJiODdmMzQxY2Q5YmMxOTQ2IiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:25 GMT; Max-Age=7200; path=/; domain=localhost; samesite=lax; ostrapp_session=eyJpdiI6IjVlNEZYcmNCVktjRzl0N0hvMlFGMGc9PSIsInZhbHVlIjoiZjk2U1dZQTU3SFRMK3U0MGFPOGpKc2lWdHNwc3VSelVkenlkRCtSTnkzOTdDZ2JSWlYzY2FXQlJ3VFNhUEZ6MDRYclEyL0FKem0xdjUwVkNVZmlxVlpnNTRTelV3Y2NzUUxNZkI4OTZxWUF5S3FINS9vdlFLemduTGFVSXA5YWQiLCJtYWMiOiJhMDJmYmY0MzAzYzEyM2UyMDAxZmE3MzA5ODIxMWFmZGE5Mzk1MGFiNTlhZmQzNDg5MDUwY2IwNGUxMDNhNWE5IiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:25 GMT; Max-Age=7200; path=/; domain=localhost; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Get the two factor authentication recovery codes for authenticated user.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-recovery-codes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/user/two-factor-recovery-codes',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6ImF1Ykw1RzJkQlA3V3BzM1NqNDhSMWc9PSIsInZhbHVlIjoiTXh3bG5PaTI0aGl1TmhKcisrR0tOeFlYeHQ2ZXQzdkpjdEtaMWJnSWsxZ2ppTlRQaXFMRC92ZGtXNzFKWXFpYm85SWpUcktZb2RBNkdHS1RVOUJ4RFdZVlV4RkZ0VkVYWUowVjRDYk1Ca052K3BoZHlMT2xOR2hqWmZsMnNNNEEiLCJtYWMiOiI2ZjZmMWI4OThiOTJjMjExZWNkYWIzMzdjNTE2NGJkY2E2Yzc4MDRkYTI5NTQyMzJhNDhiOGIxYjdjZTM5Y2FkIiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:25 GMT; Max-Age=7200; path=/; domain=localhost; samesite=lax; ostrapp_session=eyJpdiI6IlB2cGhGZlRvdlF5N2oySFMvZkZhUFE9PSIsInZhbHVlIjoiQjRzRHQ3MWRIcnZyOE5mVzM0RE5qNU5VSTFVUnZQQXpXd0lrZlpLd0NKenFKMzlyRFgyNXFLU2lNRnBwUmtmQ0FjRlFwZWp5K2pBQm1MbVFWemswV1B3UEpaK0hnclNiZkFLeXFKaVBrWmFIdjJCRkc2MzV0ZlRDV1NlcGZOTm8iLCJtYWMiOiIxNzAxMWI5NzIwMmNhYzllNzM0MTkzMjAzZjU0ZTE2YzA5Njc2OTg5NWJlMzgwYWVjZDk5ZjkzNWYzODUzOTA4IiwidGFnIjoiIn0%3D; expires=Wed, 08 Mar 2023 17:24:25 GMT; Max-Age=7200; path=/; domain=localhost; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Generate a fresh set of two factor authentication recovery codes.
Example request:
const url = new URL(
"https://api.ostrapp.com/user/two-factor-recovery-codes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/user/two-factor-recovery-codes',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Return an empty response simply to trigger the storage of the CSRF cookie in the browser.
GET user
Example request:
const url = new URL(
"https://api.ostrapp.com/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Products
APIs for managing products.
Get products.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/products"
);
const params = {
"limit": "14",
"page": "19",
"orderDirection": "asc",
"orderBy": "name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/products',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'limit' => '14',
'page' => '19',
'orderDirection' => 'asc',
'orderBy' => 'name',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
vary: Origin
{
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'order clause' (SQL: select * from `products` order by `name` asc limit 14 offset 252)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 760,
"trace": [
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 720,
"function": "runQueryCallback",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 422,
"function": "run",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2706,
"function": "select",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2694,
"function": "runSelect",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 3230,
"function": "Illuminate\\Database\\Query\\{closure}",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2695,
"function": "onceWithColumns",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 710,
"function": "get",
"class": "Illuminate\\Database\\Query\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 694,
"function": "getModels",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
"line": 899,
"function": "get",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/app/Http/Controllers/v1/ProductController.php",
"line": 49,
"function": "paginate",
"class": "Illuminate\\Database\\Eloquent\\Builder",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "index",
"class": "App\\Http\\Controllers\\v1\\ProductController",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 43,
"function": "callAction",
"class": "Illuminate\\Routing\\Controller",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 260,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 205,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 798,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php",
"line": 45,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Auth\\Middleware\\Authorize",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"line": 50,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 126,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 102,
"function": "handleRequest",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 54,
"function": "handleRequestUsingNamedLimiter",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php",
"line": 33,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Laravel\\Sanctum\\Http\\Middleware\\{closure}",
"class": "Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php",
"line": 34,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 799,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 776,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 740,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 729,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 190,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/app/Http/Middleware/SetLocale.php",
"line": 22,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "App\\Http\\Middleware\\SetLocale",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
"line": 31,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 86,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 62,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 165,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 134,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 299,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 287,
"function": "callLaravelOrLumenRoute",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 92,
"function": "makeApiCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 45,
"function": "makeResponseCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 35,
"function": "makeResponseCallIfConditionsPass",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 209,
"function": "__invoke",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 166,
"function": "iterateThroughStrategies",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 95,
"function": "fetchResponses",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 124,
"function": "processRoute",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 71,
"function": "extractEndpointsInfoFromLaravelApp",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 49,
"function": "extractEndpointsInfoAndWriteToDisk",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
"line": 51,
"function": "get",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 36,
"function": "handle",
"class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php",
"line": 41,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 93,
"function": "unwrapIfClosure",
"class": "Illuminate\\Container\\Util",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 37,
"function": "callBoundMethod",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 661,
"function": "call",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 183,
"function": "call",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Command/Command.php",
"line": 312,
"function": "execute",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 153,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 1022,
"function": "run",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 314,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/console/Application.php",
"line": 168,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php",
"line": 102,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
"line": 155,
"function": "run",
"class": "Illuminate\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/html/artisan",
"line": 37,
"function": "handle",
"class": "Illuminate\\Foundation\\Console\\Kernel",
"type": "->"
}
]
}
Received response:
Request failed with error:
Store a newly created product.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/products"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'ratione');
body.append('description', 'Tenetur esse et cupiditate sit atque vitae illum qui.');
body.append('deposit', '26814.9');
body.append('minimal_age', '13');
body.append('alcohol_percentage', '6827.267');
body.append('brand_id', '5');
body.append('category_id', '4');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.ostrapp.com/v1/products',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'name',
'contents' => 'ratione'
],
[
'name' => 'description',
'contents' => 'Tenetur esse et cupiditate sit atque vitae illum qui.'
],
[
'name' => 'deposit',
'contents' => '26814.9'
],
[
'name' => 'minimal_age',
'contents' => '13'
],
[
'name' => 'alcohol_percentage',
'contents' => '6827.267'
],
[
'name' => 'brand_id',
'contents' => '5'
],
[
'name' => 'category_id',
'contents' => '4'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpomm8g3', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Display the specified product.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.ostrapp.com/v1/products/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
vary: Origin
{
"data": {
"id": 1,
"name": "in",
"description": "Quia quis tenetur beatae amet iusto. Dolorem occaecati fugiat sed praesentium aut et non. Iure inventore assumenda quis nisi ut aut.",
"deposit": "0.60",
"minimal_age": 18,
"alcohol_percentage": "76.25",
"brand": {
"id": 14,
"name": "molestias",
"description": "Voluptatem aut tempora vel distinctio. Laborum accusamus dolores numquam ut dolores.",
"created_at": "2023-02-08T20:25:40.000000Z",
"updated_at": "2023-02-08T20:25:40.000000Z"
},
"category": {
"id": 15,
"name": "sed",
"description": "Tempore incidunt nam fuga voluptatem. Debitis sint et commodi aut. Iure occaecati officiis molestiae amet consequatur dolores est. Et reprehenderit consequatur officiis qui beatae ut labore quae.",
"created_at": "2023-02-08T20:25:41.000000Z",
"updated_at": "2023-02-08T20:25:41.000000Z"
},
"image": {
"type": "main",
"path": "storage/https://via.placeholder.com/640x480.png/007722?text=neque"
},
"created_at": "2023-02-08T20:25:42.000000Z",
"updated_at": "2023-02-08T20:25:42.000000Z"
}
}
Received response:
Request failed with error:
Update the specified product.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.ostrapp.com/v1/products/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Remove the specified product.
Example request:
const url = new URL(
"https://api.ostrapp.com/v1/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.ostrapp.com/v1/products/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error: