Contents
On this page

List Opportunities - Plugixa CRM

GET /plugixa-crm/v1/opportunities

List opportunities (deals), one page at a time.

Any user with access to Plugixa CRM. With Plugixa CRM Pro roles, the list only holds the opportunities the user’s role lets them read.

Request

GET https://your-site.example/wp-json/plugixa-crm/v1/opportunities?status=open&orderby=close_date&order=asc

Query parameters

Name Type Default Description
status string open, won or lost.
account_id integer Opportunities of this account only.

Plus the list parameters every paged list accepts. search matches the name. orderby accepts id, name, amount, amount_base, close_date, status, probability, created_at, modified_at. Field filters (field__operator=value, see Filters) work on assigned_user_id, created_at, modified_at, stage_id, status, amount, close_date, probability, account_id, plus Pro custom fields marked filterable.

Responses

200 OK. data is one page of opportunities.

{
  "success": true,
  "data": [
    {
      "id": 24,
      "name": "Northwind Traders: platform licence",
      "account_id": 12,
      "contact_id": 31,
      "lead_id": null,
      "pipeline_id": 1,
      "stage_id": 3,
      "amount": 12000,
      "currency": "EUR",
      "amount_base": 13020,
      "probability": 50,
      "close_date": "2026-12-15",
      "status": "open",
      "lost_reason": "",
      "source": "",
      "description": "",
      "last_stage_change_at": "2026-11-12 09:30:00",
      "closed_at": null,
      "assigned_user_id": "3",
      "created_by": "1",
      "modified_by": "1",
      "created_at": "2026-11-12 09:30:00",
      "modified_at": "2026-11-12 09:30:00",
      "deleted_at": null
    }
  ],
  "meta": {
    "total": 14,
    "pages": 1
  }
}
Field Type Meaning
data[].id integer The opportunity’s id
data[].account_id integer|null The account
data[].contact_id integer|null The contact
data[].pipeline_id integer The pipeline
data[].stage_id integer The current stage
data[].status string open, won or lost, taken from the stage’s type
data[].amount number The value in currency
data[].currency string Three-letter currency code
data[].amount_base number amount converted to the site’s currency
meta.total integer Opportunities matching, before paging
meta.pages integer Number of pages at this per_page

List rows are the opportunity alone. Get Opportunity adds its stage history and its pipeline’s stages.

Errors

Status Code When
400 plugixa_crm_unknown_filter A field__operator parameter names a field this list cannot filter on.
400 plugixa_crm_unknown_operator The operator does not work on that field’s type.
400 plugixa_crm_missing_value The filter needs a value, or two for between.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-crm/v1/opportunities?status=open&orderby=close_date&order=asc" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'status'  => 'open',
    'orderby' => 'close_date',
    'order'   => 'asc',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/opportunities?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const query = new URLSearchParams({ status: 'open', orderby: 'close_date', order: 'asc' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-crm/v1/opportunities?${query}`, {
  headers: {
    'Authorization': auth,
  },
});
const { data, meta } = await response.json();

Quick Links

Share