Stablev0.3.1Public version
The public version of the API misses the following (essential) files:
.env
node_modules/
Start the NestJS server locally with the following command:
Start the service
npm install
npm run start:dev
Debug the service
npm install
npm run start:debug
Run PETA Cronjob manually
npm run get:peta
Build the service
npm install
npm run build
npm run start
Ideally deploy the API with the Dockerfile included in the project.
openapi: 3.0.0
paths:
/v0/grades/backend:
post:
operationId: GradesController_checkBarcode
parameters: []
requestBody:
required: true
description: The barcode to be checked
content:
application/json:
schema:
$ref: '#/components/schemas/BarcodeDto'
responses:
'201':
description: Request returned a positive result.
content:
application/json:
schema:
$ref: '#/components/schemas/backendResponseDto'
'400':
description: Input Error / Bad Request.
'500':
description: Internal Server Error.
tags:
- Grades
/v0/ingredients/{ingredients}:
get:
operationId: IngredientsController_getIngredients
parameters:
- name: ingredients
required: true
in: path
schema:
type: string
- name: translate
required: true
in: query
schema:
type: boolean
responses:
'200':
description: Request returned a positive result.
'500':
description: Internal Server Error.
'503':
description: >-
Service Unavailable. Translation service is unavailable. Try again
with disabled translation (Results might vary). Add flag
?translate=false to the request.
tags:
- Ingredients
/v0/product/{barcode}:
post:
operationId: ProductController_getProductDetails
parameters:
- name: barcode
required: true
in: path
schema:
type: string
responses:
'200':
description: Request returned a positive result.
'400':
description: Input Error / Bad Request.
'404':
description: Specified product is not in the database.
'500':
description: Internal Server Error.
tags:
- Product Information
/v0/peta/{type}:
get:
operationId: PetaController_getPetaByType
parameters:
- name: type
required: true
in: path
schema:
type: string
responses:
'200':
description: Request returned a positive result.
'400':
description: Input Error / Bad Request.
'404':
description: Specified tyoe is not available.
'500':
description: Internal Server Error.
tags:
- Peta
info:
title: Veganify API
description: API for checking if products and ingredients are vegan
version: 0.3.1
contact:
name: FrontendNetwork
url: https://veganify.app
email: info@philip.media
license:
name: MIT
url: https://opensource.org/licenses/MIT
tags: []
servers:
- url: https://api.veganify.app
description: Production server
- url: https://api.staging.veganify.app
description: Staging server
components:
schemas:
BarcodeDto:
type: object
properties:
barcode:
type: string
description: The barcode to be checked
example: '4066600204404'
required:
- barcode
backendResponseDto:
type: object
properties:
barcode:
type: string
description: The barcode requested
example: '12345678'
name:
type: string
description: The name of the product
example: Paulaner Spezi Zero
grade:
type: string
description: The grade of the product
example: B
required:
- barcode
- name
- grade
externalDocs:
description: Veganify API Documentation
url: https://frontendnet.work/veganify-api
The following endpoints are available within the veganify.app API:
https://api.veganify.app/v0/grades/backend
https://api.veganify.app/v0/ingredients/{ingredientslist}
https://api.veganify.app/v0/peta/crueltyfree
https://api.veganify.app/v0/product/{barcode}
The following endpoints are currently unavailable within the veganify.app API:
https://api.veganify.app/v0/peta/veganapproved
The API documentation can be found at one of the following locations: