Skip to content

API to check for the existence of NSO codes in a google sheets database.

License

Notifications You must be signed in to change notification settings

kenxben/regsan-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

regsan-check

Simple go API to check for the existence of NSO codes in a google sheets database.

NSO and sanitary registry in Ecuador

Sanitary Obligatory Notification (NSO) is the main government requirement to sell cosmetic, health and food products in Ecuador. It is also known Sanitary Registry and it is issued by the sanitary authority (ARCSA).

Counterfeit products

NSO code must be shown in the product label, therfore, false and counterfeit productos include false NSO codes or no codes at all. To verify the validy of a NSO code, buyers and consumers can check the official ARCSA data bases. Since the government agency's webpage may be hard to browse, a simple api endpoint may help to make this information easily accesible to the public.

Usage

Open this example in your browser and change the last part in the url to the NSO code in the product you would like to check.

There are two types of queries:

  • Search by NSO code. Returns a list with one exact match.
https://regsan-check.herokuapp.com/check-nso?nso=<product NSO code>
  • Search by keywords present in name or brand. Returns a list of results with the top 5 matches.
https://regsan-check.herokuapp.com/check-nso?producto=<product keywords>

If any of the searches fail, an error message will be returned instead of a list of results.

Currently, the response body format is:

{
    "resultados":[
        <list of results>
    ],
    "metadata": {}
}

The api

Written in Go (Golang) as a learning (toy) project and deployed in Heroku. It uses a Google Service Account (gserviceaccount) to access data in a Google Spreadsheet and serve the data in json format. Do not use this endpoint or data for legal or official purposes. Since this is a learning project, data is not guaranteed to be veracius or updated. If you really doubt the truthfulness of a product consult the official government agency ARCSA

Data

Currently, only cosmetic products data is included in a mirror database used for backend of this api. The api response, in case of existing NSO codes includes these variables:

  • NSO: product NSO code or sanitary registry
  • NombreProducto: Product name
  • MarcaProducto: Brand name
  • Titular: NSO holder (person or company)
  • FechaEmision: Issue date
  • FechaVigencia: Validity date
  • TipoProducto: Product type (cosmetic, drug, etc.)

About

API to check for the existence of NSO codes in a google sheets database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages