ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Purpose

This WS is designed to allow NHS employee with assigned appropriate scopes to get DRACS Marriage Act details.

Key points 

  1. This is a graphQl query method used in Administration panel only.

  2. Only authenticated and authorized NHS employee with appropriate scope can get DRACS Marriage Act details.

Specification

 dracsMarriageAct
  "Reads a single `DracsMarriageAct` using its globally unique ID."
  dracsMarriageAct(id: ID!): DracsMarriageAct
type DracsMarriageAct implements Node {
  id: ID!
  databaseId: UUID!
  arRegDate: Date
  arRegNumber: String
  opDate: Date
  arOpName: String
  regNumb: String
  composeDate: String
  composeOrg: String
  isRestore: Int
  husbandOldSurname: String
  husbandSurname: String
  husbandName: String
  husbandPatronymic: String
  husbandNumident: String
  husbandDateBirth: String
  husbandCitizenship: Int
  husbandCitizenshipAnother: String
  husbandDocType: String
  husbandDocName: String
  husbandSeriesNumb: String
  husbandDocDate: String
  husbandDocOrgName: String
  husbandBirthState: String
  husbandBirthRegion: String
  husbandBirthDistrict: String
  husbandBirthLocalityType: String
  husbandBirthLocality: String
  husbandState: String
  husbandRegion: String
  husbandDistrict: String
  husbandLocalityType: String
  husbandLocality: String
  husbandStreet: String
  husbandHouse: String
  husbandBuildingPart: String
  husbandBuildingPartType: String
  husbandApartment: String
  wifeOldSurname: String
  wifeSurname: String
  wifeName: String
  wifePatronymic: String
  wifeNumident: String
  wifeDateBirth: String
  wifeCitizenship: Int
  wifeCitizenshipAnother: String
  wifeDocType: String
  wifeDocName: String
  wifeSeriesNumb: String
  wifeDocDate: String
  wifeDocOrgName: String
  wifeBirthState: String
  wifeBirthRegion: String
  wifeBirthDistrict: String
  wifeBirthLocalityType: String
  wifeBirthLocality: String
  wifeState: String
  wifeRegion: String
  wifeDistrict: String
  wifeLocalityType: String
  wifeLocality: String
  wifeStreet: String
  wifeHouse: String
  wifeBuildingPart: String
  wifeBuildingPartType: String
  wifeApartment: String
}

Authorize

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'person:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: person:read') in case of invalid scope(s)

Validate legal entity

  • Extract client_id from token.

  • Check legal entity status (status = ACTIVE)

    • In case of error - return 409 ('client_id refers to legal entity that is not active')

  • Check client type (type = NHS)

    • In case of error - return 403 ('You don't have permission to access this resource')

Validate request

Validate $.id

Check id is ID from mimir.dracs_marriage_acts

  • in case of error, return 404, "Such Marriage Act doesn't exist"

Service logic

  1. Get Marriage Act data from mimir.dracs_marriage_acts by id

  2. Render a response according to specification.

  • No labels