Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Update wp-rest.md #854

Merged
merged 4 commits into from
Sep 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/api/v3/wp-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ Requirements:
- `api_key` - **required**, the contact api key
- `entity` - **required**, the API entity
- `action` - **required**, the API action
- `json` - **optional**, json formatted string with the API parameters/argumets, or `1` as in `json=1`
- `json` - **optional**, json formatted string with the API parameters/arguments, or `1` as in `json=1`

It mimics CiviCRM's REST [interface](../interfaces.md), by default all calls to `civicrm/v3/rest` return XML formatted results, to get `json` formatted result pass `json=1` or a json formatted string with the API parameters, like in the example 2 below.
It mimics CiviCRM's REST [interface](../interfaces.md), by default all calls to `civicrm/v3/rest` return XML formatted results. To get `json` formatted results pass `json=1` or a json formatted string with the API parameters, like in example 2 below.

**Examples**:

1. `https://example.com/wp-json/civicrm/v3/rest?entity=Contact&action=get&key=<site_key>&api_key=<api_key>&group=Administrators`

2. `https://example.com/wp-json/civicrm/v3/rest?entity=Contact&action=get&key=<site_key>&api_key=<api_key>&json={"group": "Administrators"}`

2. `civicrm/v3/url` - a substition for `civicrm/extern/url.php` mailing tracking
2. `civicrm/v3/url` - a substitution for `civicrm/extern/url.php` to track when links in mailings are clicked.

3. `civicrm/v3/open` - a substition for `civicrm/extern/open.php` mailing tracking
3. `civicrm/v3/open` - a substitution for `civicrm/extern/open.php` to track when recipients open mailings.

4. `civicrm/v3/authorizeIPN` - a substition for `civicrm/extern/authorizeIPN.php` (for testing Authorize.net as per [docs](https://docs.civicrm.org/sysadmin/en/latest/setup/payment-processors/authorize-net/#shell-script-testing-method))
4. `civicrm/v3/authorizeIPN` - a substitution for `civicrm/extern/authorizeIPN.php` (for testing Authorize.net as per [docs](https://docs.civicrm.org/sysadmin/en/latest/setup/payment-processors/authorize-net/#shell-script-testing-method))

**_Note_**: this endpoint has **not been tested**

5. `civicrm/v3/ipn` - a substition for `civicrm/extern/ipn.php` (for PayPal Standard and Pro live transactions)
5. `civicrm/v3/ipn` - a substitution for `civicrm/extern/ipn.php` (for PayPal Standard and Pro live transactions)

**_Note_**: this endpoint has **not been tested**

6. `civicrm/v3/cxn` - a substition for `civicrm/extern/cxn.php`
6. `civicrm/v3/cxn` - a substitution for `civicrm/extern/cxn.php`

7. `civicrm/v3/pxIPN` - a substition for `civicrm/extern/pxIPN.php`
7. `civicrm/v3/pxIPN` - a substitution for `civicrm/extern/pxIPN.php`

**_Note_**: this endpoint has **not been tested**

8. `civicrm/v3/widget` - a substition for `civicrm/extern/widget.php`
8. `civicrm/v3/widget` - a substitution for `civicrm/extern/widget.php`

9. `civicrm/v3/soap` - a substition for `civicrm/extern/soap.php`
9. `civicrm/v3/soap` - a substitution for `civicrm/extern/soap.php`

**_Note_**: this endpoint has **not been tested**

Expand Down