Answers.Body: <p>I just figured it out:</p>
  
  <pre><code>&amp;received_date[BETWEEN][]=2017-12-01&amp;received_date[BETWEEN][]=2017-12-02
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-22T13:24:47.843Z
Answers.Text: Great, you can mark your answer as best answer.
Answers.UserDisplayName: samuelsov
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-21T18:46:38.563Z
Answers.Text: Your answer helped me generalize this to other OR searches, for instance (using REST format, v3 API) &last_name[]=name1&last_name[]=name2 Thx!
Answers.UserDisplayName: cfritze64
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-21T22:49:08.510Z
Answers.LastActivityDate: 2017-12-21T22:49:08.510Z
Answers.UserDisplayName: Troy
Body: <p>I'm trying to make an external REST API call to rest.php.  I was getting "Unable to decode supplied JSON", but then I figured out I could take the values I was stuffing into json (from the API Explorer) and then make them their own parameters (<a href="https://civicrm.stackexchange.com/questions/4974/rest-api-without-json-just-key-value">REST API without JSON just key=value</a>).  </p>
  
  <p>I'm trying to request contributions between two dates.  In the json style as shown in the API Explorer, it's like this:</p>
  
  <pre><code>&amp;json={"receive_date":{"BETWEEN":["2017-12-01","2017-12-01"]}}
  </code></pre>
  
  <p>I'm trying this, and it's not working:</p>
  
  <pre><code>&amp;received_date[BETWEEN]=2017-12-01,2017-12-02
  </code></pre>
  
  <p>Any ideas?</p>
  
Tags: <api><rest>
Title: REST API 'between' parameters
ThreadText: # REST API 'between' parameters
  
  (Asked by: username_0 on 2017-12-21)
  
  I'm trying to make an external REST API call to rest.php. I was getting "Unable to decode supplied JSON", but then I figured out I could take the values I was stuffing into json (from the API Explorer) and then make them their own parameters ([REST API without JSON just key=value](https://civicrm.stackexchange.com/questions/4974/rest-api-without-json-just-key-value)).
  
  I'm trying to request contributions between two dates. In the json style as shown in the API Explorer, it's like this:
  
  ```
  &json={"receive_date":{"BETWEEN":["2017-12-01","2017-12-01"]}}
  
  ```
  
  I'm trying this, and it's not working:
  
  ```
  &received_date[BETWEEN]=2017-12-01,2017-12-02
  
  ```
  
  Any ideas?
  
  **Tags:** api, rest
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-21. Score: 6 | Accepted answer
  
  I just figured it out:
  
  ```
  &received_date[BETWEEN][]=2017-12-01&received_date[BETWEEN][]=2017-12-02
  
  ```
  
  > **Comments:**
  > **username_1**: Great, you can mark your answer as best answer.  
  > **username_2**: Your answer helped me generalize this to other OR searches, for instance (using REST format, v3 API) &last_name[]=name1&last_name[]=name2 Thx!  
  
  ---
  
  