Difference between revisions of "Errors"
From MyMobileWorkers API
(Created page with "Exceptions are returned as a JSON response with error code and error message fields. === Example === { "description":"Exception containing error code and error message", ...") |
(→Error Codes) |
||
| (12 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
=== Example === | === Example === | ||
| − | + | <source lang="java"> | |
{ | { | ||
"description":"Exception containing error code and error message", | "description":"Exception containing error code and error message", | ||
| Line 11: | Line 11: | ||
} | } | ||
} | } | ||
| + | </source> | ||
| + | |||
| + | |||
| + | === Error Codes === | ||
| + | |||
| + | This a list of error codes that may be returned by the api | ||
| + | |||
| + | <source lang="java"> | ||
| + | |||
| + | // AUTHENTICATION EXCEPTIONS | ||
| + | AUT001("AUT001", "Authentication failed. Api key not provided."), | ||
| + | AUT002("AUT002", "Authentication failed. Api key is incorrect."), | ||
| + | AUT003("AUT003", "Authentication failed. Api key is not unique. Please contact Momote."), | ||
| + | |||
| + | // ASSET EXCEPTIONS | ||
| + | ASE001("ASE001", "Asset could not be found."), | ||
| + | ASE002("ASE002", "Asset serial number was not provided."), | ||
| + | ASE003("ASE003", "Asset cannot be created. Please contact Momote."), | ||
| + | ASE004("ASE004", "Customer name was not provided."), | ||
| + | |||
| + | // ASSET VALIDATION | ||
| + | ASV001("ASV001", "Invalid length for external id"), | ||
| + | ASV002("ASV002", "Item id cannot be null"), | ||
| + | ASV003("ASV003", "Invalid length for serial number. Serial number must not be null."), | ||
| + | ASV004("ASV004", "Invalid length for description"), | ||
| + | ASV005("ASV005", "asset already exists."), | ||
| + | ASV007("ASV007", "Invalid length for location"), | ||
| + | ASV008("ASV008", "Job id cannot be null"), | ||
| + | ASV009("ASV009", "Customer id cannot be null"), | ||
| + | ASV011("ASV011", "Date 'created at' cannot be null"), | ||
| + | ASV012("ASV012", "Status id cannot be null"), | ||
| + | ASV013("ASV013", "Company id cannot be null"), | ||
| + | |||
| + | // ASSET HISTORY VALIDATION (rest of fields share validation with Assets) | ||
| + | ASV014("ASV014", "Asset id cannot be null"), | ||
| + | |||
| + | // ASSET CUSTOM FIELDS VALIDATION (rest of fields share validation with Assets) | ||
| + | ASV015("ASV015", "Invalid length for field name"), | ||
| + | |||
| + | // ASSET PHOTOS VALIDATION | ||
| + | ASV016("ASV016", "Asset history id cannot be null"), | ||
| + | ASV017("ASV017", "Invalid length for file name"), | ||
| + | |||
| + | // ASSET STATUSES VALIDATION (rest of fields share validation with Assets) | ||
| + | ASV018("ASV018", "Invalid length for asset status name"), | ||
| + | |||
| + | // ASSET STATUSES EXCEPTIONS | ||
| + | AST001("AST001", "Asset status not found. Please include a valid status name."), | ||
| + | AST002("AST002", "Asset status name not provided. Please include a valid status name."), | ||
| + | AST003("AST003", "No asset statuses were found."), | ||
| + | |||
| + | // BRANCH EXCEPTIONS | ||
| + | BRH001("BRH001", "Branch cannot be found."), | ||
| + | BRH002("BRH002", "Branch ID is invalid."), | ||
| + | |||
| + | // CATEGORY EXCEPTIONS | ||
| + | CAT001("CAT001", "Category was not found."), | ||
| + | CAT002("CAT002", "Category name was not provided."), | ||
| + | CAT003("CAT003", "Category could not be created. Please contact Momote"), | ||
| + | CAT004("CAT004", "No categories were found."), | ||
| + | |||
| + | // CATEGORY VALIDATION | ||
| + | CVA001("CVA001", "Company id cannot be null"), | ||
| + | CVA002("CVA002", "name cannot be null"), | ||
| + | CVA003("CVA003", "isDeleted cannot be null"), | ||
| + | CVA004("CVA004", "category already exists."), | ||
| + | |||
| + | // COMPANY EXCEPTIONS | ||
| + | CMP001("CMP001", "Company cannot be found."), | ||
| + | CMP002("CMP002", "No transactions remaining. Please contact Momote to purchase transactions."), | ||
| + | CMP003("CMP003", "Transaction error. Unable to process transaction."), | ||
| + | CMP004("CMP004", "Refund transaction error. Unable to process refund."), | ||
| + | CMP005("CMP005", "Company attachment could not be created. Please contact Momote."), | ||
| + | CMP006("CMP006", "Company attachment file type is invalid."), | ||
| + | |||
| + | // JOB EXCEPTIONS | ||
| + | JOB001("JOB001", "Jobs cannot be found."), | ||
| + | JOB002("JOB002", "Job already exists. Job number must be unique."), | ||
| + | JOB003("JOB003", "Job cannot be created. Please contact Momote."), | ||
| + | JOB004("JOB004", "Error deleting job. Please contact Momote."), | ||
| + | JOB005("JOB005", "Job attachment could not be created. Please contact Momote."), | ||
| + | JOB006("JOB006", "Job attachment file type is invalid. Must be one of the following types: png, gif, jpg, jpeg, tiff, tif, doc, docx, xls, xlsx, pps, ppt, pptx, txt, rtf, csv, rar, tar.gz, tgz, zip, pdf."), | ||
| + | JOB007("JOB007", "Only one Gas Safe Inspection should be present when creating a Gas Safe job."), | ||
| + | JOB008("JOB008", "Gas Safe Inspection can only be added to a Gas Safe job."), | ||
| + | JOB009("JOB009", "Gas Safe Inspection required when creating a Gas Safe job."), | ||
| + | JOB010("JOB010", "Job status not provided. Please specify status in request."), | ||
| + | JOB011("JOB011", "Job number not provided. Please specify job number in request."), | ||
| + | |||
| + | // Customer Exception | ||
| + | CUS001("CUS001", "Customer could not be created"), | ||
| + | CUS011("CUS011", "Customer name not provided. Please specify customer name in the request."), | ||
| + | CUS012("CUS012", "New customer name not provided. Please specify new customer name in the request."), | ||
| + | CUS002("CUS002", "Customer cannot be found"), | ||
| + | |||
| + | // Customer Validation | ||
| + | CUV001("CUV001", "Customer cannot be null"), | ||
| + | WAC005("WAC005", "Customer name invalid size"), | ||
| + | WAC006("WAC006", "Contact name invailid size"), | ||
| + | WAC007("WAC007", "address invalid size"), | ||
| + | WAC008("WAC008", "address invalid size"), | ||
| + | WAC009("WAC009", "address invalid size"), | ||
| + | WAC010("WAC010", "address invalid size"), | ||
| + | WAC011("WAC011", "Postcode invalid"), | ||
| + | WAC012("WAC012", "Contact number invalid"), | ||
| + | WAC013("WAC013", "Contact number must be 7, 10 or 11 digits"), | ||
| + | WAC014("WAC014", "Created at time not vailid"), | ||
| + | WAC015("WAC015", "Customer must relate to a company"), | ||
| + | |||
| + | // CUSTOMER CONTACT EXCEPTIONS | ||
| + | CCE001("CCE001", "Contact already exists."), | ||
| + | CCE002("CCE002", "Contact not found."), | ||
| + | CCE003("CCE003", "Contact name not provided."), | ||
| + | CCE004("CCE004", "Contact could not be created. Please contact Momote."), | ||
| + | |||
| + | |||
| + | // Customer contact validation | ||
| + | CCV001("CCV001", "Contact name cannot be null."), | ||
| + | CCV002("CCV002", "Address 1 cannot be null."), | ||
| + | CCV003("CCV003", "Address 2 must not exceed 45 characters."), | ||
| + | CCV004("CCV004", "Address 3 must not exceed 45 characters."), | ||
| + | CCV005("CCV005", "Address 4 must not exceed 45 characters."), | ||
| + | CCV006("CCV006", "Postcode must not be null."), | ||
| + | CCV007("CCV007", "Contact number must not be null."), | ||
| + | CCV008("CCV008", "Created at must not be null."), | ||
| + | |||
| + | // JOB ITEM EXCEPTIONS | ||
| + | JIT001("JIT001", "Job items could not be created. Please contact Momote."), | ||
| + | JIT002("JIT002", "Job items can only be added to a PODC job."), | ||
| + | |||
| + | // JOB PART EXCEPTIONS | ||
| + | JPR001("JPR001", "Job parts could not be created. Please contact Momote."), | ||
| + | JPR002("JPR002", "Job parts can only be added to a Repair job."), | ||
| + | |||
| + | // MOBILE USER EXCEPTIONS | ||
| + | MBU001("MBU001", "Mobile user cannot be found."), | ||
| + | MBU002("MBU002", "Mobile user's username not provided. Please include username in the request."), | ||
| + | |||
| + | // USER EXCEPTIONS | ||
| + | USR001("USR001", "Default user cannot be found."), | ||
| + | USR002("USR002", "More than one default user found. Please contact Momote."), | ||
| + | |||
| + | // DATETIME EXCEPTIONS | ||
| + | DTE001("DTE001", "Date is invalid. Date must be formatted as 'yyyy-MM-dd'."), | ||
| + | DTE002("DTE002", "Timestamp is invalid. Date must be formatted to ISO8601 spec 'yyyy-MM-ddTHH:mm:ssZ'."), | ||
| + | DTE003("DTE003", "Start date not provided. Please specify start date in request."), | ||
| + | DTE004("DTE004", "End date not provided. Please specify end date in request."), | ||
| + | DTE005("DTE005", "Date not provided. Please include date in the request."), | ||
| + | |||
| + | // FILE EXCEPTIONS | ||
| + | FLE001("FLE001", "File cannot be created. Error saving file."), | ||
| + | FLE002("FLE002", "Error opening file."), | ||
| + | FLE003("FLE003", "Error reading file."), | ||
| + | FLE004("FLE004", "File cannot be deleted. Error deleting file."), | ||
| + | FLE005("FLE005", "File upload failed. File size has exceeded 5MB limit."), | ||
| + | FLE006("FLE006", "File upload failed. Required directories cannot be created. Please contact Momote."), | ||
| + | FLE007("FLE007", "File not provided. Please include file in the request."), | ||
| + | |||
| + | // ITEM EXCEPTIONS | ||
| + | ITE001("ITE001", "Item name not provided. Please include in request"), | ||
| + | ITE002("ITE002", "Item not found."), | ||
| + | ITE003("ITE003", "Item could not be created. Please contact Momote"), | ||
| + | ITE004("ITE004", "No items were found."), | ||
| + | ITE005("ITE005", "External id not provided. Please include in request."), | ||
| + | |||
| + | // ITEM VALIDATION | ||
| + | ITV001("ITV001", "Company id cannot be null"), | ||
| + | ITV002("ITV002", "Item name cannot be null"), | ||
| + | ITV003("ITV003", "isDeleted cannot be null"), | ||
| + | ITV004("ITV004", "item already exists."), | ||
| + | ITE005("ITE005", "External id not provided. Please include in request."), | ||
| + | ITE006("ITE006", "Item could not be deleted."), | ||
| + | |||
| + | // JOB VALIDATION | ||
| + | WAJ003("WAJ003", "job_number already exists"), | ||
| + | WAJ004("WAJ004", "job_number invalid empty string"), | ||
| + | WAJ005("WAJ005", "job_number invalid length"), | ||
| + | WAJ006("WAJ006", "address1 invalid empty string"), | ||
| + | WAJ007("WAJ007", "address1 invalid length"), | ||
| + | WAJ008("WAJ008", "postcode invalid empty string"), | ||
| + | WAJ009("WAJ009", "postcode invalid length"), | ||
| + | WAJ010("WAJ010", "contact_name invalid empty string"), | ||
| + | WAJ011("WAJ011", "contact_name invalid length"), | ||
| + | WAJ012("WAJ012", "timeslot invalid empty string"), | ||
| + | WAJ013("WAJ013", "date already expired"), | ||
| + | WAJ014("WAJ013", "cannot create job without a valid mobile user"), | ||
| + | WAJ018("WAJ018", "address2 invalid length"), | ||
| + | WAJ019("WAJ019", "address3 invalid length"), | ||
| + | WAJ020("WAJ020", "address4 invalid length"), | ||
| + | WAJ021("WAJ021", "contact_number_1 invalid length"), | ||
| + | WAJ022("WAJ022", "contact_number_2 invalid length"), | ||
| + | WAJ023("WAJ023", "special_instructions invalid length"), | ||
| + | WAJ024("WAJ024", "notes invalid length"), | ||
| + | WAJ025("WAJ025", "type invalid length"), | ||
| + | WAJ026("WAJ026", "product invalid length"), | ||
| + | WAJ027("WAJ027", "fault invalid length"), | ||
| + | WAJ028("WAJ028", "repair_code invalid length"), | ||
| + | WAJ029("WAJ029", "repair_description invalid length"), | ||
| + | WAJ030("WAJ030", "signee invalid length"), | ||
| + | WAJ031("WAJ031", "failure_type invalid length"), | ||
| + | WAJ032("WAJ032", "name invalid empty string"), | ||
| + | WAJ033("WAJ033", "name invalid length"), | ||
| + | WAJ034("WAJ034", "description invalid empty string"), | ||
| + | WAJ035("WAJ035", "description invalid length"), | ||
| + | WAJ036("WAJ036", "quantity invalid number"), | ||
| + | WAJ037("WAJ037", "code invalid empty string"), | ||
| + | WAJ038("WAJ038", "code invalid length"), | ||
| + | WAJ039("WAJ039", "created_at invalid empty date"), | ||
| + | WAJ040("WAJ040", "updated_at invalid empty date"), | ||
| + | WAJ041("WAJ041", "type invalid"), | ||
| + | WAJ042("WAJ042", "Job not in an editable state"), | ||
| + | JBE001("JBE001", "NULL"), | ||
| + | JBE002("JBE002", "NULL"), | ||
| + | JBE003("JBE003", "NULL"), | ||
| + | JBE004("JBE004", "Postcode missing."), | ||
| + | JBE005("JBE005", "Contact name must not be null"), | ||
| + | JBE006("JBE006", "NULL"), | ||
| + | JBE007("JBE007", "NULL"), | ||
| + | JBE020("JBE020", "Contact Number 1 invalid phone number"), | ||
| + | JBE021("JBE021", "Contact Number 2 invalid phone number"), | ||
| + | JBE100("JBE100", "Job cannot be found."), | ||
| + | |||
| + | // JOB ITEMS VALIDATION | ||
| + | JBI001("JBI001", "Job item name is null"), | ||
| + | JBI002("JBI002", "Job item type is null"), | ||
| + | JBI003("JBI003", "Job item status is null"), | ||
| + | JBI004("JBI004", "Job item other is null"), | ||
| + | JBI005("JBI005", "Job item job_id is null"), | ||
| + | JBI006("JBI006", "Job item name is invalid"), | ||
| + | JBI007("JBI007", "Job item type is invalid"), | ||
| + | JBI008("JBI008", "Job item status is invalid"), | ||
| + | JBI009("JBI009", "Job item other is invalid"), | ||
| + | JBI010("JBI010", "Job item notes is invalid"), | ||
| + | |||
| + | // JOB ITEMS EXCEPTIONS | ||
| + | JIE001("JIE001", "Neither item name or external id was provided."), | ||
| + | |||
| + | // JOB GAS SAFE INSPECTION VALIDATION | ||
| + | JBG001("JBG001", "Owner title cannot exceed 45 characters."), | ||
| + | JBG002("JBG002", "Owner name cannot be empty."), | ||
| + | JBG003("JBG003", "Owner name cannot exceed 45 charaters."), | ||
| + | JBG004("JBG004", "Owner address 1 cannot be empty."), | ||
| + | JBG005("JBG005", "Owner address 1 cannot exceed 45 characters."), | ||
| + | JBG006("JBG006", "Owner address 2 cannot exceed 45 characters."), | ||
| + | JBG007("JBG007", "Owner address 3 cannot exceed 45 characters."), | ||
| + | JBG008("JBG008", "Owner address 4 cannot exceed 45 characters."), | ||
| + | JBG009("JBG009", "Owner postcode cannot be empty."), | ||
| + | JBG010("JBG010", "Owner postocde cannot exceed 45 characters."), | ||
| + | JBG011("JBG011", "Owner contact number cannot exceed 45 characters."), | ||
| + | JBG012("JBG012", "Pipework visual cannot be empty."), | ||
| + | JBG013("JBG013", "Pipework visual cannot exceed 3 characters."), | ||
| + | JBG014("JBG014", "Pipework accessible cannot be empty."), | ||
| + | JBG015("JBG015", "Pipework accessible cannot exceed 3 characters."), | ||
| + | JBG016("JBG016", "Pipework tightness cannot be empty."), | ||
| + | JBG017("JBG017", "Pipework tightness cannot exceed 3 characters."), | ||
| + | JBG018("JBG018", "Pipework bonding cannot be empty."), | ||
| + | JBG019("JBG019", "Pipework bonding cannot exceed 3 characters."), | ||
| + | JBG020("JBG020", "Received by cannot exceed 45 characters."), | ||
| + | JBG021("JBG021", "Customer email cannot exceed 255 characters."), | ||
| + | JBG022("JBG022", "Owner email cannot exceed 255 characters."), | ||
| + | JBG023("JBG023", "Paper copy cannot exceed 3 characters."), | ||
| + | JBG024("JBG024", "Electronic copy cannot exceed 3 characters."), | ||
| + | JBG025("JBG025", "Engineer signee cannot exceed 45 characters."), | ||
| + | |||
| + | //JOB ATTACHMENTS NOT FOUND EXCEPTION | ||
| + | JBA026("JB0026", "Job attachment not found"), | ||
| + | |||
| + | //JOB DELETION ERRORRS | ||
| + | JBG027("JBG027", "Job removal failed"), | ||
| + | |||
| + | // ROUTES VALIDATION | ||
| + | RVA001("RVA001", "External id must be between 0-45 characters"), | ||
| + | RVA002("RVA002", "Company id cannot be null"), | ||
| + | RVA003("RVA003", "Route name must be between 0-255 characters"), | ||
| + | RVA004("RVA004", "Route code must be between 0-11 characters"), | ||
| + | RVA005("RVA005", "Route code must not be null"), | ||
| + | RVA006("RVA006", "is_deleted must not be null"), | ||
| + | |||
| + | // ROUTE EXCEPTIONS | ||
| + | ROE001("ROE001", "Route could not be found. Please supply valid route code."), | ||
| + | ROE002("ROE002", "Route code was not provided. Please include route code in request."), | ||
| + | ROE003("ROE003", "No routes were found"), | ||
| + | ROE004("ROE004", "Cannot assign job to both a route and a mobile user."), | ||
| + | ROE005("ROE005", "Weight limit of route exceeded."), | ||
| + | ROE006("ROE006", "A date or timestamp must be provided when submitting a job with a route."), | ||
| + | |||
| + | // ROUTE LOGS VALIDATION | ||
| + | RLV001("RLV001", "Company id must not be null"), | ||
| + | RLV002("RLV002", "Branch id must not be null"), | ||
| + | RLV003("RLV003", "Route id must not be null"), | ||
| + | RLV004("RLV004", "Mobile User id must not be null"), | ||
| + | RLV005("RLV005", "Created at must not be null"), | ||
| + | RLV006("RLV006", "no_of_jobs must not be null"), | ||
| + | |||
| + | // ROUTE SETTINGS VALIDATION | ||
| + | RSV001("RSV001", "Company id must not be null"), | ||
| + | RSV002("RSV002", "Route entry style must only be 1 character long"), | ||
| + | RSV003("RSV003", "Route entry style must not be null"), | ||
| + | RSV004("RSV004", "limit_rule must only be 1 character long"), | ||
| + | RSV005("RSV005", "limit_rule must not be null"), | ||
| + | RSV006("RSV006", "force_branch must not be null"), | ||
| + | |||
| + | // ROUTE SETTINGS EXCEPTIONS | ||
| + | RSE001("RSE001", "Cannot find route settings for company."), | ||
| + | |||
| + | // VEHICLE ASSIGNMENT EXCEPTIONS | ||
| + | VEA001("VEA001", "Cannot find vehicle assignments."), | ||
| + | |||
| + | // CATALOGUE VERSIONS EXCEPTIONS | ||
| + | CAV001("CAV001", "Catalogue version was not found."), | ||
| + | |||
| + | </source> | ||
| + | |||
| + | The PDF export engine can also return the following | ||
| + | |||
| + | <source lang="java"> | ||
| + | |||
| + | EXP001("EXP001", "Export template not found."), | ||
| + | EXP002("EXP002", "Cannot create gas safe report for non gas safe job."), | ||
| + | </source> | ||
Latest revision as of 10:34, 18 September 2014
Exceptions are returned as a JSON response with error code and error message fields.
[edit] Example
{ "description":"Exception containing error code and error message", "type":"object", "properties":{ "error_code":{ "type":"string" }, "error_message":{ "type":"string" } } }
[edit] Error Codes
This a list of error codes that may be returned by the api
// AUTHENTICATION EXCEPTIONS AUT001("AUT001", "Authentication failed. Api key not provided."), AUT002("AUT002", "Authentication failed. Api key is incorrect."), AUT003("AUT003", "Authentication failed. Api key is not unique. Please contact Momote."), // ASSET EXCEPTIONS ASE001("ASE001", "Asset could not be found."), ASE002("ASE002", "Asset serial number was not provided."), ASE003("ASE003", "Asset cannot be created. Please contact Momote."), ASE004("ASE004", "Customer name was not provided."), // ASSET VALIDATION ASV001("ASV001", "Invalid length for external id"), ASV002("ASV002", "Item id cannot be null"), ASV003("ASV003", "Invalid length for serial number. Serial number must not be null."), ASV004("ASV004", "Invalid length for description"), ASV005("ASV005", "asset already exists."), ASV007("ASV007", "Invalid length for location"), ASV008("ASV008", "Job id cannot be null"), ASV009("ASV009", "Customer id cannot be null"), ASV011("ASV011", "Date 'created at' cannot be null"), ASV012("ASV012", "Status id cannot be null"), ASV013("ASV013", "Company id cannot be null"), // ASSET HISTORY VALIDATION (rest of fields share validation with Assets) ASV014("ASV014", "Asset id cannot be null"), // ASSET CUSTOM FIELDS VALIDATION (rest of fields share validation with Assets) ASV015("ASV015", "Invalid length for field name"), // ASSET PHOTOS VALIDATION ASV016("ASV016", "Asset history id cannot be null"), ASV017("ASV017", "Invalid length for file name"), // ASSET STATUSES VALIDATION (rest of fields share validation with Assets) ASV018("ASV018", "Invalid length for asset status name"), // ASSET STATUSES EXCEPTIONS AST001("AST001", "Asset status not found. Please include a valid status name."), AST002("AST002", "Asset status name not provided. Please include a valid status name."), AST003("AST003", "No asset statuses were found."), // BRANCH EXCEPTIONS BRH001("BRH001", "Branch cannot be found."), BRH002("BRH002", "Branch ID is invalid."), // CATEGORY EXCEPTIONS CAT001("CAT001", "Category was not found."), CAT002("CAT002", "Category name was not provided."), CAT003("CAT003", "Category could not be created. Please contact Momote"), CAT004("CAT004", "No categories were found."), // CATEGORY VALIDATION CVA001("CVA001", "Company id cannot be null"), CVA002("CVA002", "name cannot be null"), CVA003("CVA003", "isDeleted cannot be null"), CVA004("CVA004", "category already exists."), // COMPANY EXCEPTIONS CMP001("CMP001", "Company cannot be found."), CMP002("CMP002", "No transactions remaining. Please contact Momote to purchase transactions."), CMP003("CMP003", "Transaction error. Unable to process transaction."), CMP004("CMP004", "Refund transaction error. Unable to process refund."), CMP005("CMP005", "Company attachment could not be created. Please contact Momote."), CMP006("CMP006", "Company attachment file type is invalid."), // JOB EXCEPTIONS JOB001("JOB001", "Jobs cannot be found."), JOB002("JOB002", "Job already exists. Job number must be unique."), JOB003("JOB003", "Job cannot be created. Please contact Momote."), JOB004("JOB004", "Error deleting job. Please contact Momote."), JOB005("JOB005", "Job attachment could not be created. Please contact Momote."), JOB006("JOB006", "Job attachment file type is invalid. Must be one of the following types: png, gif, jpg, jpeg, tiff, tif, doc, docx, xls, xlsx, pps, ppt, pptx, txt, rtf, csv, rar, tar.gz, tgz, zip, pdf."), JOB007("JOB007", "Only one Gas Safe Inspection should be present when creating a Gas Safe job."), JOB008("JOB008", "Gas Safe Inspection can only be added to a Gas Safe job."), JOB009("JOB009", "Gas Safe Inspection required when creating a Gas Safe job."), JOB010("JOB010", "Job status not provided. Please specify status in request."), JOB011("JOB011", "Job number not provided. Please specify job number in request."), // Customer Exception CUS001("CUS001", "Customer could not be created"), CUS011("CUS011", "Customer name not provided. Please specify customer name in the request."), CUS012("CUS012", "New customer name not provided. Please specify new customer name in the request."), CUS002("CUS002", "Customer cannot be found"), // Customer Validation CUV001("CUV001", "Customer cannot be null"), WAC005("WAC005", "Customer name invalid size"), WAC006("WAC006", "Contact name invailid size"), WAC007("WAC007", "address invalid size"), WAC008("WAC008", "address invalid size"), WAC009("WAC009", "address invalid size"), WAC010("WAC010", "address invalid size"), WAC011("WAC011", "Postcode invalid"), WAC012("WAC012", "Contact number invalid"), WAC013("WAC013", "Contact number must be 7, 10 or 11 digits"), WAC014("WAC014", "Created at time not vailid"), WAC015("WAC015", "Customer must relate to a company"), // CUSTOMER CONTACT EXCEPTIONS CCE001("CCE001", "Contact already exists."), CCE002("CCE002", "Contact not found."), CCE003("CCE003", "Contact name not provided."), CCE004("CCE004", "Contact could not be created. Please contact Momote."), // Customer contact validation CCV001("CCV001", "Contact name cannot be null."), CCV002("CCV002", "Address 1 cannot be null."), CCV003("CCV003", "Address 2 must not exceed 45 characters."), CCV004("CCV004", "Address 3 must not exceed 45 characters."), CCV005("CCV005", "Address 4 must not exceed 45 characters."), CCV006("CCV006", "Postcode must not be null."), CCV007("CCV007", "Contact number must not be null."), CCV008("CCV008", "Created at must not be null."), // JOB ITEM EXCEPTIONS JIT001("JIT001", "Job items could not be created. Please contact Momote."), JIT002("JIT002", "Job items can only be added to a PODC job."), // JOB PART EXCEPTIONS JPR001("JPR001", "Job parts could not be created. Please contact Momote."), JPR002("JPR002", "Job parts can only be added to a Repair job."), // MOBILE USER EXCEPTIONS MBU001("MBU001", "Mobile user cannot be found."), MBU002("MBU002", "Mobile user's username not provided. Please include username in the request."), // USER EXCEPTIONS USR001("USR001", "Default user cannot be found."), USR002("USR002", "More than one default user found. Please contact Momote."), // DATETIME EXCEPTIONS DTE001("DTE001", "Date is invalid. Date must be formatted as 'yyyy-MM-dd'."), DTE002("DTE002", "Timestamp is invalid. Date must be formatted to ISO8601 spec 'yyyy-MM-ddTHH:mm:ssZ'."), DTE003("DTE003", "Start date not provided. Please specify start date in request."), DTE004("DTE004", "End date not provided. Please specify end date in request."), DTE005("DTE005", "Date not provided. Please include date in the request."), // FILE EXCEPTIONS FLE001("FLE001", "File cannot be created. Error saving file."), FLE002("FLE002", "Error opening file."), FLE003("FLE003", "Error reading file."), FLE004("FLE004", "File cannot be deleted. Error deleting file."), FLE005("FLE005", "File upload failed. File size has exceeded 5MB limit."), FLE006("FLE006", "File upload failed. Required directories cannot be created. Please contact Momote."), FLE007("FLE007", "File not provided. Please include file in the request."), // ITEM EXCEPTIONS ITE001("ITE001", "Item name not provided. Please include in request"), ITE002("ITE002", "Item not found."), ITE003("ITE003", "Item could not be created. Please contact Momote"), ITE004("ITE004", "No items were found."), ITE005("ITE005", "External id not provided. Please include in request."), // ITEM VALIDATION ITV001("ITV001", "Company id cannot be null"), ITV002("ITV002", "Item name cannot be null"), ITV003("ITV003", "isDeleted cannot be null"), ITV004("ITV004", "item already exists."), ITE005("ITE005", "External id not provided. Please include in request."), ITE006("ITE006", "Item could not be deleted."), // JOB VALIDATION WAJ003("WAJ003", "job_number already exists"), WAJ004("WAJ004", "job_number invalid empty string"), WAJ005("WAJ005", "job_number invalid length"), WAJ006("WAJ006", "address1 invalid empty string"), WAJ007("WAJ007", "address1 invalid length"), WAJ008("WAJ008", "postcode invalid empty string"), WAJ009("WAJ009", "postcode invalid length"), WAJ010("WAJ010", "contact_name invalid empty string"), WAJ011("WAJ011", "contact_name invalid length"), WAJ012("WAJ012", "timeslot invalid empty string"), WAJ013("WAJ013", "date already expired"), WAJ014("WAJ013", "cannot create job without a valid mobile user"), WAJ018("WAJ018", "address2 invalid length"), WAJ019("WAJ019", "address3 invalid length"), WAJ020("WAJ020", "address4 invalid length"), WAJ021("WAJ021", "contact_number_1 invalid length"), WAJ022("WAJ022", "contact_number_2 invalid length"), WAJ023("WAJ023", "special_instructions invalid length"), WAJ024("WAJ024", "notes invalid length"), WAJ025("WAJ025", "type invalid length"), WAJ026("WAJ026", "product invalid length"), WAJ027("WAJ027", "fault invalid length"), WAJ028("WAJ028", "repair_code invalid length"), WAJ029("WAJ029", "repair_description invalid length"), WAJ030("WAJ030", "signee invalid length"), WAJ031("WAJ031", "failure_type invalid length"), WAJ032("WAJ032", "name invalid empty string"), WAJ033("WAJ033", "name invalid length"), WAJ034("WAJ034", "description invalid empty string"), WAJ035("WAJ035", "description invalid length"), WAJ036("WAJ036", "quantity invalid number"), WAJ037("WAJ037", "code invalid empty string"), WAJ038("WAJ038", "code invalid length"), WAJ039("WAJ039", "created_at invalid empty date"), WAJ040("WAJ040", "updated_at invalid empty date"), WAJ041("WAJ041", "type invalid"), WAJ042("WAJ042", "Job not in an editable state"), JBE001("JBE001", "NULL"), JBE002("JBE002", "NULL"), JBE003("JBE003", "NULL"), JBE004("JBE004", "Postcode missing."), JBE005("JBE005", "Contact name must not be null"), JBE006("JBE006", "NULL"), JBE007("JBE007", "NULL"), JBE020("JBE020", "Contact Number 1 invalid phone number"), JBE021("JBE021", "Contact Number 2 invalid phone number"), JBE100("JBE100", "Job cannot be found."), // JOB ITEMS VALIDATION JBI001("JBI001", "Job item name is null"), JBI002("JBI002", "Job item type is null"), JBI003("JBI003", "Job item status is null"), JBI004("JBI004", "Job item other is null"), JBI005("JBI005", "Job item job_id is null"), JBI006("JBI006", "Job item name is invalid"), JBI007("JBI007", "Job item type is invalid"), JBI008("JBI008", "Job item status is invalid"), JBI009("JBI009", "Job item other is invalid"), JBI010("JBI010", "Job item notes is invalid"), // JOB ITEMS EXCEPTIONS JIE001("JIE001", "Neither item name or external id was provided."), // JOB GAS SAFE INSPECTION VALIDATION JBG001("JBG001", "Owner title cannot exceed 45 characters."), JBG002("JBG002", "Owner name cannot be empty."), JBG003("JBG003", "Owner name cannot exceed 45 charaters."), JBG004("JBG004", "Owner address 1 cannot be empty."), JBG005("JBG005", "Owner address 1 cannot exceed 45 characters."), JBG006("JBG006", "Owner address 2 cannot exceed 45 characters."), JBG007("JBG007", "Owner address 3 cannot exceed 45 characters."), JBG008("JBG008", "Owner address 4 cannot exceed 45 characters."), JBG009("JBG009", "Owner postcode cannot be empty."), JBG010("JBG010", "Owner postocde cannot exceed 45 characters."), JBG011("JBG011", "Owner contact number cannot exceed 45 characters."), JBG012("JBG012", "Pipework visual cannot be empty."), JBG013("JBG013", "Pipework visual cannot exceed 3 characters."), JBG014("JBG014", "Pipework accessible cannot be empty."), JBG015("JBG015", "Pipework accessible cannot exceed 3 characters."), JBG016("JBG016", "Pipework tightness cannot be empty."), JBG017("JBG017", "Pipework tightness cannot exceed 3 characters."), JBG018("JBG018", "Pipework bonding cannot be empty."), JBG019("JBG019", "Pipework bonding cannot exceed 3 characters."), JBG020("JBG020", "Received by cannot exceed 45 characters."), JBG021("JBG021", "Customer email cannot exceed 255 characters."), JBG022("JBG022", "Owner email cannot exceed 255 characters."), JBG023("JBG023", "Paper copy cannot exceed 3 characters."), JBG024("JBG024", "Electronic copy cannot exceed 3 characters."), JBG025("JBG025", "Engineer signee cannot exceed 45 characters."), //JOB ATTACHMENTS NOT FOUND EXCEPTION JBA026("JB0026", "Job attachment not found"), //JOB DELETION ERRORRS JBG027("JBG027", "Job removal failed"), // ROUTES VALIDATION RVA001("RVA001", "External id must be between 0-45 characters"), RVA002("RVA002", "Company id cannot be null"), RVA003("RVA003", "Route name must be between 0-255 characters"), RVA004("RVA004", "Route code must be between 0-11 characters"), RVA005("RVA005", "Route code must not be null"), RVA006("RVA006", "is_deleted must not be null"), // ROUTE EXCEPTIONS ROE001("ROE001", "Route could not be found. Please supply valid route code."), ROE002("ROE002", "Route code was not provided. Please include route code in request."), ROE003("ROE003", "No routes were found"), ROE004("ROE004", "Cannot assign job to both a route and a mobile user."), ROE005("ROE005", "Weight limit of route exceeded."), ROE006("ROE006", "A date or timestamp must be provided when submitting a job with a route."), // ROUTE LOGS VALIDATION RLV001("RLV001", "Company id must not be null"), RLV002("RLV002", "Branch id must not be null"), RLV003("RLV003", "Route id must not be null"), RLV004("RLV004", "Mobile User id must not be null"), RLV005("RLV005", "Created at must not be null"), RLV006("RLV006", "no_of_jobs must not be null"), // ROUTE SETTINGS VALIDATION RSV001("RSV001", "Company id must not be null"), RSV002("RSV002", "Route entry style must only be 1 character long"), RSV003("RSV003", "Route entry style must not be null"), RSV004("RSV004", "limit_rule must only be 1 character long"), RSV005("RSV005", "limit_rule must not be null"), RSV006("RSV006", "force_branch must not be null"), // ROUTE SETTINGS EXCEPTIONS RSE001("RSE001", "Cannot find route settings for company."), // VEHICLE ASSIGNMENT EXCEPTIONS VEA001("VEA001", "Cannot find vehicle assignments."), // CATALOGUE VERSIONS EXCEPTIONS CAV001("CAV001", "Catalogue version was not found."),
The PDF export engine can also return the following
EXP001("EXP001", "Export template not found."),
EXP002("EXP002", "Cannot create gas safe report for non gas safe job."),