{"id":1031,"date":"2024-01-28T16:58:43","date_gmt":"2024-01-28T16:58:43","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=1031"},"modified":"2024-01-29T11:54:13","modified_gmt":"2024-01-29T11:54:13","slug":"purchase-packet","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=1031","title":{"rendered":"Purchase packet"},"content":{"rendered":"\r\n<h2>Purchase packet<\/h2>\r\n<p>&nbsp;<\/p>\r\n<h5>AUTHORIZATIONS: <i>access_token<\/i><\/h5>\r\n<h5>REQUEST BODY SCHEMA:\u00a0application\/json<\/h5>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"payment_method\">payment_method required<\/td>\r\n<td>string Enum:\u00a0<strong>&#8220;account&#8221;<\/strong>\u00a0<strong>&#8220;postpaid&#8221;<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"category_id\">category_id required<\/td>\r\n<td>integer<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"size\">size required<\/td>\r\n<td>integer\r\n<p>Size of the packet. This value should not be equal to 1.<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"type\">type<\/td>\r\n<td>string Enum:\u00a0&#8220;base&#8221;\u00a0&#8220;mega&#8221;\r\n<p>Packet type. &#8216;base&#8217; by default<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"zone_id\">zone_id<\/td>\r\n<td>string\r\n<p>Field to specify location zone &#8211; it&#8217;s required for categories with enabled &#8220;Regional pricing&#8221; feature. (Available in UA)<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h3>Responses<\/h3>\r\n<p>&nbsp;<\/p>\r\n<p>204<\/p>\r\n<p>Status 204<\/p>\r\n<p>400 Status 400<\/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=\"error\"><button aria-label=\"expand error\">error<\/button> required<\/td>\r\n<td>object<\/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\/users\/me\/packets<\/p>\r\n<p><code>POST\r\n\/users\/me\/packets\r\nRequest samples\r\nPayload\r\nContent type\r\napplication\/json\r\n{\r\n\"payment_method\": \"account\",\r\n\"category_id\": 0,\r\n\"size\": 0,\r\n\"type\": \"base\",\r\n\"zone_id\": \"string\"\r\n}\t\t\t<\/code> <button>Copy<\/button> POST \/users\/me\/packets Request samples Payload Content type application\/json { &#8220;payment_method&#8221;: &#8220;account&#8221;, &#8220;category_id&#8221;: 0, &#8220;size&#8221;: 0, &#8220;type&#8221;: &#8220;base&#8221;, &#8220;zone_id&#8221;: &#8220;string&#8221; } Copied to clipboard <code>Response samples\r\n400\r\nContent type\r\napplication\/json\r\n[\r\n{\r\n\"error\": {}\r\n}\r\n]\t\t\t<\/code> <button>Copy<\/button> Response samples 400 Content type application\/json [ { &#8220;error&#8221;: {} } ] Copied to clipboard<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Purchase packet &nbsp; AUTHORIZATIONS: access_token REQUEST BODY SCHEMA:\u00a0application\/json payment_method required string Enum:\u00a0&#8220;account&#8221;\u00a0&#8220;postpaid&#8221; category_id required integer size required integer Size of the packet. This value should not be equal to 1. type string Enum:\u00a0&#8220;base&#8221;\u00a0&#8220;mega&#8221; Packet type. &#8216;base&#8217; by default zone_id string Field to specify location zone &#8211; it&#8217;s required for categories with enabled &#8220;Regional pricing&#8221; feature&#8230;.  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=1031\" title=\"Read Purchase packet\">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":[131],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/1031"}],"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=1031"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/1031\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}