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

RC_(GraphQL) Get Party's data (DMS)

Purpose

This WS is designed to allow NHS employees with appropriate scopes to get Party details.

Key points  

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

  2. Only authenticated and authorized employee with appropriate scope can get Party details data.

  3. User can filter list by search params

 

""" "Reads a single `Party` using its globally unique ID." party(id: ID!): Party """
""" Personal information of employee, ex. fisrt name, last name etc. """ type Party implements Node { "The ID of an object" id: ID! "Primary key identifier from the database" databaseId: UUID! "Employee's first name." firstName: String! @fake(locale: "uk", method: "name.firstName", args: [1]) "Employee's last name." lastName: String! @fake(locale: "uk", method: "name.lastName", args: [1]) "Employee's second name, if exists." secondName: String @fake(locale: "uk", method: "name.firstName", args: [0]) "employee's birth date." birthDate: Date! @fake(locale: "uk", method: "date.past", args: [100]) "Employee's gender, is choosen from dictionary. The value should be present in the `GENDER` dictionary." gender: String! "Personal phone number." phones: [Phone]! "National person identifier." taxId: String! "Flag to show whether person rejected to have taxId" noTaxId: Boolean "Party identification documents." documents: [PartyDocument]! "Party self-description" aboutMyself: String "Amount of time during which a party holds its career, in years." workingExperience: Int "Cummulative verification status of the party" verificationStatus: PartyVerificationStatus! "Details about cummulative verification status of the party" verificationDetails: PartyVerificationDetail }

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 = 'party:read')

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

Validate legal entity

  • Extract client_id from token.

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

    • in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: party:read”)

  • Check client type (type = NHS)

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

  • Check that party exists in prm database

    • in case of error - return 404 ('Party not found')

Service logic

  1. Get party by id from parties table

  2. Render a response according to specification.

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