Status
- Specification DONE
- Apiary DONE
- JSON Schema request SPECS
- JSON Schema response SPECS
Purpose
This WS is designed to create new Substance (post).
APIary
Input parameters
- name
- name_original
- sctid
Authorize
- Verify the validity of access token
- Check user scope (scope = 'substanse:write') in order to perform this action
- In case error - generate 401 response
Validate request (JSON schema)
Validate request using JSON schema (link !!! TBD)
Create new Substance
- Create new record in innms with status INACTIVE
- Fill data
Destination | Source |
---|---|
id | |
name | $.name |
name_original | $.name_original |
sctid | $.sctid |
is_active | TRUE |
inserted_at | :timestamp |
inserted_by | user_id |
updated_at | :timestamp |
updated_by | user_id |
Prepare & return response data structure
- Fill response WS data structure
- Validate response using JSON schemas (link)
- Return 422 with list of validation errors in case validation fails (422 EView) (!!! TBD)