From b9a69cc67b1194d7313448303e897a0a05cdf14f Mon Sep 17 00:00:00 2001 From: ok200lyndon Date: Mon, 19 Aug 2024 15:11:32 +1000 Subject: [PATCH 1/6] Feature: Create shops process --- .../Controllers/Api/V1/ApiShopsController.php | 210 ++++++++++++++++++ routes/api.php | 109 ++++++++- .../Feature/API/App/Shops/ShopDeleteTest.php | 64 ++++++ tests/Feature/API/App/Shops/ShopGetTest.php | 79 +++++++ tests/Feature/API/App/Shops/ShopPostTest.php | 88 ++++++++ tests/Feature/API/App/Shops/ShopPutTest.php | 64 ++++++ 6 files changed, 604 insertions(+), 10 deletions(-) create mode 100644 app/Http/Controllers/Api/V1/ApiShopsController.php create mode 100644 tests/Feature/API/App/Shops/ShopDeleteTest.php create mode 100644 tests/Feature/API/App/Shops/ShopGetTest.php create mode 100644 tests/Feature/API/App/Shops/ShopPostTest.php create mode 100644 tests/Feature/API/App/Shops/ShopPutTest.php diff --git a/app/Http/Controllers/Api/V1/ApiShopsController.php b/app/Http/Controllers/Api/V1/ApiShopsController.php new file mode 100644 index 0000000..7562bd2 --- /dev/null +++ b/app/Http/Controllers/Api/V1/ApiShopsController.php @@ -0,0 +1,210 @@ +responseCode = 403; + $this->message = ApiResponse::RESPONSE_METHOD_NOT_ALLOWED->value; + + return $this->respond(); + } + + #[Endpoint( + title: 'POST /', + description: 'Create a new shop.', + authenticated: true + )] + #[Authenticated] + #[Response( + content: '{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"', + status: 200, + description: '', + )] + public function store(): JsonResponse + { + /** + * The validation array. + */ + $validationArray = [ + 'shop_name' => [ + 'required', + 'string', + ], + 'user_email' => [ + 'required', + 'email', + ], + 'user_name' => [ + 'required', + 'string', + ], + ]; + + $validator = Validator::make($this->request->all(), $validationArray); + + if ($validator->fails()) { + + $this->responseCode = 400; + $this->message = $validator->errors()->first(); + + return $this->respond(); + } + + try { + + /** + * Create a Team for the shop if one does not exist + */ + $shopName = $this->request->get('shop_name'); + + $shopTeam = Team::where('name', $shopName)->first(); + + if (is_null($shopTeam)) { + $shopTeam = new Team(); + $shopTeam->name = $shopName; + $shopTeam->save(); + } + + /** + * Create a User for the shop if one does not exist + */ + $userEmail = $this->request->get('user_email'); + + $shopUser = User::where('email', $userEmail)->first(); + + if (is_null($shopUser)) { + $shopUser = new User(); + $shopUser->email = $userEmail; + $shopUser->password = $userEmail; + $shopUser->name = $this->request->get('user_name'); + $shopUser->current_team_id = $shopTeam->id; + $shopUser->save(); + } + + /** + * Create a TeamUser for the shop if one does not exist + */ + $shopTeamUser = TeamUser::where('team_id', $shopTeam->id)->where('user_id', $shopUser->id)->first(); + + if (is_null($shopTeamUser)) { + $shopTeamUser = new TeamUser(); + $shopTeamUser->user_id = $shopUser->id; + $shopTeamUser->team_id = $shopTeam->id; + $shopTeamUser->save(); + } + + /** + * Create a PAT for the shop that has redemption capabilities + */ + $token = $shopUser->createToken( + name: $shopTeam->name, + abilities: PersonalAccessTokenAbility::redemptionAppTokenAbilities(), + ); + + $this->message = ApiResponse::RESPONSE_SAVED->value . '. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.'; + $this->data = $token->plainTextToken; + + } catch (Exception $e) { + + $this->responseCode = 500; + $this->message = ApiResponse::RESPONSE_ERROR->value . ': "' . $e->getMessage() . '".'; + + } + + return $this->respond(); + } + + #[Endpoint( + title: 'GET /{id}', + description: 'Get shop with ID {id}', + authenticated: true + )] + #[Authenticated] + #[Response( + status: 403, + description: 'Method Not Allowed', + )] + public function show(int $id) + { + $this->responseCode = 403; + $this->message = ApiResponse::RESPONSE_METHOD_NOT_ALLOWED->value; + + return $this->respond(); + } + + #[Endpoint( + title: 'PUT /{id}', + description: 'Update shop with ID {id}.', + authenticated: true + )] + #[Authenticated] + #[Response( + status: 403, + description: 'Method Not Allowed', + )] + public function update(string $id) + { + $this->responseCode = 403; + $this->message = ApiResponse::RESPONSE_METHOD_NOT_ALLOWED->value; + + return $this->respond(); + } + + #[Endpoint( + title: 'DELETE /', + description: 'DELETE shop with ID {id}.', + authenticated: true + )] + #[Authenticated] + #[Response( + status: 403, + description: 'Method Not Allowed', + )] + public function destroy(string $id) + { + $this->responseCode = 403; + $this->message = ApiResponse::RESPONSE_METHOD_NOT_ALLOWED->value; + + return $this->respond(); + } +} diff --git a/routes/api.php b/routes/api.php index 5820b46..f8fca1b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -14,6 +14,7 @@ use App\Http\Controllers\Api\V1\ApiMyTeamController; use App\Http\Controllers\Api\V1\ApiMyTeamsController; use App\Http\Controllers\Api\V1\ApiMyTeamVouchersController; +use App\Http\Controllers\Api\V1\ApiShopsController; use App\Http\Controllers\Api\V1\ApiSystemStatisticsController; use App\Http\Middleware\CheckAdminStatus; use Illuminate\Support\Facades\Route; @@ -186,6 +187,59 @@ ] ); + /** + * Shops + */ + Route::post('/shops', [ApiShopsController::class, 'store']) + ->name('api.v1.shops.post') + ->middleware( + [ + 'abilities:' . + PersonalAccessTokenAbility::SUPER_ADMIN->value . ',' . + PersonalAccessTokenAbility::SHOPS_CREATE->value, + ] + ); + + Route::get('/shops', [ApiShopsController::class, 'index']) + ->name('api.v1.shops.getMany') + ->middleware( + [ + 'abilities:' . + PersonalAccessTokenAbility::SUPER_ADMIN->value . ',' . + PersonalAccessTokenAbility::SHOPS_READ->value, + ] + ); + + Route::get('/shops/{id}', [ApiShopsController::class, 'show']) + ->name('api.v1.shops.get') + ->middleware( + [ + 'abilities:' . + PersonalAccessTokenAbility::SUPER_ADMIN->value . ',' . + PersonalAccessTokenAbility::SHOPS_READ->value, + ] + ); + + Route::put('/shops/{id}', [ApiShopsController::class, 'update']) + ->name('api.v1.shops.put') + ->middleware( + [ + 'abilities:' . + PersonalAccessTokenAbility::SUPER_ADMIN->value . ',' . + PersonalAccessTokenAbility::SHOPS_UPDATE->value, + ] + ); + + Route::delete('/shops/{id}', [ApiShopsController::class, 'destroy']) + ->name('api.v1.shops.delete') + ->middleware( + [ + 'abilities:' . + PersonalAccessTokenAbility::SUPER_ADMIN->value . ',' . + PersonalAccessTokenAbility::SHOPS_DELETE->value, + ] + ); + /** * System Statistics */ @@ -247,16 +301,51 @@ Route::prefix('admin') ->middleware(['auth:sanctum', CheckAdminStatus::class]) ->group(function () { - Route::resource('/audit-items', ApiAdminAuditItemsController::class)->names('api.v1.admin.audit-items'); - Route::resource('/search', ApiAdminSearchController::class)->names('api.v1.admin.search'); - Route::resource('/system-statistics', ApiAdminSystemStatisticsController::class)->names('api.v1.admin.system-statistics'); - Route::resource('/team-merchant-teams', ApiAdminTeamMerchantTeamsController::class)->names('api.v1.admin.team-merchant-teams'); - Route::resource('/team-service-teams', ApiAdminTeamServiceTeamsController::class)->names('api.v1.admin.team-service-teams'); - Route::resource('/team-users', ApiAdminTeamUsersController::class)->names('api.v1.admin.team-users'); - Route::resource('/teams', ApiAdminTeamsController::class)->names('api.v1.admin.teams'); - Route::resource('/user-personal-access-tokens', ApiAdminUserPersonalAccessTokensController::class)->names('api.v1.admin.tokens'); - Route::resource('/users', ApiAdminUsersController::class)->names('api.v1.admin.users'); - }); + Route::resource( + '/audit-items', + ApiAdminAuditItemsController::class + )->names('api.v1.admin.audit-items'); + + Route::resource( + '/search', + ApiAdminSearchController::class + )->names('api.v1.admin.search'); + + Route::resource( + '/system-statistics', + ApiAdminSystemStatisticsController::class + )->names('api.v1.admin.system-statistics'); + + Route::resource( + '/team-merchant-teams', + ApiAdminTeamMerchantTeamsController::class + )->names('api.v1.admin.team-merchant-teams'); + + Route::resource( + '/team-service-teams', + ApiAdminTeamServiceTeamsController::class + )->names('api.v1.admin.team-service-teams'); + Route::resource( + '/team-users', + ApiAdminTeamUsersController::class + )->names('api.v1.admin.team-users'); + + Route::resource( + '/teams', + ApiAdminTeamsController::class + )->names('api.v1.admin.teams'); + + Route::resource( + '/user-personal-access-tokens', + ApiAdminUserPersonalAccessTokensController::class + )->names('api.v1.admin.tokens'); + + Route::resource( + '/users', + ApiAdminUsersController::class + )->names('api.v1.admin.users'); + + }); }); diff --git a/tests/Feature/API/App/Shops/ShopDeleteTest.php b/tests/Feature/API/App/Shops/ShopDeleteTest.php new file mode 100644 index 0000000..1716592 --- /dev/null +++ b/tests/Feature/API/App/Shops/ShopDeleteTest.php @@ -0,0 +1,64 @@ +user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->deleteJson($this->apiRoot . $this->endpoint . '/1'); + + $response->assertStatus(401); + } + + #[Test] + public function standardUserWithoutPermissionCannotDelete() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->deleteJson($this->apiRoot . $this->endpoint . '/1'); + + $response->assertStatus(401)->assertJson( + [ + 'meta' => [ + 'message' => ApiResponse::RESPONSE_TOKEN_NOT_ALLOWED_TO_DO_THIS->value, + ], + ] + ); + + } + + #[Test] + public function itCanNotDeleteASingleResource() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: [ + PersonalAccessTokenAbility::SHOPS_DELETE->value, + ]); + + $response = $this->deleteJson($this->apiRoot . $this->endpoint . '/1'); + + $response->assertStatus(403); + } +} diff --git a/tests/Feature/API/App/Shops/ShopGetTest.php b/tests/Feature/API/App/Shops/ShopGetTest.php new file mode 100644 index 0000000..b25f545 --- /dev/null +++ b/tests/Feature/API/App/Shops/ShopGetTest.php @@ -0,0 +1,79 @@ +user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->getJson($this->apiRoot . $this->endpoint); + + $response->assertStatus(401); + } + + #[Test] + public function standardUserWithoutPermissionCannotAccess() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->getJson($this->apiRoot . $this->endpoint); + + $response->assertStatus(401)->assertJson( + [ + 'meta' => [ + 'message' => ApiResponse::RESPONSE_TOKEN_NOT_ALLOWED_TO_DO_THIS->value, + ], + ] + ); + + } + + #[Test] + public function itCanNotGetAllResources() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: [ + PersonalAccessTokenAbility::SHOPS_READ->value, + ]); + + $response = $this->getJson($this->apiRoot . $this->endpoint); + + $response->assertStatus(403); + + } + + #[Test] + public function itCanNotGetASingleResource() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: [ + PersonalAccessTokenAbility::SHOPS_READ->value, + ]); + + $response = $this->getJson($this->apiRoot . $this->endpoint . '/1'); + + $response->assertStatus(403); + } +} diff --git a/tests/Feature/API/App/Shops/ShopPostTest.php b/tests/Feature/API/App/Shops/ShopPostTest.php new file mode 100644 index 0000000..8b2e2fc --- /dev/null +++ b/tests/Feature/API/App/Shops/ShopPostTest.php @@ -0,0 +1,88 @@ +user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->postJson($this->apiRoot . $this->endpoint, []); + + $response->assertStatus(401); + } + + #[Test] + public function standardUserWithoutPermissionCannotCreate() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->postJson($this->apiRoot . $this->endpoint, []); + + $response->assertStatus(401)->assertJson( + [ + 'meta' => [ + 'message' => ApiResponse::RESPONSE_TOKEN_NOT_ALLOWED_TO_DO_THIS->value, + ], + ] + ); + + } + + #[Test] + public function userWithPermissionCanCreate() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: [ + PersonalAccessTokenAbility::SHOPS_CREATE->value, + ]); + + $shopName = fake()->name(); + $userName = fake()->name(); + $userEmail = fake()->email(); + + $user = User::whereEmail($userEmail)->first(); + self::assertNull($user); + + $payload = [ + 'shop_name' => $shopName, + 'user_name' => $userName, + 'user_email' => $userEmail, + ]; + + $response = $this->postJson($this->apiRoot . $this->endpoint, $payload); + + $response->assertStatus(200); + + $responseObj = json_decode($response->getContent(), true); + + self::assertSame( + 'Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.', + $responseObj['meta']['message'] + ); + + $user = User::whereEmail($userEmail)->first(); + self::assertNotNull($user); + } +} diff --git a/tests/Feature/API/App/Shops/ShopPutTest.php b/tests/Feature/API/App/Shops/ShopPutTest.php new file mode 100644 index 0000000..1fe32d2 --- /dev/null +++ b/tests/Feature/API/App/Shops/ShopPutTest.php @@ -0,0 +1,64 @@ +user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->putJson($this->apiRoot . $this->endpoint . '/1', []); + + $response->assertStatus(401); + } + + #[Test] + public function standardUserWithoutPermissionCannotUpdate() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: []); + + $response = $this->putJson($this->apiRoot . $this->endpoint . '/1', []); + + $response->assertStatus(401)->assertJson( + [ + 'meta' => [ + 'message' => ApiResponse::RESPONSE_TOKEN_NOT_ALLOWED_TO_DO_THIS->value, + ], + ] + ); + + } + + #[Test] + public function itCanNotUpdateASingleResource() + { + $this->user = $this->createUser(); + + Sanctum::actingAs($this->user, abilities: [ + PersonalAccessTokenAbility::SHOPS_UPDATE->value, + ]); + + $response = $this->putJson($this->apiRoot . $this->endpoint . '/1', []); + + $response->assertStatus(403); + } +} From 0981d00ff6c224c5901bc90f590ea69c66436667 Mon Sep 17 00:00:00 2001 From: ok200lyndon Date: Mon, 19 Aug 2024 05:12:27 +0000 Subject: [PATCH 2/6] Lint code --- app/Http/Controllers/Api/V1/ApiShopsController.php | 7 ++++--- tests/Feature/API/App/Shops/ShopPostTest.php | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Api/V1/ApiShopsController.php b/app/Http/Controllers/Api/V1/ApiShopsController.php index 7562bd2..85598e1 100644 --- a/app/Http/Controllers/Api/V1/ApiShopsController.php +++ b/app/Http/Controllers/Api/V1/ApiShopsController.php @@ -66,7 +66,7 @@ public function store(): JsonResponse * The validation array. */ $validationArray = [ - 'shop_name' => [ + 'shop_name' => [ 'required', 'string', ], @@ -74,7 +74,7 @@ public function store(): JsonResponse 'required', 'email', ], - 'user_name' => [ + 'user_name' => [ 'required', 'string', ], @@ -144,7 +144,8 @@ public function store(): JsonResponse $this->message = ApiResponse::RESPONSE_SAVED->value . '. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.'; $this->data = $token->plainTextToken; - } catch (Exception $e) { + } + catch (Exception $e) { $this->responseCode = 500; $this->message = ApiResponse::RESPONSE_ERROR->value . ': "' . $e->getMessage() . '".'; diff --git a/tests/Feature/API/App/Shops/ShopPostTest.php b/tests/Feature/API/App/Shops/ShopPostTest.php index 8b2e2fc..8755c80 100644 --- a/tests/Feature/API/App/Shops/ShopPostTest.php +++ b/tests/Feature/API/App/Shops/ShopPostTest.php @@ -58,16 +58,16 @@ public function userWithPermissionCanCreate() PersonalAccessTokenAbility::SHOPS_CREATE->value, ]); - $shopName = fake()->name(); - $userName = fake()->name(); + $shopName = fake()->name(); + $userName = fake()->name(); $userEmail = fake()->email(); $user = User::whereEmail($userEmail)->first(); self::assertNull($user); $payload = [ - 'shop_name' => $shopName, - 'user_name' => $userName, + 'shop_name' => $shopName, + 'user_name' => $userName, 'user_email' => $userEmail, ]; From 3877f19f2da9c99f2ddfbcf19d23cba002ecf78a Mon Sep 17 00:00:00 2001 From: ok200lyndon Date: Mon, 19 Aug 2024 15:14:22 +1000 Subject: [PATCH 3/6] Update index.blade.php --- resources/views/scribe/index.blade.php | 2056 +++++++++++++++++++++--- 1 file changed, 1806 insertions(+), 250 deletions(-) diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php index f054386..8c13c63 100644 --- a/resources/views/scribe/index.blade.php +++ b/resources/views/scribe/index.blade.php @@ -4,7 +4,7 @@ - Open Food Network Vine Platform - API Documentation + Open Food Foundation VINE - API Documentation @@ -143,7 +143,7 @@ function highlightSidebarItem(evt = null) { style="width: calc((100% - 1800px) / 2 + 300px); padding-left: calc((100% - 1800px) / 2); min-width: 300px; max-height: 100vh">

