PUT Update Expiry Date of the Document API

This API will update expiry date of the sepcified document.

Request Attributes

API Content Type: JSON

Head

ATTRIBUTE DESCRIPTION
x-access-token
string
mandatory
Token generated from the authentication api.
Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.TU5NzgyMDA1N30.9eO_xh eyJEYXRhIjp7InVzZXJpZCI6IjY3NCIsImVtYWlsIjoiYWFhYWFhYWFhYWjuunGJQ YmwuY29tIiwia2V5IjoidGVzdGluZ0tleSJ9LCJpYXQiOjE1OTc3NDA4NTpj6gc8dM csIFhY7n1mV4cUBxa2P3ICI6M2VyWq19OzuHAefeTEj

body

ATTRIBUTE DESCRIPTION
user_id
string(32)
mandatory
UserId given in companyprofile page.
Example: USR1HINU6OROEZZP1YS1592227436777
documentid
string(32)
mandatory
Unique Id of the document.
Example: 8JIA11252061081EUW6MK20207933692
expirationdate
string
mandatory
An expiry date that you want to set for the document.
Example: 2020-11-25

Response Attributes

API Content Type: JSON

body

ATTRIBUTE DESCRIPTION
statuscode
string(3)
This is the status code corresponding to a particular message and is returned to the user. The different status codes corresponding to this API are mentioned below
Example: 200
status
boolean
This parameter indicates the status of API call.
Possible Values: true or false
message
string(100)
This parameter is the result message which contains information about the result.
Example: Expiry date updated successfully.

Response Codes and Messages

statuscode status Description
200
true
Success
401
false
Your Session has expired
409
false
Conflict has occured
422
false
Invalid parameter
500
false
System error
https://console.konsign.com/api/document/updateexpiredate
https://console.konsign.com/api/document/updateexpiredate
REQUEST RESPONSE
var https = require('follow-redirects').https;
											var fs = require('fs');
											
											var options = {
											  'method': 'PUT',
											  'hostname': 'console.konsign.com',
											  'path': '/document/api/updateexpiredate',
											  'headers': {
												'Authorization': 'Bearer YOUR_AUTH_TOKEN',
												'Content-Type': 'application/json'
											  },
											  'maxRedirects': 20
											};
											
											var req = https.request(options, function (res) {
											  var chunks = [];
											
											  res.on("data", function (chunk) {
												chunks.push(chunk);
											  });
											
											  res.on("end", function (chunk) {
												var body = Buffer.concat(chunks);
												console.log(body.toString());
											  });
											
											  res.on("error", function (error) {
												console.error(error);
											  });
											});
											
											var postData = JSON.stringify({
											  "user_id": "YOUR_USER_ID",
											  "documentid": "YOUR_DOCUMRNT_ID",
											  "expirationdate": "DOC_EXPIRY_DATE"
											});
											
											req.write(postData);
											
											req.end();
										
									
var client = new RestClient("https://console.konsign.com/document/api/updateexpiredate");
											client.Timeout = -1;
											var request = new RestRequest(Method.PUT);
											request.AddHeader("Authorization", "Bearer YOUR_AUTH_TOKEN");
											request.AddHeader("Content-Type", "application/json");
											var body = @"{
											" + "\n" +
											@"    ""user_id"":""YOUR_USER_ID"",
											" + "\n" +
											@"    ""documentid"":""YOUR_DOCUMRNT_ID"",
											" + "\n" +
											@"    ""expirationdate"":""DOC_EXPIRY_DATE""
											" + "\n" +
											@"}";
											request.AddParameter("application/json", body,  ParameterType.RequestBody);
											IRestResponse response = client.Execute(request);
											Console.WriteLine(response.Content);
										
									
										{
											"head": {
												"responseTimestamp": "1526969112101",
												"version": "v1",
												"clientId": "C11",
												"signature": "TXBw50YPUKIgJd8gR8RpZuOMZ+csvCT7i0/YXmG//J8+BpFdY5goPBiLAkCzKlCkOvAQip/Op5aD6Vs+cNUTjFmC55JBxvp7WunZ45Ke2q0="
											},
											"body": {
												"resultInfo": {
													"resultStatus": "S",
													"resultCode": "0000",
													"resultMsg": "Success"
												},
												"txnToken": "fe795335ed3049c78a57271075f2199e1526969112097",
												"isPromoCodeValid": false,
												"authenticated": false
											}
										}