-
Notifications
You must be signed in to change notification settings - Fork 0
Rest api documentation
x1s edited this page Feb 14, 2012
·
8 revisions
- Service-Login
- Service-Profiles
- Service-Gategories/Labels
- Service-Garages
- Service-Products
- Service-Photos
- Service-Take One
- Service-Bids
| Method | Auth? | URL |
|---|---|---|
| GET | false | /profile/:profile |
| Method | Auth? | URL |
|---|---|---|
| GET | false | /profile/:email?validate=true |
{"error":"taken"}
{"error":"invalid email"}
{"error":"invalid profile"}
| Method | Auth? | URL |
|---|---|---|
| POST | true | /profile |
| Method | Auth? | URL |
|---|---|---|
| PUT | true | /profile/:profile |
| Method | Auth? | URL |
|---|---|---|
| DELETE | true | /profile/:profile |
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /category/ | get all categories |
| GET | false | /category?idProduct=:idProduct | get all product's categories |
| GET | false | /category/:garage | get all garage's categories |
| POST | true | /category | params: user, category, idProduct. save a new category to some product |
| DELETE | true | /category/:id?user=:user | remove some user's category if not associated with any product or garage |
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /garage/ | get all garages |
| GET | get different results | /garage/:garage | get some garage's information |
| POST | true | /garage | params: . save a new garage |
| PUT | true | /garage/:garage | params: . update specific garage's info |
| DELETE | true | /garage/:garage | remove the garage and all it's dependencies |
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /product/ | get all products |
| GET | false | /product?cateogry=:category | get all products given a category |
| GET | false | /product/:garage | get all garage's products |
| POST | true | /product | params: valor_esperado, descricao, nome, id_estado, id_pessoa, categories. save a new product to some product |
| PUT | true | /product/:id | params: valor_esperado, descricao, nome, id_estado, id_pessoa categories. update some specific product |
| DELETE | true | /product/:id | remove some product |
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /photo?photo=:photo | get specific photo info |
| GET | false | /photo/:product | get all product's photos |
| POST | true | /photo | params: photo/product params. save a new photo to a product |
| DELETE | true | /photo/:photo | remove specific photo |
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /takeone/:garage | download the garage's default pdf |
| PUT | true | /takeone/:garage | params: . create specific pdf with personal information |