Recisphere API Documentation

Complete reference for the Recisphere backend API endpoints

Base URL

https://api.recisphere.com

Authentication

Most endpoints require authentication. Include the JWT token in the Authorization header:

Authorization: Bearer <your-jwt-token>

Recipes

GET /api/v1/recipes

Get all recipes

Headers:

  • Accept-Language - Language preference (optional, e.g., "en")

GET /api/v1/recipes/{id}

Get a specific recipe by ID

Parameters:

  • id - Recipe ID (integer)

Headers:

  • Accept-Language - Language preference (optional)

GET /api/v1/recipes/search/{keywords}

Search recipes by keywords

Parameters:

  • keywords - Search terms (string)

Headers:

  • Accept-Language - Language preference (optional)

POST /api/v1/recipes/recipe

Create a new recipe (requires authentication)

Request Body:

{
  "name": "Recipe Name",
  "description": "Description",
  "sourceURL": "https://example.com",
  "active": true,
  "prepTime": 30,
  "cookTime": 45,
  "recipeYield": 4
}

POST /api/v1/recipes/recipes

Create multiple recipes in bulk (requires authentication)

Request Body:

[{
  "name": "Recipe 1",
  "description": "Description 1",
  "active": true,
  "prepTime": 30,
  "cookTime": 45,
  "recipeYield": 4
}]

PUT /api/v1/recipes/{id}

Update an existing recipe (requires authentication)

Parameters:

  • id - Recipe ID (integer)

Request Body:

Same format as POST /api/v1/recipes/recipe

Authentication

POST /api/auth/facebook

Login with Facebook OAuth token

Request Body:

{
  "facebookToken": "string",
  "name": "string",
  "email": "string"
}

Response:

{
  "success": true,
  "token": "jwt_token_here",
  "user": {
    "id": 1,
    "name": "User Name",
    "email": "user@email.com"
  }
}

Utility

GET /api/v1/recipes/ping

Health check endpoint

Response:

"pong"

GET /api/v1/recipes/debug/{id}

Get raw recipe data for debugging

Parameters:

  • id - Recipe ID (integer)

Recipe Response Format

Recipe objects have the following structure:

{
  "id": 1,
  "name": "Recipe Name",
  "description": "Recipe description",
  "sourceURL": "https://example.com",
  "active": true,
  "prepTime": 30,
  "cookTime": 45,
  "recipeYield": 4,
  "recipeCategory": "Main Course",
  "recipeCuisine": "Italian",
  "notes": ["Note 1", "Note 2"],
  "recipeIngredients": ["Ingredient 1", "Ingredient 2"],
  "keywords": ["keyword1", "keyword2"],
  "recipeInstructions": [],
  "images": [],
  "videos": []
}

Error Handling

Error responses include HTTP status codes and error details:

{
  "success": false,
  "error": "Error description",
  "code": "ERROR_CODE",
  "timestamp": "2024-12-20T10:30:00Z"
}

Rate Limiting

API requests are limited to 1000 requests per hour per IP address.