title: Oracle ords: How to create put/post method with collection
body: <p>I created a post method to receive the geolocation data of customers:
  <a href="http://i.stack.imgur.com/T6N0Y.png" rel="nofollow">Post method</a></p>
  
  <p>When I call the post method with the JSON:</p>
  
  <pre><code>{"customer": 1, "latitude":-21.13179, "longitude":-47.736782 }
  </code></pre>
  
  <p>my PL/SQL Script works.</p>
  
  <p>Now I'd like to send a group of records but I don't know how to do it.
  I created a PUT method to receive a collections of geolocations and I constructed a script just to parse the parameter:
  <a href="http://i.stack.imgur.com/CTQDw.png" rel="nofollow">Put method</a></p>
  
  <p>When I call the put method with the JSON:</p>
  
  <pre><code>{  
     "items":[  
        {  
           "customer":1,
           "latitude":-21.13179,
           "longitude":-47.736782
        },
        {  
           "customer":1,
           "latitude":-21.13179,
           "longitude":-47.736782
        }
     ]
  }
  PL/SQL code:
  
  declare
  l_values apex_json.t_values;
  begin
  apex_json.parse (
             p_values =&gt; l_values,
             p_source =&gt; :items );
  end;
  </code></pre>
  
  <p>I received the message: </p>
  
  <blockquote>
  <pre><code>400 - Bad Request - Expected a value but got: START_ARRAY.
  </code></pre>
  </blockquote>
  
  <p>What I'm doing of wrong?
  I want to create a post/put method to receive a collection.
  Thanks for your help.</p>