/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
Properties of a REST API method document
Purpose
This WS is designed to get declaration requests list.
Key features
Only authenticated and authorized employee with appropriate scope can get declaration requests list.
The service returns only a declaration requests that were created in the same legal entity as the user
Method returns shortened declaration request details, to obtain full information - use Get Declaration request by ID method.
Logic
Extract
client_id
from token. Filter declaration requests byclient_id
(legal_entity_id
)Filter declaration requests to show only originated by legal entity or shared with legal entity (
channel
== MIS ORis_shareable
== True)Filter declaration requests by search params (If
legal_entity_id
is differ fromclient_id
in token - empty list must be returned)Render found declaration requests with shortened details according to specification
Configuration parameters
N/A
Dictionaries
N/A
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | |||||
2 |
Request structure
See on API-specification
Headers
Request data validation
Authorize
Verify the validity of access token
in case of error - 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 = 'declaration_request:read')
return 403 (“Your scope does not allow to access this resource. Missing allowances: declaration_request:read”) in case of invalid scope(s)
Processing
N/A
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 | 200 | Response |
| ||
3 | 401 | Access token validation failed | |||
4 | 401 | Invalid access token | |||
5 | 403 | Invalid scope | |||
6 | 403 | Your scope does not allow to access this resource. Missing allowances: declaration_request:read | |||
7 | Специфічні | ||||
8 |
Post-processing processes
N/A