WS201 - Add Document to a Route
This integration aims to add a document that already exists in the system to an already created route.
Authentication
- Calls will have transport-level authentication (Basic Authentication);
- Request
user/passwordfrom the account administrator.
Features
-
URL
-
Method:
POST -
URL parameter:
No parameters
-
Data Parameter:
- Type:
application/jsonExample:{"route_name": "CAMPINAS", "route_date": "2015-11-09", "route_driver": "0017", "document_key": "3514001615500700028557518898261"}
- Type:
-
Success:
- Code: 200
Content:
{"user_message": "Documents added successfully!", "internal_message": "", "response_data": "", "code": 0, "more_info": "http://dev.comprovei.com.br"}
- Code: 200
Content:
-
Error:
-
Code: 400 Content:
{"user_message": "Document {KEY} is already in a route.", "internal_message": "Check the document data.", "response_data": "", "code": 400, "more_info": "http://dev.comprovei.com.br" } -
Code: 400 Content:
{"user_message": "Document {KEY} does not exist in the system.", "internal_message": "Import the document.", "response_data": "", "code": 400, "more_info": "http://dev.comprovei.com.br" } -
Code: 400 Content:
{"user_message": "Route in progress. Inclusion cancelled!", "internal_message": "", "response_data": "", "code": 400, "more_info": "http://dev.comprovei.com.br" } -
Code: 400 Content:
{"user_message": "Route is closed', "internal_message": "Check the route data.", "response_data": "", "code": 400, "more_info": "http://dev.comprovei.com.br" } -
Code: 400 Content:
{"user_message": "Route does not exist.', "internal_message": "Check the route data.", "response_data": "", "code": 400, "more_info": "http://dev.comprovei.com.br" } -
Code: 401 Content:
{"user_message": "Missing Data Parameter", "internal_message": "Check the sent data", "response_data": "", "code": 401, "more_info": "http://dev.comprovei.com.br" } -
Code: 401 Content:
{"user_message": "Method unavailable for account type", "internal_message": "{TYPOCONTA}", "response_data": "", "code": 401, "more_info": "http://dev.comprovei.com.br" } -
Code: 401 Content:
{"user_message": "", "internal_message": "Invalid developer username and/or password", "response_data": "", "code": 0, "more_info": "http://dev.comprovei.com.br"} -
Code: 400 Content:
{"user_message": "", "internal_message": "No developer authentication data", "response_data": Account type, "code": 0, "more_info": "http://dev.comprovei.com.br"}
-
Date Parameter
| Name | Type | Standard | Description |
|---|---|---|---|
route_name |
string | Name used when registering the route. | |
route_date |
string | Date used in route registration, in the format: yyyy-mm-dd | |
route_driver |
string | Driver code used when registering the route. | |
document_key |
string | Key of the document to be inserted. |