openapi: 3.0.1 info: title: Truck Appointments description: This is an OpenApi spec created for the truck appointment management APIs. These apis enable the creation and management of gate/truck appointments for imports, exports and empty containers. contact: name: APMT API Support url: https://developer.apmterminals.com/support/technical-support email: api.support@apmterminals.com license: name: APM Terminals BV url: https://developer.apmterminals.com/terms-and-conditions version: 1.0.0 servers: - url: 'https://api-stage.apmterminals.com/termpoint-tms' description : Stage Environment (Pre-Prod) - url: 'https://api.apmterminals.com/termpoint-tms' description : Production Environment security: - Authorization: [] paths: /api/Login/AuthenticateUser: post: tags: - Login description: Used to Authenticate user credentials and provide Access Tokens in return parameters: - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/AuthenticateRequest' example: {"AuthorizationKey":"dfgthjukiurtgergerefgt"} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": {"AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6Im1vYnRydWNrZXIiLCJuYmYiOjE1NzM2NDA5NTEsImV4cCI6MTU4NDAwODk1MSwiaWF0IjoxNTczNjQwOTUxLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAifQ.ZogMTA3_GbPoz9uvSc2VYyZHBvZEiLmKzAw4ejS-ITY","UserMessages": []}}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/GetAvailableTimeSlots: post: tags: - MyAppointment description: Get list of available time slots based on input criteria parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/ApptAvailableTimeSlots' example: {"GateAppt_Dt":"2019-07-26T00:00:00","ApptType_Cd": "IP","GateAppt_Id":"50772","GateApptStart_Tm":"08:00","Container_Num":"TRIU8051645"} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": { "AvailableSlots": [{"SlotSchedule_Id": "50003","Slot_Tm": "07:00 - 08:00 (900)"},{"SlotSchedule_Id": "50004","Slot_Tm": "08:00 - 10:00 (1000)"},{"SlotSchedule_Id":"50005","Slot_Tm": "10:00 - 12:00 (1000)"},{"SlotSchedule_Id": "50006","Slot_Tm": "12:00 - 14:00 (1000)"},{"SlotSchedule_Id": "50007","Slot_Tm": "14:00 - 16:00 (1000)"},{"SlotSchedule_Id": "50008","Slot_Tm": "16:00 - 20:00 (1000)"}]},"UserMessages": []}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/PostCancelAppointment: post: tags: - MyAppointment description: Cancel single or multiple appointments parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/BaseCancelApptRequest' example: {"GateAppt_Id": "50683"} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": null,"UserMessages": [{"MessageNo": 800002,"MessageDescription": "Changes have been updated successfully.","MessageSeverity": 1}]}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/GetTruckerAppointments: post: tags: - MyAppointment description: Get all appointments for a trucker parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/MyAppointmentGetRequest' example: {"GateApptStart_DtTm": "2020-07-30T00:00:00","GateApptEnd_DtTm": "2019-07-30T00:00:00","ApptType_Cd": "IP, XD","TruckPlate_Nbr": "1109006, 1109015","ApptStatus_Cd": "C, W, R","CargoRef_Num": "NAM12340, NAM67890","Container_Num": "CMAU123456, CMAU789456"} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": {"TruckVisitAppointment": [{"TruckVisitAppt_Id": 48881,"GateAppt_Num": "001648","GateAppt_Dt": "2020-07-13T00:00:00","Slot_Tm": "16:00-20:00","DriverOwnChs_Flg": "N","DriverID_Num": "69086502F9FF","Driver_Nm": "ROGER SIMMONS","Gate_Id": "MOB GATE","TruckPlate_Nbr": "1069978","GateAppointment": [{"GateAppt_Id": 53151,"TruckVisitAppt_Id": 48881,"GateAppt_Num": "001648","GateAppt_Dt": "2020-07-13T00:00:00","Slot_Tm": "16:00-20:00","DriverOwnChs_Flg": "N","DriverID_Num": "69086502F9FF","Driver_Nm": "ROGER SIMMONS","TruckPlate_Nbr": "1069978","Gate_Id": "MOB GATE","ApptType_Cd": "IP","ApptType_Dsc": "IMPORT PICKUP","ApptStatus_Cd": "W","ApptStatus_Dsc": "TENTATIVE","Container_Num": "MSKU7893512","CargoRef_Num":"967711134","CargoRefType_Cd": "CON","CargoRefType_Dsc": "BOL","Line_Id": "MAE","Con_Cd": "20GP86","Ship_Cd": "C1E","Voy_Num": "908E","ErrSeverity_Ind": 2,"Modify_DtTm":"2020-07-06T09:22:00","GateAppointmentErr": [{"GateAppt_Id": 53151,"GateApptErr_Num": 140012,"GateApptErr_Dsc": "Driver is not registered with the Trucking Company","ErrSeverity_Ind": 2},{"GateAppt_Id": 53151,"GateApptErr_Num": 140302,"GateApptErr_Dsc":"Container is on Demurrage Hold. If Demurrage is not paid within Terminal deadline this appointment will be cancelled.","ErrSeverity_Ind": 2}]},{"GateAppt_Id": 53164,"TruckVisitAppt_Id": 48881,"GateAppt_Num": "001648","GateAppt_Dt": "2020-07-13T00:00:00","Slot_Tm": "16:00-20:00","DriverOwnChs_Flg": "N","DriverID_Num":"69086502F9FF","Driver_Nm": "ROGER SIMMONS","TruckPlate_Nbr": "1069978","Gate_Id": "MOB GATE","ApptType_Cd": "XD","ApptType_Dsc":"EXPORT DROPOFF","ApptStatus_Cd": "W","ApptStatus_Dsc":"TENTATIVE","Container_Num": "WFHU1146576","CargoRef_Num": "NAM3645690","CargoRefType_Cd": null,"CargoRefType_Dsc":"BOOK","Line_Id": "CMA","Con_Cd": "20GP86","Ship_Cd":"DALI","Voy_Num": "0PG3S","ErrSeverity_Ind": 2,"Modify_DtTm": "2020-07-06T09:22:00","GateAppointmentErr": [{"GateAppt_Id": 53164,"GateApptErr_Num": 140012,"GateApptErr_Dsc": "Driver is not registered with the Trucking Company","ErrSeverity_Ind": 2},{"GateAppt_Id": 53164,"GateApptErr_Num": 140050,"GateApptErr_Dsc":"Container mismatch Export requirements","ErrSeverity_Ind": 2}]}]}]},"UserMessages": []}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/GetGateAppointmentDetails: post: tags: - MyAppointment description: Get details of an appointment provided in Input parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/GateAppointmentRequest' example: '{"GateAppt_Id":"39641"}' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": {"GateAppointment":{"GateAppt_Id": 39277,"GateAppt_Num":"1945316","GateAppt_Dt": "2019-07-12 T00:00:00","GateApptStart_Tm": "07:00","GateApptEnd_Tm": "17:00","DriverOwnChs_Flg": "Y","DriverId_Num": "69086502F9FF","TruckPlate_Nbr": "1088650","ApptType_Cd": "XD","ApptType_Dsc": "EXPORT DROPOFF","ApptStatus_Cd": "W","ApptStatus_Dsc": "TENTATIVE","Container_Num":"TRIU8051645","CargoRef_Num": "CALB799088","CargoRefType_Cd": "BOOK","ShippingLine_Cd": "HMM","Con_Cd": "40RE96","Seal1_Num": "SN12345678","Seal2_Num":"NULL","Chassis_Num": "MKCZ345234","Genset_Num":"GNJQ123321","Hazmat_Flg": "N","Reefer_Flg": "Y","OD_Flg": "N","VGMSubmitted_Flg": "N","Available_Flg": "NULL","Position_On_Truck": 1,"Error_Severity": 2,"GateAppointmentErr": [{"GateAppt_Id": 53151,"GateApptErr_Num": 140012,"GateApptErr_Dsc": "Driver is not registered with the Trucking Company","ErrSeverity_Ind": 2},{"GateAppt_Id": 53151,"GateApptErr_Num": 140302,"GateApptErr_Dsc": "Container is on Demurrage Hold. If Demurrage is not paid within Terminal deadline this appointment will be cancelled.","ErrSeverity_Ind": 2}]}},"UserMessages": []}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/PostManageAppointment: post: tags: - MyAppointment description: Update fields of an appointment parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/TASManageAppointmentRequest' example: {"GateAppt_Id":50953,"GateAppt_Dt":"2020-07-30T00:00:00","GateApptStart_Tm":"07:00","DriverId_Num":"69086502F9FF","CargoRef_Num":"038VC0464272","ShippingLine_Cd":"MAE","DriverOwnChs_Flg":"Y","Container_Num":"FSCU6954495","Chassis_Num":"APMZ3453453","Genset_Num":"GEN12345","Con_Cd":"40GP86","Reefer_Flg":"N","Hazmat_Flg":"N","OD_Flg":"N","Seal1_Num":"S1","Seal2_Num":"SEAL2","ApptType_Cd":"XD","TruckPlate_Nbr":"1088650","CargoRefType_Cd":"BOOK","VGMSubmitted_Flg":"N","Position_On_Truck":1} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody":{"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm": "Mobile, Alabama"},"ResponseData": {"ConfirmedAppt": [],"TentativeAppt": [{"GateApptOutputId": 1,"Status": "Tentative appointment created.","GateAppt_DtTm": "07/30/2020 - 16:00 - 20:00","GateAppt_Num":"001648","Gate_Id": "MOB GATE","Container_Num": "MSKU7893512","EquipSize": "20GP86","CargoRef_Num": "967711134","ErrSeverity_Ind": 2,"GateApptMessages": {"Info": [],"Warning": ["140012 - Driver is not registered with the Trucking Company","140302 - Container is on Demurrage Hold. If Demurrage is not paid within Terminal deadline this appointment will be cancelled."],"Error": []}},{"GateApptOutputId": 2,"Status":"Tentative appointment created.","GateAppt_DtTm": "07/30/2020 - 16:00 - 20:00","GateAppt_Num": "001649","Gate_Id": "MOB GATE","Container_Num": "WFHU1146576","EquipSize": "20GP86","CargoRef_Num": "NAM3645690","ErrSeverity_Ind": 2,"GateApptMessages": {"Info": [],"Warning": ["140012 - Driver is not registered with the Trucking Company","140050 - Container mismatch Export requirements"],"Error": []}}],"DeclinedAppt": []},"UserMessages":[]}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} /api/MyAppointment/PostCreateAppointment: post: tags: - MyAppointment description: Create an appointment parameters: - $ref : '#/components/parameters/Termpoint-JWT' - $ref : '#/components/parameters/Consumer-Key' requestBody: content: application/json: schema: $ref: '#/components/schemas/TASCreateAppointmentRequest' example: {"GateAppt_Dt":"2020-07-30T00:00:00","GateApptStart_Tm":"07:00","DriverId_Num":"69086502F9FF","CargoRef_Num":"038VC0464272","ShippingLine_Cd":"MAE","DriverOwnChs_Flg":"Y","Container_Num":"FSCU6954495","Chassis_Num":"APMZ3453453","Genset_Num":"GEN12345","Con_Cd":"40GP86","Reefer_Flg":"N","Hazmat_Flg":"N","OD_Flg":"N","Seal1_Num":"S1","Seal2_Num":"SEAL2", "ApptType_Cd":"XD","TruckPlate_Nbr":"1088650","CargoRefType_Cd":"BOOK","VGMSubmitted_Flg":"N"} responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Response200' example: {"status": {"StatusCode": 200,"ReasonPhrase": "OK"},"responseBody": {"TerminalInfo": {"MTO_Cd": "APMMB","MTO_Nm":"Mobile, Alabama"},"ResponseData": {"ConfirmedAppt": [],"TentativeAppt": { "GateApptOutputId": 1,"Status": "Tentative appointment created.","GateAppt_DtTm": "07/30/2020 - 16:00 - 20:00","GateAppt_Num":"001648","Gate_Id": "MOB GATE","Container_Num": "MSKU7893512", "EquipSize": "20GP86","CargoRef_Num": "967711134","ErrSeverity_Ind": 2,"GateApptMessages": {"Info": [],"Warning": ["140012 - Driver is not registered with the Trucking Company","140302 - Container is on Demurrage Hold. If Demurrage is not paid within Terminal deadline this appointment will be cancelled."],"Error": []}},"DeclinedAppt": []},"UserMessages": []}} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Unauthorized' example : {"error": [{ "code": "ERR_GW_001", "message": "Token Validation Failed", "reason" : "Invalid certificate or expired token", "status" : "401"}] } '404': description: Not Found. content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "404", "message": "Not Found", "debugMessage": "Unable to resolve the path"} '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Exception' example : {"code": "405", "message": "Method Not Allowed", "debugMessage": "API verb used is Not Allowed"} components: parameters: Termpoint-JWT: name: Termpoint-JWT in: header description: An access token issued by Termpoint Authentication service.This will have the format JWT + {space} + {accessToken}. required: true style: simple explode: false schema: type: string Consumer-Key: name: Consumer-Key description: API key (Client Id) issued by Apigee. in: header required: true schema: type: string schemas: Exception: type: object properties: code: type: string description: Standard http code. message: type: string description: Standard http message with respect to http code. debugMessage: type: string description: Reason for the failure of message. Response200 : type: object properties: status: type : object properties: StatusCode: type: integer ReasonPhrase: type: string responseBody: type: object properties: TerminalInfo: type : object properties: MTO_Cd: type: string MTO_Nm: type: string ResponseData: type : object properties: Response : type : string description : this is the context specific response for the corresponding api call.Its fields may vary depending upon the api resourse being called. UserMessages: type: object properties : MessageNo : type : integer MessageDescription : type: string MessageSeverity: type : integer Unauthorized : type: string properties: error : type: object properties: code: type: string message: type: string reason: type : string status : type : string AuthenticateRequest: required: - authenticationKey type: object properties: authenticationKey: type: string additionalProperties: false MyAppointmentGetRequest: type: object properties: gateApptStart_DtTm: type: string nullable: true gateApptEnd_DtTm: type: string nullable: true apptType_Cd: type: string nullable: true truckPlate_Nbr: type: string nullable: true apptStatus_Cd: type: string nullable: true cargoRef_Num: type: string nullable: true container_Num: type: string nullable: true additionalProperties: false BaseCancelApptRequest: type: object properties: gateAppt_Id: type: string nullable: true additionalProperties: false GateAppointmentRequest: type: object properties: gateAppt_Id: type: string nullable: true additionalProperties: false ApptAvailableTimeSlots: type: object properties: gateAppt_Dt: type: string nullable: true apptType_Cd: type: string nullable: true gateAppt_Id: type: string nullable: true gateApptStart_Tm: type: string nullable: true container_Num: type: string nullable: true additionalProperties: false TASManageAppointmentRequest: type: object properties: gateAppt_Id: type: integer format: int64 gateApptStart_Tm: type: string nullable: true gateAppt_Dt: type: string nullable: true driverId_Num: type: string nullable: true driverOwnChs_Flg: type: string nullable: true truckPlate_Nbr: type: string nullable: true cargoRef_Num: type: string nullable: true cargoRefType_Cd: type: string nullable: true shippingLine_Cd: type: string nullable: true container_Num: type: string nullable: true chassis_Num: type: string nullable: true genset_Num: type: string nullable: true con_Cd: type: string nullable: true reefer_Flg: type: string nullable: true hazmat_Flg: type: string nullable: true oD_Flg: type: string nullable: true vgmSubmitted_Flg: type: string nullable: true seal1_Num: type: string nullable: true seal2_Num: type: string nullable: true apptType_Cd: type: string nullable: true position_On_Truck: type: integer format: int64 additionalProperties: false TASCreateAppointmentRequest: type: object properties: gateApptStart_Tm: type: string nullable: true gateAppt_Dt: type: string nullable: true driverId_Num: type: string nullable: true driverOwnChs_Flg: type: string nullable: true truckPlate_Nbr: type: string nullable: true cargoRef_Num: type: string nullable: true cargoRefType_Cd: type: string nullable: true shippingLine_Cd: type: string nullable: true container_Num: type: string nullable: true chassis_Num: type: string nullable: true genset_Num: type: string nullable: true con_Cd: type: string nullable: true reefer_Flg: type: string nullable: true hazmat_Flg: type: string nullable: true oD_Flg: type: string nullable: true vgmSubmitted_Flg: type: string nullable: true seal1_Num: type: string nullable: true seal2_Num: type: string nullable: true apptType_Cd: type: string nullable: true position_On_Truck: type: integer format: int64 additionalProperties: false securitySchemes: Authorization: description: This is the ForgeRock Token to be passed as Bearer. This will have the Format Baerer + {space} + {accessToken} type: http scheme: bearer bearerFormat: JWT