Title: WordPress EndPoint URL Format
Last modified: September 4, 2019

---

# WordPress EndPoint URL Format

 *  [ahmeddawood88](https://wordpress.org/support/users/ahmeddawood88/)
 * (@ahmeddawood88)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/wordpress-endpoint-url-format/)
 * I have wrote an endpoint in WordPress and it works just fine. The problem is 
   with the URL. The current format of the URL request must be like this:
 * [https://iotkidsiq.com/wp-json/zaindob/v1/sync_order/key=011900/msisdn=019009](https://iotkidsiq.com/wp-json/zaindob/v1/sync_order/key=011900/msisdn=019009)
 * However, The URL request must be in this format:
 * [https://iotkidsiq.com/wp-json/zaindob/v1/sync_order?key=011900&msisdn=019009](https://iotkidsiq.com/wp-json/zaindob/v1/sync_order?key=011900&msisdn=019009)
 * How to format that?
 * My current code:
 *     ```
       register_rest_route( 'zaindob/v1', '/sync_order/' . 'key=' . '(?P<key>\d+)' .  '/msisdn=' . '(?P<msisdn>\d+)' , array( 
   
           'methods' => 'GET',
           'callback' => 'updatetable',
         ) );
       } );
       ```
   
    -  This topic was modified 6 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Formatting

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Vladimir](https://wordpress.org/support/users/bcon/)
 * (@bcon)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/wordpress-endpoint-url-format/#post-11899705)
 * Why do you want to use dynamic URL?
 *  Thread Starter [ahmeddawood88](https://wordpress.org/support/users/ahmeddawood88/)
 * (@ahmeddawood88)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/wordpress-endpoint-url-format/#post-11901268)
 * [@bcon](https://wordpress.org/support/users/bcon/) it is not up to me. The third
   party processor wants it to be that way
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/wordpress-endpoint-url-format/#post-11903674)
 * Anything after a `?` in a request is really not part of the “official URL” and
   is actually an appended query string. So your registered route can only include
   portions up to the `?`, so just the `'/sync_order/'`. Your endpoint handler would
   then get the added query string values from the `$_GET` array.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress EndPoint URL Format’ is closed to new replies.

## Tags

 * [endpoint](https://wordpress.org/support/topic-tag/endpoint/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/wordpress-endpoint-url-format/#post-11903674)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
