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

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

« Previous Version 18 Next »

Status

  • Specification DONE
  • Apiary DONE
  • JSON Schema request SPECS
  • JSON Schema response SPECS

Purpose

This WS is designed to create new Substance (post).

APIary 

create-substance

Input parameters

  • name
  • name_original
  • sctid

Authorize

  1. Verify the validity of access token
  2. Check user scope (scope = 'substanse:write') in order to perform this action
    1. In case error - generate 401 response

Validate request (JSON schema)

Validate request using JSON schema (link !!! TBD)

Create new Substance

  1. Create new record in innms with status INACTIVE
  2. Fill data
Destination
Source
id
name$.name
name_original$.name_original
sctid$.sctid
is_active TRUE
inserted_at:timestamp
inserted_byuser_id
updated_at:timestamp
updated_byuser_id

Prepare & return response data structure

  1. Fill response WS data structure 
  2. Validate response using JSON schemas (!!! TBD)
    1. Return 422 with list of validation errors in case validation fails (422 EView) (!!! TBD)
  • No labels