{"id":946,"date":"2024-01-28T13:47:05","date_gmt":"2024-01-28T13:47:05","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=946"},"modified":"2024-01-29T11:44:21","modified_gmt":"2024-01-29T11:44:21","slug":"get-messages","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=946","title":{"rendered":"Get messages"},"content":{"rendered":"\r\n<h2>Get messages<\/h2>\r\n<p>&nbsp;<\/p>\r\n<p>Get messages from given thread<\/p>\r\n<h5>AUTHORIZATIONS:&gt; <i>access_token<\/i><\/h5>\r\n<h5>PATH\u00a0PARAMETERS<\/h5>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"threadId\">threadId required<\/td>\r\n<td>integer<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h5>QUERY\u00a0PARAMETERS<\/h5>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"offset\">offset<\/td>\r\n<td>integer\r\n<p>Starting element<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"limit\">limit<\/td>\r\n<td>integer\r\n<p>Elements limit per page<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h3>Responses<\/h3>\r\n<p><strong>200<\/strong><\/p>\r\n<p>Status 200<\/p>\r\n<h5>RESPONSE SCHEMA:\u00a0application\/json<\/h5>\r\n<p>Array<\/p>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"id\">id<\/td>\r\n<td>integer\r\n<p>Message ID<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"thread_id\">thread_id<\/td>\r\n<td>integer\r\n<p>Thread ID<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"created_at\">created_at<\/td>\r\n<td>string\u00a0&lt;date-time&gt;\r\n<p>Time when message was sent<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"type\">type<\/td>\r\n<td>string Enum:\u00a0&#8220;sent&#8221;\u00a0&#8220;received&#8221;\r\n<p>Sent or received<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"text\">text<\/td>\r\n<td>string\r\n<p>Message text<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"is_read\">is_read<\/td>\r\n<td>boolean\r\n<p>Is message read<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"attachments\"><button aria-label=\"expand attachments\">attachments<\/button><\/td>\r\n<td>Array of\u00a0objects\r\n<p>List of attachments<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"cvs\"><button aria-label=\"expand cvs\">cvs<\/button><\/td>\r\n<td>Array of\u00a0objects<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p>OLX Production Server<\/p>\r\n<p>https:\/\/www.olx.ro\/api\/partner\/threads\/{threadId}\/messages <code>GET\r\n\/threads\/{threadId}\/messages\r\nResponse samples\r\n200\r\nContent type\r\napplication\/json\r\n[\r\n{\r\n\"id\": 1,\r\n\"thread_id\": 1,\r\n\"created_at\": \"2018-01-30 08:26:36\",\r\n\"type\": \"sent\",\r\n\"text\": \"This is my message\",\r\n\"attachments\": null,\r\n\"is_read\": true\r\n}\r\n]\t\t\t<\/code> <button>Copy<\/button> GET \/threads\/{threadId}\/messages Response samples 200 Content type application\/json [ { &#8220;id&#8221;: 1, &#8220;thread_id&#8221;: 1, &#8220;created_at&#8221;: &#8220;2018-01-30 08:26:36&#8221;, &#8220;type&#8221;: &#8220;sent&#8221;, &#8220;text&#8221;: &#8220;This is my message&#8221;, &#8220;attachments&#8221;: null, &#8220;is_read&#8221;: true } ] Copied to clipboard<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Get messages &nbsp; Get messages from given thread AUTHORIZATIONS:&gt; access_token PATH\u00a0PARAMETERS threadId required integer QUERY\u00a0PARAMETERS offset integer Starting element limit integer Elements limit per page Responses 200 Status 200 RESPONSE SCHEMA:\u00a0application\/json Array id integer Message ID thread_id integer Thread ID created_at string\u00a0&lt;date-time&gt; Time when message was sent type string Enum:\u00a0&#8220;sent&#8221;\u00a0&#8220;received&#8221; Sent or received text string&#8230;  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=946\" title=\"Read Get messages\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/946"}],"collection":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=946"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/946\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}