REI Software

REI Software Help Library

Search for any help questions or topics.

Opportunity API

O
Orlando
Updated 1 year ago

Opportunity

 

GET/v1/pipelines/:pipelineId/opportunities

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities?startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&limit=20

Get opportunities.



Allowed filter in the query

View More

Fields

Types

Example

Allowed Options

stageId

string

7915dedc-8f18-44d5-8bc3-77c04e994a10


monetaryValue

number

220


assignedTo

string

082goXVW3lIExEQPOnd3


campaignId

string

Y2I9XM7aO1hncuSOlc9L


startDate

number

epoch timestamp. for ex: 1598107050459


endDate

number

epoch timestamp. for ex: 1614091050459


query

string

?query=john@deo.com


status

string

open

  • open

  • won

  • lost

  • abandoned




Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

PARAMS

startAfterId

UIaE1WjAwWKdlyD7osQI

Start After Id

startAfter

1603870249758

Start After

limit

20

Limit Per Page records count. will allow maximum up to 100 and default will be 20

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

 

 

Successful response

Example Request

curl --location --request GET 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities?startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&limit=20' \

--header 'Authorization: Bearer <token>'

Example Response

200 OK

BodyHeader(1)

View More

{

  "opportunities": [

    {

      "id": "7XExm1wr8gFeZpl6rQny",

      "name": "First Opp",

      "monetaryValue": 120,

      "pipelineId": "bCkKGpDsyPP4peuKowkG",

      "pipelineStageId": "8b897c8f-b859-49c1-88f2-ed590708a85c",

      "assignedTo": "hxHGVRb1YJUscrCB8eXK",

      "status": "open",

      "source": "form",

GET/v1/pipelines/:pipelineId/opportunities/:opportunityId

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities/:opportunityId

Get opportunity by id.

Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

opportunityId

123akv4LFn6C9frZoy3e

(Required) Opportunity Id

 

 

Successful response

Example Request

curl --location --request GET 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities/123akv4LFn6C9frZoy3e' \

--header 'Authorization: Bearer <token>'

Example Response

200 OK

BodyHeader(1)

View More

{

  "id": "7XExm1wr8gFeZpl6rQny",

  "name": "First Opp",

  "monetaryValue": 120,

  "pipelineId": "bCkKGpDsyPP4peuKowkG",

  "pipelineStageId": "8b897c8f-b859-49c1-88f2-ed590708a85c",

  "assignedTo": "hxHGVRb1YJUscrCB8eXK",

  "status": "open",

  "source": "form",

  "lastStatusChangeAt": "2020-10-29T09:39:35.472Z",

  "createdAt": "2020-10-29T09:31:30.255Z",

PUT/v1/pipelines/:pipelineId/opportunities/:opportunityId

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities/:opportunityId

Update Opportunity.



Required JSON fields in the body

View More

Fields

Types

Example

Allowed Options

title

string

First Opps


stageId

string

7915dedc-8f18-44d5-8bc3-77c04e994a10


status

string

open

  • open

  • won

  • lost

  • abandoned




Allowed JSON fields in the body

Fields

Types

Example

monetaryValue

number

220

assignedTo

string

082goXVW3lIExEQPOnd3

contactId

string

mTkSCb1UBjb5tk4OvB69

email

string

john@deo.com

name

string

John Deo

phone

string

+1202-555-0107

tags

array

["tag1", "tag2"]

companyName

string

Tesla Inc



Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

opportunityId

123akv4LFn6C9frZoy3e

(Required) Opportunity Id

BODYraw

View More

{

    "title": "First Opp",

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",

    "email": "elon@musk.com",

    "phone": "+1202-555-0107",

    "assignedTo": "082goXVW3lIExEQPOnd3",

    "monetaryValue": 122.22,

    "source": "public api",

    "contactId": "mTkSCb1UBjb5tk4OvB69",

    "name": "Elon Musk",

 

 

Successful response

Example Request

View More

curl --location --request PUT 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities/123akv4LFn6C9frZoy3e' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

    "title": "First Opp",

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",

    "email": "elon@musk.com",

    "phone": "+1202-555-0107",

    "assignedTo": "082goXVW3lIExEQPOnd3",

    "monetaryValue": 122.22,

    "source": "public api",

Example Response

200 OK

BodyHeader(1)

View More

{

  "id": "7XExm1wr8gFeZpl6rQny",

  "name": "First Opp",

  "monetaryValue": 120,

  "pipelineId": "bCkKGpDsyPP4peuKowkG",

  "pipelineStageId": "8b897c8f-b859-49c1-88f2-ed590708a85c",

  "assignedTo": "hxHGVRb1YJUscrCB8eXK",

  "status": "open",

  "source": "form",

  "lastStatusChangeAt": "2020-10-29T09:39:35.472Z",

  "createdAt": "2020-10-29T09:31:30.255Z",

DEL/v1/pipelines/:pipelineId/opportunities/:opportunityId

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities/:opportunityId

Delete opportunity.

Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

opportunityId

123akv4LFn6C9frZoy3e

(Required) Opportunity Id

 

 

Successful response

Example Request

curl --location --request DELETE 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities/123akv4LFn6C9frZoy3e' \

--header 'Authorization: Bearer <token>'

Example Response

200 OK

BodyHeader(1)

""

POST/v1/pipelines/:pipelineId/opportunities/

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities/

Create opportunity.



Required JSON fields in the body

Fields

Types

Example

Allowed Options

title

string

First Opps


stageId

string

7915dedc-8f18-44d5-8bc3-77c04e994a10


contactId (or email or phone)

string

mTkSCb1UBjb5tk4OvB69


email (or contactId or phone)

string

john@deo.com


phone (or contactId or email)

string

+1202-555-0107


status

string

open

  • open

  • won

  • lost

  • abandoned




Allowed JSON fields in the body

Fields

Types

Example

monetaryValue

number

220

assignedTo

string

082goXVW3lIExEQPOnd3

name

string

John Deo

tags

array

["tag1", "tag2"]

companyName

string

Tesla Inc



Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

BODYraw

View More

{

    "title": "First Opp",

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",

    "email": "elon@musk.com",

    "phone": "+1202-555-0107",

    "assignedTo": "082goXVW3lIExEQPOnd3",

    "monetaryValue": 122.22,

    "source": "public api",

    "contactId": "mTkSCb1UBjb5tk4OvB69",

    "name": "Elon Musk",

 

 

Successful response

Example Request

View More

curl --location --request POST 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities/' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

    "title": "First Opp",

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",

    "email": "elon@musk.com",

    "phone": "+1202-555-0107",

    "assignedTo": "082goXVW3lIExEQPOnd3",

    "monetaryValue": 122.22,

    "source": "public api",

Example Response

200 OK

BodyHeader(1)

View More

{

  "id": "7XExm1wr8gFeZpl6rQny",

  "name": "First Opp",

  "monetaryValue": 120,

  "pipelineId": "bCkKGpDsyPP4peuKowkG",

  "pipelineStageId": "8b897c8f-b859-49c1-88f2-ed590708a85c",

  "assignedTo": "hxHGVRb1YJUscrCB8eXK",

  "status": "open",

  "source": "form",

  "lastStatusChangeAt": "2020-10-29T09:39:35.472Z",

  "createdAt": "2020-10-29T09:31:30.255Z",

PUT/v1/pipelines/:pipelineId/opportunities/:opportunityId/status

https://rest.reisoftware.com/v1/pipelines/:pipelineId/opportunities/:opportunityId/status

Update opportunity status and stage.

Authorization:

Provide your location api key (Bearer Token).  

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

pipelineId

bCkKGpDsyPP4peuKowkG

(Required) Pipeline Id

opportunityId

123akv4LFn6C9frZoy3e

(Required) Opportunity Id

BODYraw

{

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10"

}

 

 

Successful response

Example Request

curl --location --request PUT 'https://rest.reisoftware.com/v1/pipelines/bCkKGpDsyPP4peuKowkG/opportunities/123akv4LFn6C9frZoy3e/status' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

    "status": "open",

    "stageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10"

}'

Example Response

200 OK

BodyHeader(1)

""


😞 😐 😃