diff --git a/docs/ApiValidationRules.md b/docs/ApiValidationRules.md index c769c31..9cf2073 100644 --- a/docs/ApiValidationRules.md +++ b/docs/ApiValidationRules.md @@ -97,6 +97,13 @@ If a validation rule fails the call should return 400 (Bad request) including an | evaluation | 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 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. 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 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 | | 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 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. +#### Required fields + +The id field is required, missing fields will not be updated. + ## /times DELETE 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. 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