- Open Food Network Vine Platform - API Documentation + Open Food Foundation VINE - API Documentation

@@ -237,6 +237,85 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted" + + + + @@ -428,7 +507,7 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"

- Open Food Network Vine Platform - API Documentation + Open Food Foundation VINE - API Documentation

@@ -442,9 +521,9 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"

Introduction

-

The API documentation for Open Food Network Vine Platform.

+

The API documentation for Open Food Foundation VINE.

This documentation aims to provide all the information you need to work with our API.

-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-vouchers
@@ -781,7 +860,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+    --get "http://vine.test/api/v1/my-team-vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -792,7 +871,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers"
+    "http://vine.test/api/v1/my-team-vouchers"
 );
 
 const params = {
@@ -825,7 +904,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers';
+$url = 'http://vine.test/api/v1/my-team-vouchers';
 $response = $client->get(
     $url,
     [
@@ -857,7 +936,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers'
+url = 'http://vine.test/api/v1/my-team-vouchers'
 params = {
   'cached': '1',
   'page': '1',
@@ -978,7 +1057,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-vouchers/{id}
@@ -1180,7 +1259,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
+    --get "http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -1191,7 +1270,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000"
+    "http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000"
 );
 
 const params = {
@@ -1218,7 +1297,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000';
+$url = 'http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000';
 $response = $client->get(
     $url,
     [
@@ -1244,7 +1323,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000'
+url = 'http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000'
 params = {
   'cached': '1',
   'fields': 'id,created_at',
@@ -1336,7 +1415,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-teams
@@ -1484,132 +1563,1697 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw integer
-
-

The number of entries returned per pagination page.

+
+

The number of entries returned per pagination page.

+
+
+ Example: +
+
+ 50 +
+
+
+
+
+
+
+
+
+
+
fields
+ string +
+
+
+

Comma-separated list of database fields to return within the object.

+
+
+ Example: +
+
+ id,created_at +
+
+
+
+
+
+
+
+
+
+
orderBy
+ comma-separated +
+
+
+

Order the data by a given field. Comma-separated string.

+
+
+ Example: +
+
+ orderBy=id,desc +
+
+
+
+
+
+
+
+
+
+
orderBy[]
+ comma-separated +
+
+
+

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

+
+
+ Example: +
+
+ orderBy[]=id,desc&orderBy[]=created_at,asc +
+
+
+
+
+
+
+
+
+
+
where
+ comma-separated +
+
+
+

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

+
+
+ Example: +
+
+ where=id,like,*550e* +
+
+
+
+
+
+
+
+
+
+
where[]
+ comma-separated +
+
+
+

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

+
+
+ Example: +
+
+ where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01 +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ + +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request GET \
+    --get "http://vine.test/api/v1/my-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+
{
+    "meta": {
+        "responseCode": 200,
+        "limit": 50,
+        "offset": 0,
+        "message": "",
+        "cached": false,
+        "availableRelations": []
+    },
+    "data": {
+        "current_page": 1,
+        "data": [
+            {
+                "id": 1,
+                "name": "Team A",
+                "created_at": "2024-08-16T06:54:28.000000Z",
+                "updated_at": "2024-08-16T06:54:28.000000Z",
+                "deleted_at": null
+            },
+            {
+                "id": 2,
+                "name": "Team B",
+                "created_at": "2024-08-16T06:54:29.000000Z",
+                "updated_at": "2024-08-16T06:54:29.000000Z",
+                "deleted_at": null
+            }
+        ],
+        "first_page_url": "https://vine.test/api/v1/my-teams?page=1",
+        "from": 1,
+        "last_page": 1,
+        "last_page_url": "https://vine.test/api/v1/my-teams?page=1",
+        "links": [
+            {
+                "url": null,
+                "label": "« Previous",
+                "active": false
+            },
+            {
+                "url": "https://vine.test/api/v1/my-teams?page=1",
+                "label": "1",
+                "active": true
+            },
+            {
+                "url": null,
+                "label": "Next »",
+                "active": false
+            }
+        ],
+        "next_page_url": null,
+        "path": "https://vine.test/api/v1/my-teams",
+        "per_page": 50,
+        "prev_page_url": null,
+        "to": 2,
+        "total": 2
+    }
+}
+
+
+
+
+
+
+ +

+ /shops +

+ +

API for managing shops

+ +
+
+
+
+

+ POST / +

+
+
+ +
+
+
+ POST +
+
+
http://vine.test
+
/api/v1/shops
+
+ +
requires authentication +
+
+
+ +

Create a new shop.

+
+
+
+
+
+
+

+ Headers +

+
+
+
+
+
+
+
Authorization
+
+
+
+ Example: +
+
+ Bearer {YOUR_API_TOKEN} +
+
+
+
+
+
+
+
+
+
+
Content-Type
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+
+
+
+
Accept
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+ + + + +
+

Body Parameters

+ +
+ + + +
+
+ +
+
+
+ +
+
+ + +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request POST \
+    "http://vine.test/api/v1/shops" \
+    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json" \
+    --data "{
+    \"shop_name\": \"qui\",
+    \"user_email\": \"ppfeffer@example.net\",
+    \"user_name\": \"tenetur\"
+}"
+
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"
+
+
+
+
+
+
+ +
+
+
+
+

+ GET / +

+
+
+ +
+
+
+ GET +
+
+
http://vine.test
+
/api/v1/shops
+
+ +
requires authentication +
+
+
+ + +
+
+
+
+
+
+

+ Headers +

+
+
+
+
+
+
+
Authorization
+
+
+
+ Example: +
+
+ Bearer {YOUR_API_TOKEN} +
+
+
+
+
+
+
+
+
+
+
Content-Type
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+
+
+
+
Accept
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+ + + + + +
+
+
+ +
+
+ + +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request GET \
+    --get "http://vine.test/api/v1/shops" \
+    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+ + + + + + + Headers + + +
                                                            cache-control
+                                                            : no-cache, private
+                                                                                                                    content-type
+                                                            : application/json
+                                                                                                                    access-control-allow-origin
+                                                            : *
+                                                         
+
+ +
{
+    "message": "Unauthenticated."
+}
+
+
+
+
+
null
+
+
+
+
+
+
+ +
+
+
+
+

+ GET /{id} +

+
+
+ +
+
+
+ GET +
+
+
http://vine.test
+
/api/v1/shops/{id}
+
+ +
requires authentication +
+
+
+ +

Get shop with ID {id}

+
+
+
+
+
+
+

+ Headers +

+
+
+
+
+
+
+
Authorization
+
+
+
+ Example: +
+
+ Bearer {YOUR_API_TOKEN} +
+
+
+
+
+
+
+
+
+
+
Content-Type
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+
+
+
+
Accept
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+ +
+

URL Parameters

+ +
+
+
+
+
+
+
id
+ string +
+
+ required +
+
+

The ID of the shop.

+
+
+ Example: +
+
+ esse +
+
+
+
+
+
+
+ + + + +
+
+
+ +
+
+ + +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request GET \
+    --get "http://vine.test/api/v1/shops/esse" \
+    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+ + + + + + + Headers + + +
                                                            cache-control
+                                                            : no-cache, private
+                                                                                                                    content-type
+                                                            : application/json
+                                                                                                                    access-control-allow-origin
+                                                            : *
+                                                         
+
+ +
{
+    "message": "Unauthenticated."
+}
+
+
+
+
+
null
+
+
+
+
+
+
+ +
+
+
+
+

+ PUT /{id} +

+
+
+ +
+
+
+ PUT +
+
+
http://vine.test
+
/api/v1/shops/{id}
+
+ +
requires authentication +
+
+
+ +

Update shop with ID {id}.

+
+
+
+
+
+
+

+ Headers +

+
+
+
+
+
+
+
Authorization
+
+
+
+ Example: +
+
+ Bearer {YOUR_API_TOKEN} +
+
+
+
+
+
+
+
+
+
+
Content-Type
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+
+
+
+
Accept
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+ +
+

URL Parameters

+ +
+
+
+
+
+
+
id
+ string +
+
+ required +
+
+

The ID of the shop.

+
+
+ Example: +
+
+ est +
+
+
+
+
+
+
+ + + + +
+
+
+ +
+
+ + +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request PUT \
+    "http://vine.test/api/v1/shops/est" \
+    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+
null
+
+
+
+
+
+
+ +
+
+
+
+

+ DELETE / +

+
-
- Example: -
-
- 50 + +
+
+
+ DELETE +
+
+
http://vine.test
+
/api/v1/shops/{id}
-
-
-
-
-
-
-
-
-
-
fields
- string -
+ +
requires authentication +
-
-

Comma-separated list of database fields to return within the object.

-
- Example: -
-
- id,created_at -
-
-
-
-
-
+ +

DELETE shop with ID {id}.

+
+
+
+
+
+
+

+ Headers +

+
+
-
orderBy
- comma-separated +
Authorization
-
-

Order the data by a given field. Comma-separated string.

-
Example:
- orderBy=id,desc + Bearer {YOUR_API_TOKEN}
-
+
-
orderBy[]
- comma-separated +
Content-Type
-
-

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

-
Example:
- orderBy[]=id,desc&orderBy[]=created_at,asc + application/json
-
+
-
where
- comma-separated +
Accept
-
-

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

-
Example:
- where=id,like,*550e* + application/json
-
+
+
+ +
+

URL Parameters

+ +
+
-
where[]
- comma-separated +
id
+ string
+
+ required
-

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

+

The ID of the shop.

Example:
- where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01 + in
-
+
+ +
@@ -1639,8 +3283,8 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw style="">
-
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+                                            
curl --request DELETE \
+    "http://vine.test/api/v1/shops/in" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -1651,22 +3295,9 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-teams"
+    "http://vine.test/api/v1/shops/in"
 );
 
-const params = {
-    "cached": "1",
-    "page": "1",
-    "limit": "50",
-    "fields": "id,created_at",
-    "orderBy": "orderBy=id,desc",
-    "orderBy[]": "orderBy[]=id,desc&orderBy[]=created_at,asc",
-    "where": "where=id,like,*550e*",
-    "where[]": "where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01",
-};
-Object.keys(params)
-    .forEach(key => url.searchParams.append(key, params[key]));
-
 const headers = {
     "Authorization": "Bearer {YOUR_API_TOKEN}",
     "Content-Type": "application/json",
@@ -1674,7 +3305,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
 };
 
 fetch(url, {
-    method: "GET",
+    method: "DELETE",
     headers,
 }).then(response => response.json());
@@ -1684,8 +3315,8 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-teams';
-$response = $client->get(
+$url = 'http://vine.test/api/v1/shops/in';
+$response = $client->delete(
     $url,
     [
         'headers' => [
@@ -1693,16 +3324,6 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
             'Content-Type' => 'application/json',
             'Accept' => 'application/json',
         ],
-        'query' => [
-            'cached' => '1',
-            'page' => '1',
-            'limit' => '50',
-            'fields' => 'id,created_at',
-            'orderBy' => 'orderBy=id,desc',
-            'orderBy[]' => 'orderBy[]=id,desc&orderBy[]=created_at,asc',
-            'where' => 'where=id,like,*550e*',
-            'where[]' => 'where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01',
-        ],
     ]
 );
 $body = $response->getBody();
@@ -1716,24 +3337,14 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-teams'
-params = {
-  'cached': '1',
-  'page': '1',
-  'limit': '50',
-  'fields': 'id,created_at',
-  'orderBy': 'orderBy=id,desc',
-  'orderBy[]': 'orderBy[]=id,desc&orderBy[]=created_at,asc',
-  'where': 'where=id,like,*550e*',
-  'where[]': 'where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01',
-}
+url = 'http://vine.test/api/v1/shops/in'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
   'Accept': 'application/json'
 }
 
-response = requests.request('GET', url, headers=headers, params=params)
+response = requests.request('DELETE', url, headers=headers)
 response.json()
@@ -1747,10 +3358,10 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
Example response:
@@ -1767,67 +3378,12 @@ class="svg-inline--fa fa-copy fa-fw fa-sm sl-icon" role="img"
-
{
-    "meta": {
-        "responseCode": 200,
-        "limit": 50,
-        "offset": 0,
-        "message": "",
-        "cached": false,
-        "availableRelations": []
-    },
-    "data": {
-        "current_page": 1,
-        "data": [
-            {
-                "id": 1,
-                "name": "Team A",
-                "created_at": "2024-08-16T06:54:28.000000Z",
-                "updated_at": "2024-08-16T06:54:28.000000Z",
-                "deleted_at": null
-            },
-            {
-                "id": 2,
-                "name": "Team B",
-                "created_at": "2024-08-16T06:54:29.000000Z",
-                "updated_at": "2024-08-16T06:54:29.000000Z",
-                "deleted_at": null
-            }
-        ],
-        "first_page_url": "https://vine.test/api/v1/my-teams?page=1",
-        "from": 1,
-        "last_page": 1,
-        "last_page_url": "https://vine.test/api/v1/my-teams?page=1",
-        "links": [
-            {
-                "url": null,
-                "label": "« Previous",
-                "active": false
-            },
-            {
-                "url": "https://vine.test/api/v1/my-teams?page=1",
-                "label": "1",
-                "active": true
-            },
-            {
-                "url": null,
-                "label": "Next »",
-                "active": false
-            }
-        ],
-        "next_page_url": null,
-        "path": "https://vine.test/api/v1/my-teams",
-        "per_page": 50,
-        "prev_page_url": null,
-        "to": 2,
-        "total": 2
-    }
-}
+ class="language-json sl-overflow-x-auto sl-overflow-y-auto">null
@@ -1855,7 +3411,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/system-statistics
@@ -2159,7 +3715,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics?cached=1&page=1&limit=50&fields=id%2Csum_voucher_value_total&orderBy=orderBy%3Dsum_voucher_value_total%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2C%3E%2C123&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+    --get "http://vine.test/api/v1/system-statistics?cached=1&page=1&limit=50&fields=id%2Csum_voucher_value_total&orderBy=orderBy%3Dsum_voucher_value_total%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2C%3E%2C123&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -2170,7 +3726,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics"
+    "http://vine.test/api/v1/system-statistics"
 );
 
 const params = {
@@ -2203,7 +3759,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics';
+$url = 'http://vine.test/api/v1/system-statistics';
 $response = $client->get(
     $url,
     [
@@ -2235,7 +3791,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics'
+url = 'http://vine.test/api/v1/system-statistics'
 params = {
   'cached': '1',
   'page': '1',
@@ -2356,7 +3912,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/system-statistics/{id}
@@ -2467,7 +4023,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- 19 + 4
@@ -2558,7 +4114,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19?cached=1&fields=id%2Cnum_users" \
+    --get "http://vine.test/api/v1/system-statistics/4?cached=1&fields=id%2Cnum_users" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -2569,7 +4125,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19"
+    "http://vine.test/api/v1/system-statistics/4"
 );
 
 const params = {
@@ -2596,7 +4152,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19';
+$url = 'http://vine.test/api/v1/system-statistics/4';
 $response = $client->get(
     $url,
     [
@@ -2622,7 +4178,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19'
+url = 'http://vine.test/api/v1/system-statistics/4'
 params = {
   'cached': '1',
   'fields': 'id,num_users',
@@ -2723,7 +4279,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team
@@ -2845,7 +4401,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team" \
+    --get "http://vine.test/api/v1/my-team" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -2856,7 +4412,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team"
+    "http://vine.test/api/v1/my-team"
 );
 
 const headers = {
@@ -2876,7 +4432,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team';
+$url = 'http://vine.test/api/v1/my-team';
 $response = $client->get(
     $url,
     [
@@ -2898,7 +4454,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team'
+url = 'http://vine.test/api/v1/my-team'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -2990,7 +4546,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team
@@ -3112,7 +4668,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request POST \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team" \
+    "http://vine.test/api/v1/my-team" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3123,7 +4679,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team"
+    "http://vine.test/api/v1/my-team"
 );
 
 const headers = {
@@ -3143,7 +4699,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team';
+$url = 'http://vine.test/api/v1/my-team';
 $response = $client->post(
     $url,
     [
@@ -3165,7 +4721,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team'
+url = 'http://vine.test/api/v1/my-team'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -3194,7 +4750,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team/{id}
@@ -3305,7 +4861,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- dolores + ullam
@@ -3346,7 +4902,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team/dolores" \
+    --get "http://vine.test/api/v1/my-team/ullam" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3357,7 +4913,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/dolores"
+    "http://vine.test/api/v1/my-team/ullam"
 );
 
 const headers = {
@@ -3377,7 +4933,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/dolores';
+$url = 'http://vine.test/api/v1/my-team/ullam';
 $response = $client->get(
     $url,
     [
@@ -3399,7 +4955,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/dolores'
+url = 'http://vine.test/api/v1/my-team/ullam'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -3491,7 +5047,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team/{id}
@@ -3607,7 +5163,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- dolor + blanditiis
@@ -3648,7 +5204,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request PUT \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/dolor" \
+    "http://vine.test/api/v1/my-team/blanditiis" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3659,7 +5215,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/dolor"
+    "http://vine.test/api/v1/my-team/blanditiis"
 );
 
 const headers = {
@@ -3679,7 +5235,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/dolor';
+$url = 'http://vine.test/api/v1/my-team/blanditiis';
 $response = $client->put(
     $url,
     [
@@ -3701,7 +5257,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/dolor'
+url = 'http://vine.test/api/v1/my-team/blanditiis'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -3730,7 +5286,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team/{id}
@@ -3841,7 +5397,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- tenetur + sunt
@@ -3882,7 +5438,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request DELETE \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/tenetur" \
+    "http://vine.test/api/v1/my-team/sunt" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3893,7 +5449,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/tenetur"
+    "http://vine.test/api/v1/my-team/sunt"
 );
 
 const headers = {
@@ -3913,7 +5469,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/tenetur';
+$url = 'http://vine.test/api/v1/my-team/sunt';
 $response = $client->delete(
     $url,
     [
@@ -3935,7 +5491,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/tenetur'
+url = 'http://vine.test/api/v1/my-team/sunt'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -3964,7 +5520,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-audit-items
@@ -4086,7 +5642,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request POST \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items" \
+    "http://vine.test/api/v1/my-team-audit-items" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4097,7 +5653,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items"
+    "http://vine.test/api/v1/my-team-audit-items"
 );
 
 const headers = {
@@ -4117,7 +5673,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items';
+$url = 'http://vine.test/api/v1/my-team-audit-items';
 $response = $client->post(
     $url,
     [
@@ -4139,7 +5695,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items'
+url = 'http://vine.test/api/v1/my-team-audit-items'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4168,7 +5724,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-audit-items
@@ -4290,7 +5846,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items" \
+    --get "http://vine.test/api/v1/my-team-audit-items" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4301,7 +5857,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items"
+    "http://vine.test/api/v1/my-team-audit-items"
 );
 
 const headers = {
@@ -4321,7 +5877,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items';
+$url = 'http://vine.test/api/v1/my-team-audit-items';
 $response = $client->get(
     $url,
     [
@@ -4343,7 +5899,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items'
+url = 'http://vine.test/api/v1/my-team-audit-items'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4435,7 +5991,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-audit-items/{id}
@@ -4546,7 +6102,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- voluptate + voluptatem
@@ -4587,7 +6143,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/voluptate" \
+    --get "http://vine.test/api/v1/my-team-audit-items/voluptatem" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4598,7 +6154,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/voluptate"
+    "http://vine.test/api/v1/my-team-audit-items/voluptatem"
 );
 
 const headers = {
@@ -4618,7 +6174,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/voluptate';
+$url = 'http://vine.test/api/v1/my-team-audit-items/voluptatem';
 $response = $client->get(
     $url,
     [
@@ -4640,7 +6196,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/voluptate'
+url = 'http://vine.test/api/v1/my-team-audit-items/voluptatem'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4732,7 +6288,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
https://vine.openfoodnetwork.org.au
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
/api/v1/my-team-audit-items/{id}
@@ -4843,7 +6399,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- nihil + unde
@@ -4884,7 +6440,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request DELETE \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/nihil" \
+    "http://vine.test/api/v1/my-team-audit-items/unde" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4895,7 +6451,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/nihil"
+    "http://vine.test/api/v1/my-team-audit-items/unde"
 );
 
 const headers = {
@@ -4915,7 +6471,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/nihil';
+$url = 'http://vine.test/api/v1/my-team-audit-items/unde';
 $response = $client->delete(
     $url,
     [
@@ -4937,7 +6493,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/nihil'
+url = 'http://vine.test/api/v1/my-team-audit-items/unde'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',

From e6de001bae1b17d6a84751edb9a7b883532383c6 Mon Sep 17 00:00:00 2001
From: Paul Grimes 
Date: Mon, 19 Aug 2024 15:23:54 +1000
Subject: [PATCH 4/6] Updated doco

---
 .../Controllers/Api/V1/ApiShopsController.php |   61 +-
 resources/views/scribe/index.blade.php        | 1830 +++--------------
 2 files changed, 347 insertions(+), 1544 deletions(-)

diff --git a/app/Http/Controllers/Api/V1/ApiShopsController.php b/app/Http/Controllers/Api/V1/ApiShopsController.php
index 85598e1..3cc8d83 100644
--- a/app/Http/Controllers/Api/V1/ApiShopsController.php
+++ b/app/Http/Controllers/Api/V1/ApiShopsController.php
@@ -32,15 +32,9 @@ class ApiShopsController extends Controller
     public static array $searchableFields = [
     ];
 
-    #[Endpoint(
-        title: 'GET /',
-        authenticated: true
-    )]
-    #[Authenticated]
-    #[Response(
-        status: 403,
-        description: 'Method Not Allowed',
-    )]
+    /**
+     * @hideFromAPIDocumentation
+     */
     public function index(): JsonResponse
     {
         $this->responseCode = 403;
@@ -99,7 +93,7 @@ public function store(): JsonResponse
 
             $shopTeam = Team::where('name', $shopName)->first();
 
-            if (is_null($shopTeam)) {
+            if (!$shopTeam) {
                 $shopTeam       = new Team();
                 $shopTeam->name = $shopName;
                 $shopTeam->save();
@@ -112,7 +106,7 @@ public function store(): JsonResponse
 
             $shopUser = User::where('email', $userEmail)->first();
 
-            if (is_null($shopUser)) {
+            if (!$shopUser) {
                 $shopUser                  = new User();
                 $shopUser->email           = $userEmail;
                 $shopUser->password        = $userEmail;
@@ -126,7 +120,7 @@ public function store(): JsonResponse
              */
             $shopTeamUser = TeamUser::where('team_id', $shopTeam->id)->where('user_id', $shopUser->id)->first();
 
-            if (is_null($shopTeamUser)) {
+            if (!$shopTeamUser) {
                 $shopTeamUser          = new TeamUser();
                 $shopTeamUser->user_id = $shopUser->id;
                 $shopTeamUser->team_id = $shopTeam->id;
@@ -142,7 +136,9 @@ public function store(): JsonResponse
             );
 
             $this->message = ApiResponse::RESPONSE_SAVED->value . '. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.';
-            $this->data    = $token->plainTextToken;
+            $this->data    = [
+                'token' => $token->plainTextToken
+            ];
 
         }
         catch (Exception $e) {
@@ -155,16 +151,9 @@ public function store(): JsonResponse
         return $this->respond();
     }
 
-    #[Endpoint(
-        title: 'GET /{id}',
-        description: 'Get shop with ID {id}',
-        authenticated: true
-    )]
-    #[Authenticated]
-    #[Response(
-        status: 403,
-        description: 'Method Not Allowed',
-    )]
+    /**
+     * @hideFromAPIDocumentation
+     */
     public function show(int $id)
     {
         $this->responseCode = 403;
@@ -173,16 +162,9 @@ public function show(int $id)
         return $this->respond();
     }
 
-    #[Endpoint(
-        title: 'PUT /{id}',
-        description: 'Update shop with ID {id}.',
-        authenticated: true
-    )]
-    #[Authenticated]
-    #[Response(
-        status: 403,
-        description: 'Method Not Allowed',
-    )]
+    /**
+     * @hideFromAPIDocumentation
+     */
     public function update(string $id)
     {
         $this->responseCode = 403;
@@ -191,16 +173,9 @@ public function update(string $id)
         return $this->respond();
     }
 
-    #[Endpoint(
-        title: 'DELETE /',
-        description: 'DELETE shop with ID {id}.',
-        authenticated: true
-    )]
-    #[Authenticated]
-    #[Response(
-        status: 403,
-        description: 'Method Not Allowed',
-    )]
+    /**
+     * @hideFromAPIDocumentation
+     */
     public function destroy(string $id)
     {
         $this->responseCode = 403;
diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php
index 8c13c63..634dc4d 100644
--- a/resources/views/scribe/index.blade.php
+++ b/resources/views/scribe/index.blade.php
@@ -4,7 +4,7 @@
     
     
     
-    Open Food Foundation VINE - API Documentation
+    Open Food Network Vine Platform - API Documentation
 
     
 
@@ -143,7 +143,7 @@ function highlightSidebarItem(evt = null) {
      style="width: calc((100% - 1800px) / 2 + 300px); padding-left: calc((100% - 1800px) / 2); min-width: 300px; max-height: 100vh">
     

- Open Food Foundation VINE - API Documentation + Open Food Network Vine Platform - API Documentation

@@ -268,54 +268,6 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
-
- - - -
@@ -507,7 +459,7 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"

- Open Food Foundation VINE - API Documentation + Open Food Network Vine Platform - API Documentation

@@ -521,9 +473,9 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"

Introduction

-

The API documentation for Open Food Foundation VINE.

+

The API documentation for Open Food Network Vine Platform.

This documentation aims to provide all the information you need to work with our API.

-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-vouchers
@@ -860,7 +812,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team-vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -871,7 +823,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-vouchers"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers"
 );
 
 const params = {
@@ -904,7 +856,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-vouchers';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers';
 $response = $client->get(
     $url,
     [
@@ -936,7 +888,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-vouchers'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers'
 params = {
   'cached': '1',
   'page': '1',
@@ -1057,7 +1009,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-vouchers/{id}
@@ -1259,7 +1211,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000?cached=1&fields=id%2Ccreated_at" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -1270,7 +1222,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000"
 );
 
 const params = {
@@ -1297,7 +1249,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000';
 $response = $client->get(
     $url,
     [
@@ -1323,7 +1275,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-vouchers/550e8400-e29b-41d4-a716-446655440000'
 params = {
   'cached': '1',
   'fields': 'id,created_at',
@@ -1415,7 +1367,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-teams
@@ -1609,1380 +1561,86 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test

Order the data by a given field. Comma-separated string.

-
-
- Example: -
-
- orderBy=id,desc -
-
-
-
-
-
-
-
-
-
-
orderBy[]
- comma-separated -
-
-
-

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

-
-
- Example: -
-
- orderBy[]=id,desc&orderBy[]=created_at,asc -
-
-
-
-
-
-
-
-
-
-
where
- comma-separated -
-
-
-

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

-
-
- Example: -
-
- where=id,like,*550e* -
-
-
-
-
-
-
-
-
-
-
where[]
- comma-separated -
-
-
-

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

-
-
- Example: -
-
- where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01 -
-
-
-
-
-
-
- - -
-
-
- -
-
- - -
-
-
-
- Example request: - -
-
-
-
-
-
-
curl --request GET \
-    --get "http://vine.test/api/v1/my-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
-    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
-    --header "Content-Type: application/json" \
-    --header "Accept: application/json"
-
-
- - - -
- -
-
-
-
-
-
Example response:
-
-
-
-
-
- -
-
-
-
{
-    "meta": {
-        "responseCode": 200,
-        "limit": 50,
-        "offset": 0,
-        "message": "",
-        "cached": false,
-        "availableRelations": []
-    },
-    "data": {
-        "current_page": 1,
-        "data": [
-            {
-                "id": 1,
-                "name": "Team A",
-                "created_at": "2024-08-16T06:54:28.000000Z",
-                "updated_at": "2024-08-16T06:54:28.000000Z",
-                "deleted_at": null
-            },
-            {
-                "id": 2,
-                "name": "Team B",
-                "created_at": "2024-08-16T06:54:29.000000Z",
-                "updated_at": "2024-08-16T06:54:29.000000Z",
-                "deleted_at": null
-            }
-        ],
-        "first_page_url": "https://vine.test/api/v1/my-teams?page=1",
-        "from": 1,
-        "last_page": 1,
-        "last_page_url": "https://vine.test/api/v1/my-teams?page=1",
-        "links": [
-            {
-                "url": null,
-                "label": "« Previous",
-                "active": false
-            },
-            {
-                "url": "https://vine.test/api/v1/my-teams?page=1",
-                "label": "1",
-                "active": true
-            },
-            {
-                "url": null,
-                "label": "Next »",
-                "active": false
-            }
-        ],
-        "next_page_url": null,
-        "path": "https://vine.test/api/v1/my-teams",
-        "per_page": 50,
-        "prev_page_url": null,
-        "to": 2,
-        "total": 2
-    }
-}
-
-
-
-
-
-
- -

- /shops -

- -

API for managing shops

- -
-
-
-
-

- POST / -

-
-
- -
-
-
- POST -
-
-
http://vine.test
-
/api/v1/shops
-
- -
requires authentication -
-
-
- -

Create a new shop.

-
-
-
-
-
-
-

- Headers -

-
-
-
-
-
-
-
Authorization
-
-
-
- Example: -
-
- Bearer {YOUR_API_TOKEN} -
-
-
-
-
-
-
-
-
-
-
Content-Type
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
-
-
-
-
Accept
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
- - - - -
-

Body Parameters

- -
- - - -
-
- -
-
-
- -
-
- - -
-
-
-
- Example request: - -
-
-
-
-
-
-
curl --request POST \
-    "http://vine.test/api/v1/shops" \
-    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
-    --header "Content-Type: application/json" \
-    --header "Accept: application/json" \
-    --data "{
-    \"shop_name\": \"qui\",
-    \"user_email\": \"ppfeffer@example.net\",
-    \"user_name\": \"tenetur\"
-}"
-
-
-
- - - -
- -
-
-
-
-
-
Example response:
-
-
-
-
-
- -
-
-
-
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"
-
-
-
-
-
-
- -
-
-
-
-

- GET / -

-
-
- -
-
-
- GET -
-
-
http://vine.test
-
/api/v1/shops
-
- -
requires authentication -
-
-
- - -
-
-
-
-
-
-

- Headers -

-
-
-
-
-
-
-
Authorization
-
-
-
- Example: -
-
- Bearer {YOUR_API_TOKEN} -
-
-
-
-
-
-
-
-
-
-
Content-Type
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
-
-
-
-
Accept
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
- - - - - -
-
-
- -
-
- - -
-
-
-
- Example request: - -
-
-
-
-
-
-
curl --request GET \
-    --get "http://vine.test/api/v1/shops" \
-    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
-    --header "Content-Type: application/json" \
-    --header "Accept: application/json"
-
-
- - - -
- -
-
-
-
-
-
Example response:
-
-
-
-
-
- -
-
-
- - - - - - - Headers - - -
                                                            cache-control
-                                                            : no-cache, private
-                                                                                                                    content-type
-                                                            : application/json
-                                                                                                                    access-control-allow-origin
-                                                            : *
-                                                         
-
- -
{
-    "message": "Unauthenticated."
-}
-
-
-
-
-
null
-
-
-
-
-
-
- -
-
-
-
-

- GET /{id} -

-
-
- -
-
-
- GET -
-
-
http://vine.test
-
/api/v1/shops/{id}
-
- -
requires authentication -
-
-
- -

Get shop with ID {id}

-
-
-
-
-
-
-

- Headers -

-
-
-
-
-
-
-
Authorization
-
-
-
- Example: -
-
- Bearer {YOUR_API_TOKEN} -
-
-
-
-
-
-
-
-
-
-
Content-Type
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
-
-
-
-
Accept
-
-
-
- Example: -
-
- application/json -
-
-
-
-
-
-
- -
-

URL Parameters

- -
-
-
-
-
-
-
id
- string -
-
- required -
-
-

The ID of the shop.

-
-
- Example: -
-
- esse -
-
-
-
-
-
-
- - - - -
-
-
- -
-
- - -
-
-
-
- Example request: - -
-
-
-
-
-
-
curl --request GET \
-    --get "http://vine.test/api/v1/shops/esse" \
-    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
-    --header "Content-Type: application/json" \
-    --header "Accept: application/json"
-
-
- - - -
- -
-
-
-
-
-
Example response:
-
-
-
-
-
- -
-
-
- - - - - - - Headers - - -
                                                            cache-control
-                                                            : no-cache, private
-                                                                                                                    content-type
-                                                            : application/json
-                                                                                                                    access-control-allow-origin
-                                                            : *
-                                                         
-
- -
{
-    "message": "Unauthenticated."
-}
-
-
-
-
-
null
-
-
-
-
-
-
- -
-
-
-
-

- PUT /{id} -

-
-
- -
-
-
- PUT -
-
-
http://vine.test
-
/api/v1/shops/{id}
-
- -
requires authentication -
-
-
- -

Update shop with ID {id}.

-
-
-
-
-
-
-

- Headers -

-
-
-
-
-
-
-
Authorization
-
-
+
Example:
- Bearer {YOUR_API_TOKEN} + orderBy=id,desc
-
+
-
Content-Type
+
orderBy[]
+ comma-separated
+
+

Compound orderBy. Order the data by a given field. Comma-separated string. Can not be used in conjunction as standard orderBy.

+
Example:
- application/json + orderBy[]=id,desc&orderBy[]=created_at,asc
-
+
-
Accept
+
where
+ comma-separated
+
+

Filter the request on a single field. Key-Value or Key-Operator-Value comma-separated string.

+
Example:
- application/json + where=id,like,*550e*
-
-
- -
-

URL Parameters

- -
-
+
-
id
- string +
where[]
+ comma-separated
-
- required
-

The ID of the shop.

+

Compound where. Use when you need to filter on multiple where's. Note only AND is possible; ORWHERE is not available.

Example:
- est + where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01
-
+
- -
@@ -3012,8 +1670,8 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
style="">
-
curl --request PUT \
-    "http://vine.test/api/v1/shops/est" \
+                                            
curl --request GET \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-teams?cached=1&page=1&limit=50&fields=id%2Ccreated_at&orderBy=orderBy%3Did%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2Clike%2C%2A550e%2A&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3024,9 +1682,22 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/shops/est"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-teams"
 );
 
+const params = {
+    "cached": "1",
+    "page": "1",
+    "limit": "50",
+    "fields": "id,created_at",
+    "orderBy": "orderBy=id,desc",
+    "orderBy[]": "orderBy[]=id,desc&orderBy[]=created_at,asc",
+    "where": "where=id,like,*550e*",
+    "where[]": "where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01",
+};
+Object.keys(params)
+    .forEach(key => url.searchParams.append(key, params[key]));
+
 const headers = {
     "Authorization": "Bearer {YOUR_API_TOKEN}",
     "Content-Type": "application/json",
@@ -3034,7 +1705,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
}; fetch(url, { - method: "PUT", + method: "GET", headers, }).then(response => response.json());
@@ -3044,8 +1715,8 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/shops/est';
-$response = $client->put(
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-teams';
+$response = $client->get(
     $url,
     [
         'headers' => [
@@ -3053,6 +1724,16 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'query' => [ + 'cached' => '1', + 'page' => '1', + 'limit' => '50', + 'fields' => 'id,created_at', + 'orderBy' => 'orderBy=id,desc', + 'orderBy[]' => 'orderBy[]=id,desc&orderBy[]=created_at,asc', + 'where' => 'where=id,like,*550e*', + 'where[]' => 'where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01', + ], ] ); $body = $response->getBody(); @@ -3066,14 +1747,24 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/shops/est'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-teams'
+params = {
+  'cached': '1',
+  'page': '1',
+  'limit': '50',
+  'fields': 'id,created_at',
+  'orderBy': 'orderBy=id,desc',
+  'orderBy[]': 'orderBy[]=id,desc&orderBy[]=created_at,asc',
+  'where': 'where=id,like,*550e*',
+  'where[]': 'where[]=id,like,*550e*&where[]=created_at,>=,2024-01-01',
+}
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
   'Accept': 'application/json'
 }
 
-response = requests.request('PUT', url, headers=headers)
+response = requests.request('GET', url, headers=headers, params=params)
 response.json()
@@ -3087,10 +1778,10 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example response:
@@ -3107,12 +1798,67 @@ class="svg-inline--fa fa-copy fa-fw fa-sm sl-icon" role="img"
-
null
+ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{ + "meta": { + "responseCode": 200, + "limit": 50, + "offset": 0, + "message": "", + "cached": false, + "availableRelations": [] + }, + "data": { + "current_page": 1, + "data": [ + { + "id": 1, + "name": "Team A", + "created_at": "2024-08-16T06:54:28.000000Z", + "updated_at": "2024-08-16T06:54:28.000000Z", + "deleted_at": null + }, + { + "id": 2, + "name": "Team B", + "created_at": "2024-08-16T06:54:29.000000Z", + "updated_at": "2024-08-16T06:54:29.000000Z", + "deleted_at": null + } + ], + "first_page_url": "https://vine.test/api/v1/my-teams?page=1", + "from": 1, + "last_page": 1, + "last_page_url": "https://vine.test/api/v1/my-teams?page=1", + "links": [ + { + "url": null, + "label": "« Previous", + "active": false + }, + { + "url": "https://vine.test/api/v1/my-teams?page=1", + "label": "1", + "active": true + }, + { + "url": null, + "label": "Next »", + "active": false + } + ], + "next_page_url": null, + "path": "https://vine.test/api/v1/my-teams", + "per_page": 50, + "prev_page_url": null, + "to": 2, + "total": 2 + } +}
@@ -3120,30 +1866,38 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">null
-
+

+ /shops +

+ +

API for managing shops

+ +

- DELETE / + id="shops-POSTapi-v1-shops"> + POST /

-
- DELETE + POST
http://vine.test
-
/api/v1/shops/{id}
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
+
/api/v1/shops
http://vine.test
-

DELETE shop with ID {id}.

+

Create a new shop.

@@ -3221,39 +1975,90 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
+ + +
-

URL Parameters

+

Body Parameters

-
-
+
+ + -
- - +
+ +
+
@@ -3283,11 +2088,17 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
style="">
-
curl --request DELETE \
-    "http://vine.test/api/v1/shops/in" \
+                                            
curl --request POST \
+    "https://vine.openfoodnetwork.org.au/api/v1/shops" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
-    --header "Accept: application/json"
+ --header "Accept: application/json" \ + --data "{ + \"shop_name\": \"velit\", + \"user_email\": \"anahi30@example.net\", + \"user_name\": \"vel\" +}" +
http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/shops/in"
+    "https://vine.openfoodnetwork.org.au/api/v1/shops"
 );
 
 const headers = {
@@ -3304,9 +2115,16 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
"Accept": "application/json", }; +let body = { + "shop_name": "velit", + "user_email": "anahi30@example.net", + "user_name": "vel" +}; + fetch(url, { - method: "DELETE", + method: "POST", headers, + body: JSON.stringify(body), }).then(response => response.json());
@@ -3315,8 +2133,8 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/shops/in';
-$response = $client->delete(
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/shops';
+$response = $client->post(
     $url,
     [
         'headers' => [
@@ -3324,6 +2142,11 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'shop_name' => 'velit', + 'user_email' => 'anahi30@example.net', + 'user_name' => 'vel', + ], ] ); $body = $response->getBody(); @@ -3337,14 +2160,19 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/shops/in'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/shops'
+payload = {
+    "shop_name": "velit",
+    "user_email": "anahi30@example.net",
+    "user_name": "vel"
+}
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
   'Accept': 'application/json'
 }
 
-response = requests.request('DELETE', url, headers=headers)
+response = requests.request('POST', url, headers=headers, json=payload)
 response.json()
@@ -3358,10 +2186,10 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example response:
@@ -3378,12 +2206,12 @@ class="svg-inline--fa fa-copy fa-fw fa-sm sl-icon" role="img"
-
null
+ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"
@@ -3411,7 +2239,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/system-statistics
@@ -3715,7 +2543,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/system-statistics?cached=1&page=1&limit=50&fields=id%2Csum_voucher_value_total&orderBy=orderBy%3Dsum_voucher_value_total%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2C%3E%2C123&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics?cached=1&page=1&limit=50&fields=id%2Csum_voucher_value_total&orderBy=orderBy%3Dsum_voucher_value_total%2Cdesc&orderBy%5B%5D=orderBy%5B%5D%3Did%2Cdesc%26orderBy%5B%5D%3Dcreated_at%2Casc&where=where%3Did%2C%3E%2C123&where%5B%5D=where%5B%5D%3Did%2Clike%2C%2A550e%2A%26where%5B%5D%3Dcreated_at%2C%3E%3D%2C2024-01-01" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3726,7 +2554,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/system-statistics"
+    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics"
 );
 
 const params = {
@@ -3759,7 +2587,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/system-statistics';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics';
 $response = $client->get(
     $url,
     [
@@ -3791,7 +2619,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/system-statistics'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics'
 params = {
   'cached': '1',
   'page': '1',
@@ -3912,7 +2740,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/system-statistics/{id}
@@ -4023,7 +2851,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- 4 + 19
@@ -4114,7 +2942,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/system-statistics/4?cached=1&fields=id%2Cnum_users" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19?cached=1&fields=id%2Cnum_users" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4125,7 +2953,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/system-statistics/4"
+    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19"
 );
 
 const params = {
@@ -4152,7 +2980,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/system-statistics/4';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19';
 $response = $client->get(
     $url,
     [
@@ -4178,7 +3006,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/system-statistics/4'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19'
 params = {
   'cached': '1',
   'fields': 'id,num_users',
@@ -4279,7 +3107,7 @@ class="sl-text-5xl sl-leading-tight sl-font-prose sl-text-heading"
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team
@@ -4401,7 +3229,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4412,7 +3240,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team"
 );
 
 const headers = {
@@ -4432,7 +3260,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team';
 $response = $client->get(
     $url,
     [
@@ -4454,7 +3282,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4546,7 +3374,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team
@@ -4668,7 +3496,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request POST \
-    "http://vine.test/api/v1/my-team" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4679,7 +3507,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team"
 );
 
 const headers = {
@@ -4699,7 +3527,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team';
 $response = $client->post(
     $url,
     [
@@ -4721,7 +3549,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4750,7 +3578,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team/{id}
@@ -4861,7 +3689,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- ullam + sit
@@ -4902,7 +3730,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team/ullam" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team/sit" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4913,7 +3741,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team/ullam"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sit"
 );
 
 const headers = {
@@ -4933,7 +3761,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team/ullam';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sit';
 $response = $client->get(
     $url,
     [
@@ -4955,7 +3783,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team/ullam'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sit'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5047,7 +3875,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team/{id}
@@ -5163,7 +3991,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- blanditiis + qui
@@ -5204,7 +4032,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request PUT \
-    "http://vine.test/api/v1/my-team/blanditiis" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/qui" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5215,7 +4043,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team/blanditiis"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/qui"
 );
 
 const headers = {
@@ -5235,7 +4063,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team/blanditiis';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/qui';
 $response = $client->put(
     $url,
     [
@@ -5257,7 +4085,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team/blanditiis'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/qui'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5286,7 +4114,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team/{id}
@@ -5397,7 +4225,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- sunt + sint
@@ -5438,7 +4266,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request DELETE \
-    "http://vine.test/api/v1/my-team/sunt" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sint" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5449,7 +4277,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team/sunt"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sint"
 );
 
 const headers = {
@@ -5469,7 +4297,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team/sunt';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sint';
 $response = $client->delete(
     $url,
     [
@@ -5491,7 +4319,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team/sunt'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sint'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5520,7 +4348,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items
@@ -5642,7 +4470,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request POST \
-    "http://vine.test/api/v1/my-team-audit-items" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5653,7 +4481,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-audit-items"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items"
 );
 
 const headers = {
@@ -5673,7 +4501,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-audit-items';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items';
 $response = $client->post(
     $url,
     [
@@ -5695,7 +4523,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-audit-items'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5724,7 +4552,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items
@@ -5846,7 +4674,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team-audit-items" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5857,7 +4685,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-audit-items"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items"
 );
 
 const headers = {
@@ -5877,7 +4705,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-audit-items';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items';
 $response = $client->get(
     $url,
     [
@@ -5899,7 +4727,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-audit-items'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5991,7 +4819,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items/{id}
@@ -6102,7 +4930,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- voluptatem + fuga
@@ -6143,7 +4971,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request GET \
-    --get "http://vine.test/api/v1/my-team-audit-items/voluptatem" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -6154,7 +4982,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-audit-items/voluptatem"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga"
 );
 
 const headers = {
@@ -6174,7 +5002,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-audit-items/voluptatem';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga';
 $response = $client->get(
     $url,
     [
@@ -6196,7 +5024,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-audit-items/voluptatem'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -6288,7 +5116,7 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
         
-
http://vine.test
+ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetwork.org.au
/api/v1/my-team-audit-items/{id}
@@ -6399,7 +5227,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
Example:
- unde + vel
@@ -6440,7 +5268,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
curl --request DELETE \
-    "http://vine.test/api/v1/my-team-audit-items/unde" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -6451,7 +5279,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
const url = new URL(
-    "http://vine.test/api/v1/my-team-audit-items/unde"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel"
 );
 
 const headers = {
@@ -6471,7 +5299,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
$client = new \GuzzleHttp\Client();
-$url = 'http://vine.test/api/v1/my-team-audit-items/unde';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel';
 $response = $client->delete(
     $url,
     [
@@ -6493,7 +5321,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://vine.test
import requests
 import json
 
-url = 'http://vine.test/api/v1/my-team-audit-items/unde'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',

From 2dd5b4d1d88a67e20c66ce1ede18ae5bd870d8a0 Mon Sep 17 00:00:00 2001
From: ok200paul 
Date: Mon, 19 Aug 2024 05:24:48 +0000
Subject: [PATCH 5/6] Lint code

---
 app/Http/Controllers/Api/V1/ApiShopsController.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/Http/Controllers/Api/V1/ApiShopsController.php b/app/Http/Controllers/Api/V1/ApiShopsController.php
index 3cc8d83..80ffbf8 100644
--- a/app/Http/Controllers/Api/V1/ApiShopsController.php
+++ b/app/Http/Controllers/Api/V1/ApiShopsController.php
@@ -137,7 +137,7 @@ public function store(): JsonResponse
 
             $this->message = ApiResponse::RESPONSE_SAVED->value . '. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.';
             $this->data    = [
-                'token' => $token->plainTextToken
+                'token' => $token->plainTextToken,
             ];
 
         }
@@ -153,6 +153,8 @@ public function store(): JsonResponse
 
     /**
      * @hideFromAPIDocumentation
+     *
+     * @param int $id
      */
     public function show(int $id)
     {
@@ -164,6 +166,8 @@ public function show(int $id)
 
     /**
      * @hideFromAPIDocumentation
+     *
+     * @param string $id
      */
     public function update(string $id)
     {
@@ -175,6 +179,8 @@ public function update(string $id)
 
     /**
      * @hideFromAPIDocumentation
+     *
+     * @param string $id
      */
     public function destroy(string $id)
     {

From 7b2299cd1340e00a05a915e55bc0d9600fc435fc Mon Sep 17 00:00:00 2001
From: Paul Grimes 
Date: Mon, 19 Aug 2024 15:27:32 +1000
Subject: [PATCH 6/6] Updated docs

---
 .../Controllers/Api/V1/ApiShopsController.php |   2 +-
 resources/views/scribe/index.blade.php        | 104 ++++++++++--------
 2 files changed, 59 insertions(+), 47 deletions(-)

diff --git a/app/Http/Controllers/Api/V1/ApiShopsController.php b/app/Http/Controllers/Api/V1/ApiShopsController.php
index 3cc8d83..7323711 100644
--- a/app/Http/Controllers/Api/V1/ApiShopsController.php
+++ b/app/Http/Controllers/Api/V1/ApiShopsController.php
@@ -50,7 +50,7 @@ public function index(): JsonResponse
     )]
     #[Authenticated]
     #[Response(
-        content: '{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"',
+        content: '{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":{"token": "123|kjfhsgiufsghkjsfghkfgsjh"}}',
         status: 200,
         description: '',
     )]
diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php
index 634dc4d..a08d4bf 100644
--- a/resources/views/scribe/index.blade.php
+++ b/resources/views/scribe/index.blade.php
@@ -1998,7 +1998,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- velit + qui
@@ -2025,7 +2025,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- anahi30@example.net + donnie76@example.org
@@ -2049,7 +2049,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- vel + quia
@@ -2094,9 +2094,9 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ - \"shop_name\": \"velit\", - \"user_email\": \"anahi30@example.net\", - \"user_name\": \"vel\" + \"shop_name\": \"qui\", + \"user_email\": \"donnie76@example.org\", + \"user_name\": \"quia\" }"
@@ -2116,9 +2116,9 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw }; let body = { - "shop_name": "velit", - "user_email": "anahi30@example.net", - "user_name": "vel" + "shop_name": "qui", + "user_email": "donnie76@example.org", + "user_name": "quia" }; fetch(url, { @@ -2143,9 +2143,9 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw 'Accept' => 'application/json', ], 'json' => [ - 'shop_name' => 'velit', - 'user_email' => 'anahi30@example.net', - 'user_name' => 'vel', + 'shop_name' => 'qui', + 'user_email' => 'donnie76@example.org', + 'user_name' => 'quia', ], ] ); @@ -2162,9 +2162,9 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw url = 'https://vine.openfoodnetwork.org.au/api/v1/shops' payload = { - "shop_name": "velit", - "user_email": "anahi30@example.net", - "user_name": "vel" + "shop_name": "qui", + "user_email": "donnie76@example.org", + "user_name": "quia" } headers = { 'Authorization': 'Bearer {YOUR_API_TOKEN}', @@ -2211,7 +2211,19 @@ class="svg-inline--fa fa-copy fa-fw fa-sm sl-icon" role="img" >
{"meta":{"responseCode":200,"limit":50,"offset":0,"message":"Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.","cached":false,"availableRelations":[]},"data":"{TOKEN}"
+ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{ + "meta": { + "responseCode": 200, + "limit": 50, + "offset": 0, + "message": "Saved. Here is the API Token for the user linked to this new team. It will only be displayed ONCE, so please store it in a secure manner.", + "cached": false, + "availableRelations": [] + }, + "data": { + "token": "123|kjfhsgiufsghkjsfghkfgsjh" + } +}
@@ -2851,7 +2863,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw Example:
- 19 + 2
@@ -2942,7 +2954,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19?cached=1&fields=id%2Cnum_users" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/2?cached=1&fields=id%2Cnum_users" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -2953,7 +2965,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19"
+    "https://vine.openfoodnetwork.org.au/api/v1/system-statistics/2"
 );
 
 const params = {
@@ -2980,7 +2992,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/2';
 $response = $client->get(
     $url,
     [
@@ -3006,7 +3018,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/19'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/system-statistics/2'
 params = {
   'cached': '1',
   'fields': 'id,num_users',
@@ -3689,7 +3701,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- sit + sed
@@ -3730,7 +3742,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team/sit" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team/sed" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -3741,7 +3753,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sit"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sed"
 );
 
 const headers = {
@@ -3761,7 +3773,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sit';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sed';
 $response = $client->get(
     $url,
     [
@@ -3783,7 +3795,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sit'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sed'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -3991,7 +4003,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- qui + porro
@@ -4032,7 +4044,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request PUT \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/qui" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/porro" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4043,7 +4055,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/qui"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/porro"
 );
 
 const headers = {
@@ -4063,7 +4075,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/qui';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/porro';
 $response = $client->put(
     $url,
     [
@@ -4085,7 +4097,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/qui'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/porro'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4225,7 +4237,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- sint + ut
@@ -4266,7 +4278,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request DELETE \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sint" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/ut" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4277,7 +4289,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team/sint"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team/ut"
 );
 
 const headers = {
@@ -4297,7 +4309,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sint';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/ut';
 $response = $client->delete(
     $url,
     [
@@ -4319,7 +4331,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/sint'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team/ut'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -4930,7 +4942,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- fuga + laudantium
@@ -4971,7 +4983,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request GET \
-    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga" \
+    --get "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/laudantium" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4982,7 +4994,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/laudantium"
 );
 
 const headers = {
@@ -5002,7 +5014,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/laudantium';
 $response = $client->get(
     $url,
     [
@@ -5024,7 +5036,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/fuga'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/laudantium'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',
@@ -5227,7 +5239,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                 Example: 
                 
- vel + aspernatur
@@ -5268,7 +5280,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
curl --request DELETE \
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel" \
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/aspernatur" \
     --header "Authorization: Bearer {YOUR_API_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5279,7 +5291,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
const url = new URL(
-    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel"
+    "https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/aspernatur"
 );
 
 const headers = {
@@ -5299,7 +5311,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                     
$client = new \GuzzleHttp\Client();
-$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel';
+$url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/aspernatur';
 $response = $client->delete(
     $url,
     [
@@ -5321,7 +5333,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">https://vine.openfoodnetw
                                             
import requests
 import json
 
-url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/vel'
+url = 'https://vine.openfoodnetwork.org.au/api/v1/my-team-audit-items/aspernatur'
 headers = {
   'Authorization': 'Bearer {YOUR_API_TOKEN}',
   'Content-Type': 'application/json',