Coder Social home page Coder Social logo

haccp_builder_be's Introduction

README

POST "/api/v1/companies" Required Parameters:

  {
    company:
      {
        name: 'a name as a string',
        email: 'a string that is an email address',
        password: 'a string, encryption/auth not finalized',
      }
  }

Successful POST: status: 200, body:

  {
  id: integer
  }

Failed POST: status: 500

PUT "/api/v1/companies/:id" Parameters:

 {
   company:
     {
     name: 'a new name'
     }
  }

Successful PUT: status: 200, body: The company object with the updated attributes

POST "/api/v1/products/:id/ingredients" Parameters:

{
 ingredient:
   {
     name: string,  (required)
     receiving_from: string, (required)
     receiving_letter: boolean, (defaults to false)
     receiving_dna: boolean, (defaults to false)
     receiving_other: string, (defaults to empty string)
     receiving_hazard_bio: boolean, (defaults to false)
     receiving_hazard_chem: boolean, (defaults to false)
     receiving_hazard_phys: boolean, (defaults to false)
     receiving_hazard_handling: string, (defaults to empty string)
     storage_type: string, (required)
     storage_dna: boolean, (defaults to false)
     storage_other: string, (defaults to empty string)
     storage_hazard_bio: boolean, (defaults to false)
     storage_hazard_chem: boolean, (defaults to false)
     storage_hazard_phys: boolean, (defaults to false)
     storage_hazard_handling: string, (defaults to empty string)
     preparation_method: string, (required)
     preparation_dna: boolean, (defaults to false)
     preparation_other: string, (defaults to empty string)
     preparation_hazard_bio: boolean, (defaults to false)
     preparation_hazard_chem: boolean, (defaults to false)
     preparation_hazard_phys: boolean, (defaults to false)
     preparation_hazard_handling: string (defaults to empty string)
     packaging_method: string, (required)
     packaging_dna: boolean, (defaults to false)
     packaging_other: string, (defaults to empty string)
     packaging_hazard_bio: boolean, (defaults to false)
     packaging_hazard_chem: boolean, (defaults to false)
     packaging_hazard_phys: boolean, (defaults to false)
     packaging_hazard_handling: string (defaults to empty string)
    }
   }

Successful POST: status: 200, body:

      {
        id: ingredient_id (integer)
       }

Failed POST: status: 500, body:

      {
        error: "Unable to create ingredient"
       }

PUT "/api/v1/ingredients/:id" Parameters:

          {
            ingredient:
                        {
                          name: "new name" (can be any of the listed fields, as many as desired)
                         }
           }

Successful PUT: status: 200, body:

     {
       id: ingredient.id
     }

Failed PUT: status: 500, body:

       {
         error: "Unable to update ingredient"
       }

haccp_builder_be's People

Contributors

lucasalderfer avatar benjaminpaige avatar

Watchers

James Cloos avatar Colin Armstrong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.