You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.6 KiB

7 years ago
7 years ago
7 years ago
7 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Breakups
  2. Creating a payment chain for bill splitting needs
  3. api domain: `https:\\breakups.herokuapp.com\`
  4. ## API Call Documentations
  5. | Type | Call | Request | Response |
  6. |:-----|:-----|:--------|:---------|
  7. | `GET` | `help` | - | URL to github repository |
  8. | `POST` | `total` | [standard](#standard) / [email](#email) | `{ "total": 200 }` |
  9. | `POST` | `perPerson` | [standard](#standard) / [email](#email) | `{ "perPerson": 30 }` |
  10. | `POST` | `oweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  11. | `POST` | `sortedOweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  12. | `POST` | `paymentChain` | [standard](#standard) / [email](#email) | [chain](#chain) |
  13. | `POST` | `emailPaymentChain` | [email](#email) | `["Email sent to user1@domain.com", "Email sent to user2@domain.com"]` |
  14. ## Expected Request / Response
  15. ### standard
  16. ```JSON
  17. {
  18. "users": [
  19. {
  20. "name": "Person1",
  21. "amount": 100
  22. },
  23. {
  24. "name": "Person2",
  25. "amount": 50
  26. },
  27. {
  28. "name": "Person3",
  29. "amount": 30
  30. }
  31. ]
  32. }
  33. ```
  34. ### chain
  35. ```JSON
  36. [
  37. {
  38. "from": "Person2",
  39. "to": "Person3",
  40. "amount": 10
  41. },
  42. {
  43. "from": "Person3",
  44. "to": "Person1",
  45. "amount": 40
  46. }
  47. ]
  48. ```
  49. ### email
  50. ```JSON
  51. {
  52. "users": [
  53. {
  54. "name": "Person1",
  55. "email": "person1@domain.com",
  56. "amount": 100
  57. },
  58. {
  59. "name": "Person2",
  60. "email": "person2@domain.com",
  61. "amount": 50
  62. },
  63. {
  64. "name": "Person3",
  65. "email": "person3@domain.com",
  66. "amount": 30
  67. }
  68. ],
  69. "mixmax-api": "your-mixmax-api-key"
  70. }
  71. ```