department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 201 forks source link

Build Model for View Representative #22636

Open cohnjesse opened 3 years ago

cohnjesse commented 3 years ago

Background

Now that we have researched the Lighthouse API and know that it will not work for our needs on View Representative we are ready to build out the model that will suit our needs better. The model will be fairly simple since much of the data we need is already either in the profile object or in the database already. The data we will most likely be working with is:

  1. poa_code
  2. representative_first_name
  3. representative_last_name
  4. representative_email
  5. representative_phone

Tasks

jason-gcio commented 3 years ago
{
  "data": {
    "id": null,
    "type": "claims_api_power_of_attorneys",
    "attributes": {
      "status": "updated",
      "date_request_accepted": null,
      "representative": {
        "service_organization": {
          "poa_code": "HelloWorld",
          "poa_type": "claims_agent",
          "poa_first_name": "Abe", // or null for VSOs
          "poa_last_name": "Lincoln", // or null for VSOs
          "organization_name": "Some Great Organization", // or null for claims agents & attorneys
          "phone_number": "555-555-5555",
        }
      },
      "previous_poa": null
    }
  }
}

https://developer.va.gov/explore/benefits/docs/claims?version=current