Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

Required parameters are marked with "*"

...

Purpose*

This WS allows to update end_date for contracts in case legal entity was merged and can't sign new contract.

...

Expand
titleRequest example
Code Block
{
  "end_date": "2018-12-31"
}

Authorize*

  1. Verify the validity of access token

    1. in case of error return 401 ('Access denied')

  2. Check user scope contract:update in order to perform this action

    1. in case of error generate 401 response ('Invalid scopes')

Request to process the request using a token in the headers

Headers*

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

...

Request data validation*

Validate User

  1. Extract legal_entity_id (client_id) from token.

    1. Check client_id=nhs_legal_entity_id

      1. in case of error return 403 "User is not allowed to perform this action"

Validate contract ID

  • Check contract.id exists

    • in case error return 404 - "Contract is not found"

...