added required fields

This commit is contained in:
Daniel Schick 2024-02-02 13:29:01 +01:00
parent 6bc57cf31d
commit 4e34a536c7

View File

@ -97,6 +97,13 @@ If a validation rule fails the call should return 400 (Bad request) including an
| evaluation | may not be set | | evaluation | may not be set |
| evaluation_message | may not be set | | evaluation_message | may not be set |
#### Required fields
* eta / etd (depending on value of type: 1: eta, 2: etd, 3: both)
* type
* ship_id
* arrival_berth_id / departure_berth_id (depending on type, see above)
* assigned participant for agency
## /shipcall PUT ## /shipcall PUT
1. The call may only be performed by a user belonging to participant group type BSMD. 1. The call may only be performed by a user belonging to participant group type BSMD.
@ -105,6 +112,10 @@ In other words: no setting the agency and editing the record by a member of the
3. See value rules in /shipcall POST. Exception: Canceled may be set but only if not already set. 3. See value rules in /shipcall POST. Exception: Canceled may be set but only if not already set.
4. A cancelled shipcall may not be changed (is logical delete) 4. A cancelled shipcall may not be changed (is logical delete)
#### Required fields
The id field is required, missing fields will not be updated.
## /times POST ## /times POST
1. A new dataset may only be created by a user _not_ belonging to participant group BSMD. 1. A new dataset may only be created by a user _not_ belonging to participant group BSMD.
@ -125,12 +136,50 @@ In other words: no setting the agency and editing the record by a member of the
| remarks, berth_info | must be <= 512 chars | | remarks, berth_info | must be <= 512 chars |
| participant_type | must not be BSMD | | participant_type | must not be BSMD |
#### Required fields
This depends on the shipcall and participant type:
##### Incoming
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
eta_berth, shipcall_id, participant_id, participant_type
TERMINAL:
operations_start, shipcall_id, participant_id, participant_type
##### Outgoing
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
etd_berth, shipcall_id, participant_id, participant_type
TERMINAL:
operations_end, shipcall_id, participant_id, participant_type
##### Shifting
AGENCY, PILOT, PORT_AUTHORITY, MOORING, TUG:
eta_berth, etd_berth, shipcall_id, participant_id, participant_type
TERMINAL:
operations_start, operations_end, shipcall_id, participant_id, participant_type
## /times PUT ## /times PUT
1. A dataset may only be changed by a user belonging to the same participant as the times dataset is referring to. 1. A dataset may only be changed by a user belonging to the same participant as the times dataset is referring to.
2. See reference and value checking as specified in /times POST. 2. See reference and value checking as specified in /times POST.
#### Required fields
The id field is required, missing fields will not be updated.
## /times DELETE ## /times DELETE
1. A dataset may only be changed by a user belonging to the same participant as the times dataset is referring to. 1. A dataset may only be changed by a user belonging to the same participant as the times dataset is referring to.
@ -155,7 +204,8 @@ In other words: no setting the agency and editing the record by a member of the
1. The call may only be performed by a user belonging to participant group type BSMD. 1. The call may only be performed by a user belonging to participant group type BSMD.
2. The IMO number field may not be changed since it serves the purpose of a primary (matching) key. 2. The IMO number field may not be changed since it serves the purpose of a primary (matching) key.
3. See value rules in /ship POST. 3. See value rules in /ship POST
4. The id field is required, missing fields will not be updated
## /ship DELETE ## /ship DELETE