Ali Imran

Ali Imran

  • 1.3k
  • 382
  • 411.8k

Passing DateTime Object In API in C#

Oct 23 2016 7:28 AM

down votefavorite

I am working on Lobs.com Letters API. I am trying to retrieve the list of All letters from the API by the Date_Created parameter via GET Method. But I am not finding any way to get it done successfully. There is always an error showing "date_created must be an object". Please see the below screen shots from Visual studio as Well as from PostMan. Exception from postman is.  Moreover the API requires me to pass the dateTime in ISO 8601 format and I have concerned different posts on this forum and tried the accepted solution.

Moreover error from Visual studio Is :
 

Please guide how Can i pass this DateTime object in the url or correct me if my format is wrong. I have also serialized the DateTime object.

Thanks.


Answers (2)