AlphaAlpha Docs

C R M Opportunity

API calls for CRM opportunities

Create an opportunity

POST
/crm/opportunities
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string",    "invoiceIds": [      "string"    ],    "name": "string",    "productIds": [      "string"    ],    "status": "NEW",    "tags": [      "string"    ]  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get active opportunities

GET
/crm/opportunities/active
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/active"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get opportunities by customer

GET
/crm/opportunities/by-customer/{customerId}
AuthorizationBearer <token>

In: header

Path Parameters

customerId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/by-customer/string"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get opportunities by owner

GET
/crm/opportunities/by-owner/{ownerId}
AuthorizationBearer <token>

In: header

Path Parameters

ownerId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/by-owner/string"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get opportunities by status

GET
/crm/opportunities/by-status/{status}
AuthorizationBearer <token>

In: header

Path Parameters

status*string
Value in"NEW" | "IN_DISCUSSION" | "PROPOSAL_SENT" | "ACCEPTED" | "IN_EXECUTION" | "COMPLETED" | "LOST"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/by-status/NEW"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Download Csv_ Opportunity

GET
/crm/opportunities/csv-export
AuthorizationBearer <token>

In: header

Query Parameters

search?array<>
filters?array<>
page?integer
Default0
Formatint32
size?integer
Default20
Formatint32
sort?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/csv-export"
"string"
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete a list of entities by their IDs

DELETE
/crm/opportunities/delete-list
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/crm/opportunities/delete-list?ids=string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Dynamic Search_ Opportunity

GET
/crm/opportunities/dynamic-search
AuthorizationBearer <token>

In: header

Query Parameters

