User Guide  /  API Documentation

Learn everything about Enterprised Cloud API endpoint deals and check how it works:

List Deals

Request Method GET

API Endpoint /wp-json/ndpv/v1/deals?table_view=true

Response Status Code 200 OK

 

{
  "success": true,
  "data": {
    "result": [
      {
        "id": "3542",
        "title": "Custom WordPress Website",
        "status": "",
        "budget": "10000",
        "currency": "USD",
        "probability": "50",
        "stage_id": {
          "id": 3,
          "label": "Opportunity",
          "color": "#EBA45D",
          "bg_color": "#FFF0F1"
        },
        "tags": [
          {
            "id": 16,
            "label": "Design"
          }
        ],
        "person": {
          "id": 3540,
          "first_name": "John Smith",
          "org_id": "",
          "org_name": "",
          "email": "john.smith@gmail.com",
          "mobile": "+1 650-555-0199",
          "img": null
        },
        "org": {
          "id": 3541,
          "name": "john corp",
          "person_id": "",
          "first_name": "",
          "email": "john.smith@gmail.com",
          "mobile": "+1 650-555-0199",
          "logo": null
        },
        "date": "April 2, 2023"
      }
    ],
    "total": 1,
    "extra": {
      "custom_field": []
    }
  }
}

Create Deal

Request Method POST

API Endpoint /wp-json/ndpv/v1/deals

Request Payload application/json

  • budget : String
  • currency: String (e.g. “USD”, “BDT” etc)
  • date: Date | false
  • desc: Longtext
  • email: String
  • first_name: String
  • id: null
  • lead_id: String
  • mobile: String
  • note: Longtext
  • org_id: null
  • org_name: String
  • person_id: null
  • probability: Integer
  • stage_id: String
  • tags: Array of String
  • title: String
{
	"budget": "",
	"currency": "USD",
	"date": false,
	"desc": "",
	"email": "jacob.evans@hotmail.com",
	"first_name": "Jacob",
	"id": null,
	"lead_id": "",
	"mobile": "",
	"note": "",
	"org_id": null,
	"org_name": "",
	"person_id": null,
	"probability": 50,
	"stage_id": "3",
	"tags": [
		"16",
		"51"
	],
	"title": "Branding and Logo Design"
}

Response Status Code 200 OK

{
	"success": true,
	"data": 3557
}

Read Deal

Request Method GET

API Endpoint /wp-json/ndpv/v1/deals/{DEAL_ID}

Query String Parameters

  • DEAL_ID

Response Status Code 200 OK

{
  "success": true,
  "data": {
    "id": 3542,
    "tab_id": 3542,
    "title": "Custom WordPress Website",
    "status": "",
    "budget": "10000",
    "currency": "USD",
    "probability": 50,
    "note": "",
    "desc": "Fitness Plus needs a poster design for an upcoming promotion to attract new members. They want the design to be bold and attention-grabbing, with motivational messaging and photos of their fitness facilities.",
    "custom_field": [],
    "stage_id": {
      "id": 3,
      "label": "Opportunity",
      "color": "#EBA45D",
      "bg_color": "#FFF0F1",
      "type": ""
    },
    "tags": [
      {
        "id": 16,
        "label": "Design"
      }
    ],
    "person": {
      "id": 3540,
      "first_name": "John Smith",
      "org_id": "",
      "org_name": "",
      "email": "john.smith@gmail.com",
      "mobile": "+1 650-555-0199",
      "img": null,
      "web": "",
      "country": "",
      "region": "",
      "address": ""
    },
    "org": {
      "id": 3541,
      "name": "john corp",
      "person_id": "",
      "first_name": "",
      "email": "john.smith@gmail.com",
      "mobile": "+1 650-555-0199",
      "logo": null,
      "web": "",
      "country": "",
      "region": "",
      "address": ""
    },
    "date": false
  }
}

Update Deal

Request Method PUT

API Endpoint /wp-json/ndpv/v1/deals/{DEAL_ID}

Query String Parameters

  • DEAL_ID

Request Payload application/json

  • budget: String,
  • currency: “USD”,
  • custom_field: [],
  • date: false,
  • desc: “”,
  • email: “rebecca.johnson@aol.com“,
  • first_name: “Rebecca Jonson”,
  • id: 3393,
  • mobile: “”,
  • note: “”,
  • org: {},
  • person: Person Object ,
  • person_id: 3359,
  • probability: 50,
  • stage_id: 59,
  • status: “”,
  • tab_id: 3393,
  • tags: [],
  • title: “Artificial Intelligence Chatbot”,
  • web: “”

Person Object

  • address: “”,
  • country: “”,
  • email: “rebecca.johnson@aol.com“,
  • first_name: “Rebecca Jonson”,
  • id: 3359,
  • img: Img Object,
  • mobile: “”,
  • org_id: “”,
  • org_name: “”,
  • region: “”,
  • web: “”

Img Object

{
	"budget": "5000",
	"currency": "USD",
	"custom_field": [],
	"date": false,
	"desc": "",
	"email": "rebecca.johnson@aol.com",
	"first_name": "Rebecca Jonson",
	"id": 3393,
	"mobile": "",
	"note": "",
	"org": {},
	"person": {
		"address": "",
		"country": "",
		"email": "rebecca.johnson@aol.com",
		"first_name": "Rebecca Jonson",
		"id": 3359,
		"img": {
			"id": "3358",
			"src": "https://example.com/avatar.png"
		},
		"mobile": "",
		"org_id": "",
		"org_name": "",
		"region": "",
		"web": ""
	},
	"person_id": 3359,
	"probability": 50,
	"stage_id": 59,
	"status": "",
	"tab_id": 3393,
	"tags": [],
	"title": "Artificial Intelligence Chatbot",
	"web": ""
}

Response Status Code 200 OK

{
	"success": true,
	"data": 3393
}

Delete Deal

Request Method DELETE

API Endpoint /wp-json/ndpv/v1/deals/{DEAL_ID}

Query String Parameters

  • DEAL_ID

Response Status Code 200 OK

{
	"success": true,
	"data": [
		"3393"
	]
}