apiary.apib in dune-api-1.0.2 vs apiary.apib in dune-api-1.1.0

- old
+ new

@@ -1,10 +1,10 @@ FORMAT: 1A HOST: https://www.dune-investissement.fr/api/ -# dune-investissement -Here you will find how to integrate an application with Dune. Check our [Dashboard source code](https://github.com/dune/dune-dashboard) for a real use case. +# www.dune-investissement.fr +Here you will find how to integrate an application with www.dune-investissement.fr. Check our [Dashboard source code](https://github.com/dune/dune-dashboard) for a real use case. ## Allowed HTTPs requests: - `POST` - Creates or updates a resource - `PUT` - Updates a resource @@ -33,12 +33,12 @@ ### Create an access token [POST] + Parameters - + email (required, string) ... Your dune account email address - + password (required, string) ... Your dune account password + + email (required, string) ... Your www.dune-investissement.fr account email address + + password (required, string) ... Your www.dune-investissement.fr account password + Request + Header @@ -595,21 +595,21 @@ {} + Response 403 (application/json) -# Group Investments +# Group Contributions -## /investments +## /contributions -### List investments [GET] +### List contributions [GET] Requires the user to be an admin. + Parameters - + query (optional, string) ... Search for investments + + query (optional, string) ... Search for contributions + between_values (optional, object) ... Filter between values + project_id (optional, string) ... Filter by project id + Request @@ -636,11 +636,11 @@ + Response 200 (application/json) { - "investments":[ + "contributions":[ { "id":1714, "project_id":62, "user_id":1, "reward_id":226, @@ -687,11 +687,11 @@ + Response 401 (application/json) {} -## /investment/{id}/confirm +## /contribution/{id}/confirm ### Manually Confirm a Contibution [PUT] Requires the user to be an admin. @@ -711,11 +711,11 @@ + Response 401 (application/json) {} -## /investment/{id}/pendent +## /contribution/{id}/pendent ### Set a Contibution as Pending [PUT] Requires the user to be an admin. @@ -735,13 +735,13 @@ + Response 401 (application/json) {} -## /investment/{id}/refund +## /contribution/{id}/refund -### Refund an Investment [PUT] +### Refund a Contribution [PUT] Requires the user to be an admin. + Request @@ -759,17 +759,17 @@ + Response 401 (application/json) {} -## /investment/{id}/hide +## /contribution/{id}/hide -### Hide an Investment [PUT] +### Hide a Contribution [PUT] Requires the user to be an admin. -It will change the investment state to `refunded_and_canceled`. +It will change the contribution state to `refunded_and_canceled`. + Request + Header @@ -785,13 +785,13 @@ + Response 401 (application/json) {} -## /investment/{id}/cancel +## /contribution/{id}/cancel -### Cancel an Investment[PUT] +### Cancel a Contribution[PUT] Requires the user to be an admin. + Request @@ -808,13 +808,13 @@ {} + Response 401 (application/json) -## /investments/{id} +## /contributions/{id} -### Update an Investment [PUT] +### Update a Contribution [PUT] Requires the user to be an admin. + Request @@ -824,11 +824,11 @@ Authorization: Token your-token-here + Body { - "investment":{ + "contribution":{ "value":"10.0" } } + Response 204 (application/json) @@ -850,11 +850,11 @@ ] } } -### Fetch Investment information [GET] +### Fetch Contribution information [GET] Requires the user to be an admin. + Request @@ -865,11 +865,11 @@ + Response 200 (application/json) { - "investment": { + "contribution": { "id":1714, "project_id":62, "user_id":1, "reward_id":226, "value":"25.0", @@ -905,11 +905,11 @@ "can_push_to_trash":true } } } -### Destroy an Investment [DELETE] +### Destroy a Contribution [DELETE] Requires the user to be an admin. + Request @@ -1754,10 +1754,10 @@ { "reward":{ "id":277, "project_id":75, "minimum_value":"1000.0", - "maximum_investments":null, + "maximum_contributions":null, "description":"Foo Bar Lorem", "created_at":"2014-01-09T02:36:38.297-06:00", "updated_at":"2014-01-10T18:44:53.686-06:00", "row_order":2, "days_to_delivery":20,