search?array<>
filters?array<>
page?integer
Default0
Formatint32
size?integer
Default20
Formatint32
sort?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/dynamic-search"
{
  "content": [
    {
      "changeOrders": [
        {
          "amount": 0.1,
          "category": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string"
        }
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "customerId": "string",
      "description": "string",
      "estimateIds": [
        "string"
      ],
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedCloseDate": "2019-08-24T14:15:22Z",
      "fulfillmentDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "invoiceIds": [
        "string"
      ],
      "leadId": "string",
      "name": "string",
      "nextAction": "string",
      "nextActionDueDate": "2019-08-24T14:15:22Z",
      "notes": "string",
      "orderDate": "2019-08-24T14:15:22Z",
      "orderId": "string",
      "ownerId": "string",
      "paymentSchedule": [
        {
          "id": "string",
          "includeChangeOrders": true,
          "invoiceId": "string",
          "label": "string",
          "paymentDueDays": 0,
          "percentage": 0.1,
          "relativeDays": 0,
          "status": "PENDING",
          "triggerStatus": "NEW",
          "triggerType": "STATUS_CHANGE",
          "triggeredAt": "2019-08-24T14:15:22Z"
        }
      ],
      "probability": 0,
      "productIds": [
        "string"
      ],
      "scheduledEndDate": "2019-08-24",
      "scheduledStartDate": "2019-08-24",
      "source": "string",
      "status": "NEW",
      "tags": [
        "string"
      ],
      "teamId": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "value": 0.1
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Dynamic Search Post_ Opportunity

POST
/crm/opportunities/dynamic-search
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/dynamic-search" \  -H "Content-Type: application/json" \  -d '{    "filters": {      "property1": null,      "property2": null    },    "page": 0,    "search": [      "string"    ],    "size": 0,    "sort": [      {        "ascending": true,        "field": "string"      }    ]  }'
{
  "content": [
    {
      "changeOrders": [
        {
          "amount": 0.1,
          "category": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string"
        }
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "customerId": "string",
      "description": "string",
      "estimateIds": [
        "string"
      ],
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedCloseDate": "2019-08-24T14:15:22Z",
      "fulfillmentDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "invoiceIds": [
        "string"
      ],
      "leadId": "string",
      "name": "string",
      "nextAction": "string",
      "nextActionDueDate": "2019-08-24T14:15:22Z",
      "notes": "string",
      "orderDate": "2019-08-24T14:15:22Z",
      "orderId": "string",
      "ownerId": "string",
      "paymentSchedule": [
        {
          "id": "string",
          "includeChangeOrders": true,
          "invoiceId": "string",
          "label": "string",
          "paymentDueDays": 0,
          "percentage": 0.1,
          "relativeDays": 0,
          "status": "PENDING",
          "triggerStatus": "NEW",
          "triggerType": "STATUS_CHANGE",
          "triggeredAt": "2019-08-24T14:15:22Z"
        }
      ],
      "probability": 0,
      "productIds": [
        "string"
      ],
      "scheduledEndDate": "2019-08-24",
      "scheduledStartDate": "2019-08-24",
      "source": "string",
      "status": "NEW",
      "tags": [
        "string"
      ],
      "teamId": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "value": 0.1
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Dynamic search opportunities enriched

GET
/crm/opportunities/dynamic-search-enriched
AuthorizationBearer <token>

In: header

Query Parameters

search?array<>
filters?array<>
page?integer
Default0
Formatint32
size?integer
Default20
Formatint32
sort?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/dynamic-search-enriched"
{
  "content": [
    {
      "adjustedValue": 0.1,
      "changeOrderTotal": 0.1,
      "changeOrders": [
        {
          "amount": 0.1,
          "category": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string"
        }
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "customer": {
        "email": "string",
        "id": "string",
        "name": "string",
        "phone": "string"
      },
      "customerId": "string",
      "description": "string",
      "estimateIds": [
        "string"
      ],
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedCloseDate": "2019-08-24T14:15:22Z",
      "fulfillmentDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "invoiceIds": [
        "string"
      ],
      "lead": {
        "companyName": "string",
        "email": "string",
        "firstName": "string",
        "id": "string",
        "lastName": "string"
      },
      "leadId": "string",
      "name": "string",
      "nextAction": "string",
      "nextActionDueDate": "2019-08-24T14:15:22Z",
      "notes": "string",
      "orderDate": "2019-08-24T14:15:22Z",
      "orderId": "string",
      "owner": {
        "displayName": "string",
        "id": "string",
        "username": "string"
      },
      "ownerId": "string",
      "paymentSchedule": [
        {
          "id": "string",
          "includeChangeOrders": true,
          "invoiceId": "string",
          "label": "string",
          "paymentDueDays": 0,
          "percentage": 0.1,
          "relativeDays": 0,
          "status": "PENDING",
          "triggerStatus": "NEW",
          "triggerType": "STATUS_CHANGE",
          "triggeredAt": "2019-08-24T14:15:22Z"
        }
      ],
      "probability": 0,
      "productIds": [
        "string"
      ],
      "scheduledEndDate": "2019-08-24",
      "scheduledStartDate": "2019-08-24",
      "source": "string",
      "status": "NEW",
      "tags": [
        "string"
      ],
      "team": {
        "color": "string",
        "dailyCapacity": 0,
        "id": "string",
        "name": "string"
      },
      "teamId": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "value": 0.1
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/crm/opportunities/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/find?ids=string"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/crm/opportunities/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/find-all"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find a list of entities by their IDs

GET
/crm/opportunities/find-list
AuthorizationBearer <token>

In: header

Query Parameters

ids?array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/find-list"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/crm/opportunities/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/find/string"
{
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get overdue actions

GET
/crm/opportunities/overdue-actions
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/overdue-actions"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get paginated opportunities

GET
/crm/opportunities/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/page"
{
  "content": [
    {
      "changeOrders": [
        {
          "amount": 0.1,
          "category": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string"
        }
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "customerId": "string",
      "description": "string",
      "estimateIds": [
        "string"
      ],
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedCloseDate": "2019-08-24T14:15:22Z",
      "fulfillmentDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "invoiceIds": [
        "string"
      ],
      "leadId": "string",
      "name": "string",
      "nextAction": "string",
      "nextActionDueDate": "2019-08-24T14:15:22Z",
      "notes": "string",
      "orderDate": "2019-08-24T14:15:22Z",
      "orderId": "string",
      "ownerId": "string",
      "paymentSchedule": [
        {
          "id": "string",
          "includeChangeOrders": true,
          "invoiceId": "string",
          "label": "string",
          "paymentDueDays": 0,
          "percentage": 0.1,
          "relativeDays": 0,
          "status": "PENDING",
          "triggerStatus": "NEW",
          "triggerType": "STATUS_CHANGE",
          "triggeredAt": "2019-08-24T14:15:22Z"
        }
      ],
      "probability": 0,
      "productIds": [
        "string"
      ],
      "scheduledEndDate": "2019-08-24",
      "scheduledStartDate": "2019-08-24",
      "source": "string",
      "status": "NEW",
      "tags": [
        "string"
      ],
      "teamId": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "value": 0.1
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get pipeline stats

GET
/crm/opportunities/pipeline/stats
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/pipeline/stats"
{
  "property1": 0,
  "property2": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get pipeline value

GET
/crm/opportunities/pipeline/value
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/pipeline/value"
{
  "property1": 0.1,
  "property2": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get today's actions

GET
/crm/opportunities/todays-actions
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/todays-actions"
[
  {
    "changeOrders": [
      {
        "amount": 0.1,
        "category": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "customerId": "string",
    "description": "string",
    "estimateIds": [
      "string"
    ],
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "fulfillmentDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "invoiceIds": [
      "string"
    ],
    "leadId": "string",
    "name": "string",
    "nextAction": "string",
    "nextActionDueDate": "2019-08-24T14:15:22Z",
    "notes": "string",
    "orderDate": "2019-08-24T14:15:22Z",
    "orderId": "string",
    "ownerId": "string",
    "paymentSchedule": [
      {
        "id": "string",
        "includeChangeOrders": true,
        "invoiceId": "string",
        "label": "string",
        "paymentDueDays": 0,
        "percentage": 0.1,
        "relativeDays": 0,
        "status": "PENDING",
        "triggerStatus": "NEW",
        "triggerType": "STATUS_CHANGE",
        "triggeredAt": "2019-08-24T14:15:22Z"
      }
    ],
    "probability": 0,
    "productIds": [
      "string"
    ],
    "scheduledEndDate": "2019-08-24",
    "scheduledStartDate": "2019-08-24",
    "source": "string",
    "status": "NEW",
    "tags": [
      "string"
    ],
    "teamId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "value": 0.1
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get enriched opportunity

GET
/crm/opportunities/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/crm/opportunities/string"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update an opportunity

PATCH
/crm/opportunities/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/crm/opportunities/string" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string",    "invoiceIds": [      "string"    ],    "name": "string",    "productIds": [      "string"    ],    "status": "NEW",    "tags": [      "string"    ]  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/crm/opportunities/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/crm/opportunities/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Add change order

POST
/crm/opportunities/{id}/change-orders
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/change-orders" \  -H "Content-Type: application/json" \  -d '{    "amount": 0.1,    "description": "string"  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update change order

PATCH
/crm/opportunities/{id}/change-orders/{changeOrderId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
changeOrderId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/crm/opportunities/string/change-orders/string" \  -H "Content-Type: application/json" \  -d '{    "amount": 0.1,    "description": "string"  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Remove change order

DELETE
/crm/opportunities/{id}/change-orders/{changeOrderId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
changeOrderId*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/crm/opportunities/string/change-orders/string"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Add a comment to an entity

POST
/crm/opportunities/{id}/comment
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/comment" \  -H "Content-Type: application/json" \  -d 'string'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
POST
/crm/opportunities/{id}/link-invoice/{invoiceId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
invoiceId*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/link-invoice/string"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
POST
/crm/opportunities/{id}/link-order/{orderId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
orderId*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/link-order/string"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update next action

PATCH
/crm/opportunities/{id}/next-action
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/crm/opportunities/string/next-action" \  -H "Content-Type: application/json" \  -d '{}'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update payment schedule

PUT
/crm/opportunities/{id}/payment-schedule
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:18080/api/v1/crm/opportunities/string/payment-schedule" \  -H "Content-Type: application/json" \  -d '{    "milestones": [      {        "includeChangeOrders": true,        "label": "string",        "percentage": 0.1,        "triggerType": "STATUS_CHANGE"      }    ]  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Apply payment schedule template

POST
/crm/opportunities/{id}/payment-schedule/apply-template
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/payment-schedule/apply-template"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Generate milestone invoice

POST
/crm/opportunities/{id}/payment-schedule/{milestoneId}/generate-invoice
AuthorizationBearer <token>

In: header

Path Parameters

id*string
milestoneId*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/payment-schedule/string/generate-invoice"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Trigger milestone

POST
/crm/opportunities/{id}/payment-schedule/{milestoneId}/trigger
AuthorizationBearer <token>

In: header

Path Parameters

id*string
milestoneId*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/crm/opportunities/string/payment-schedule/string/trigger"
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update opportunity status

PATCH
/crm/opportunities/{id}/status
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/crm/opportunities/string/status" \  -H "Content-Type: application/json" \  -d '{    "status": "NEW"  }'
{
  "adjustedValue": 0.1,
  "changeOrderTotal": 0.1,
  "changeOrders": [
    {
      "amount": 0.1,
      "category": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string"
    }
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "customer": {
    "email": "string",
    "id": "string",
    "name": "string",
    "phone": "string"
  },
  "customerId": "string",
  "description": "string",
  "estimateIds": [
    "string"
  ],
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedCloseDate": "2019-08-24T14:15:22Z",
  "fulfillmentDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceIds": [
    "string"
  ],
  "lead": {
    "companyName": "string",
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string"
  },
  "leadId": "string",
  "name": "string",
  "nextAction": "string",
  "nextActionDueDate": "2019-08-24T14:15:22Z",
  "notes": "string",
  "orderDate": "2019-08-24T14:15:22Z",
  "orderId": "string",
  "owner": {
    "displayName": "string",
    "id": "string",
    "username": "string"
  },
  "ownerId": "string",
  "paymentSchedule": [
    {
      "id": "string",
      "includeChangeOrders": true,
      "invoiceId": "string",
      "label": "string",
      "paymentDueDays": 0,
      "percentage": 0.1,
      "relativeDays": 0,
      "status": "PENDING",
      "triggerStatus": "NEW",
      "triggerType": "STATUS_CHANGE",
      "triggeredAt": "2019-08-24T14:15:22Z"
    }
  ],
  "probability": 0,
  "productIds": [
    "string"
  ],
  "scheduledEndDate": "2019-08-24",
  "scheduledStartDate": "2019-08-24",
  "source": "string",
  "status": "NEW",
  "tags": [
    "string"
  ],
  "team": {
    "color": "string",
    "dailyCapacity": 0,
    "id": "string",
    "name": "string"
  },
  "teamId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "value": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}