Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

step

postman call

postman response

content in front-end

STEP 1: login

POST

http://localhost:3000/api/v2/users/sign_in?user[email]=soft.dave99@gmail.com&user[password]=123456

Code Block
{
    "user_id": 368,
    "email": "soft.dave99@gmail.com",
    "authentication_token": "vB4J9TJMLGnZnV4DMZlvPTWimman1gxpo2AoechN--8EELxNTE4I6Ih5Aa--dmDINUcdLkimLXnlrnKJhA=="
}

STEP 2: get beneficiary categories

GET
http://localhost:3000/api/v2/beneficiary_categories

header: {'X-User-Token': 'Ppteex1dWbEcnNC311NFOrJqNHP98zN2ccMpWEei--ixL50J7uZsnprbOu--WbOcz50zaS48JzyXXZHS9A==',
'X-User-Email': ‘soft.dave99@gmail.com’}

manage beneficiary categories page

STEP 3: get custom fields from a beneficiary category

GET
http://localhost:3000/api/v2/custom_fields

header: {'X-User-Token': 'Ppteex1dWbEcnNC311NFOrJqNHP98zN2ccMpWEei--ixL50J7uZsnprbOu--WbOcz50zaS48JzyXXZHS9A==',
'X-User-Email': ‘soft.dave99@gmail.com’}

Image Added

STEP 4: create beneficiary

POST
http://localhost:3000/api/v2/beneficiaries

body: { "beneficiary": { "name": "JackPython New 123", "date_of_birth": "13-05-1899", "address": "Paris", "latitude": "48.856613", "longitude": "2.352222", "beneficiary_type_id": 1, "owner_id": 237 }, "project_ids": [572], "custom_fields": {"190": "test.john@gmail.com", "173": "1234567890", "103": "10: "3256895684"16", "322": "2022-03-12"}, "sub_ratios": {"11": [35, 36]}, "beneficiary_category_ids": [294] }



header: {'X-User-Token': 'Ppteex1dWbEcnNC311NFOrJqNHP98zN2ccMpWEei--ixL50J7uZsnprbOu--WbOcz50zaS48JzyXXZHS9A==',
'X-User-Email': ‘soft.dave99@gmail.com’}

Image RemovedImage Added

create beneficiary page - using that beneficiary category

Image RemovedImage AddedImage Added

STEP 5: show beneficiary

GET
http://localhost:3000/api/v2//beneficiaries/:id

header: {'X-User-Token': 'Ppteex1dWbEcnNC311NFOrJqNHP98zN2ccMpWEei--ixL50J7uZsnprbOu--WbOcz50zaS48JzyXXZHS9A==',
'X-User-Email': ‘soft.dave99@gmail.com’}

beneficiary profile page

...