The Opportunity object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: Open
Default: Prospecting
Default: 100
{
"id": "opportunity_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"opportunity_from": "opportunity_from_example",
"party_name": "party_name_example",
"customer_name": "customer_name_example",
"title": "title_example",
"opportunity_type": "opportunity_type_example",
"status": "Open",
"order_lost_reason": "order_lost_reason_example",
"expected_closing": "expected_closing_example",
"currency": "USD",
"opportunity_amount": 0,
"sales_stage": "Prospecting",
"probability": 100,
"customer_address": "customer_address_example",
"address_display": "address_display_example",
"territory": "territory_example",
"customer_group": "customer_group_example",
"contact_person": "contact_person_example",
"contact_display": "contact_display_example",
"contact_email": "[email protected]",
"contact_mobile": "contact_mobile_example",
"company": "Example Corp",
"transaction_date": "2024-01-15",
"first_response_time": 0,
"language": "language_example",
"base_opportunity_amount": 0,
"base_total": 0,
"total": 0,
"conversion_rate": 0,
"no_of_employees": "no_of_employees_example",
"annual_revenue": 0,
"industry": "industry_example",
"market_segment": "market_segment_example",
"opportunity_owner": "opportunity_owner_example",
"website": "website_example",
"whatsapp": "whatsapp_example",
"phone": "phone_example",
"phone_ext": "phone_ext_example",
"job_title": "job_title_example",
"city": "city_example",
"state": "state_example",
"country": "country_example",
"utm_source": "utm_source_example",
"utm_campaign": "utm_campaign_example",
"utm_medium": "utm_medium_example",
"utm_content": "utm_content_example"
} /api/crm/opportunity/{id} Retrieve a opportunity
Retrieves the details of an existing opportunity. Supply the unique opportunity ID that was returned from a previous request.
Path parameters
The identifier of the opportunity to retrieve.
Returns
Returns the opportunity object if a valid identifier was provided.
curl https://api.overplane.dev/api/crm/opportunity/opportunity_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "opportunity_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"opportunity_from": "opportunity_from_example",
"party_name": "party_name_example",
"customer_name": "customer_name_example",
"title": "title_example",
"opportunity_type": "opportunity_type_example",
"status": "Open",
"order_lost_reason": "order_lost_reason_example",
"expected_closing": "expected_closing_example",
"currency": "USD",
"opportunity_amount": 0,
"sales_stage": "Prospecting",
"probability": 100,
"customer_address": "customer_address_example",
"address_display": "address_display_example",
"territory": "territory_example",
"customer_group": "customer_group_example",
"contact_person": "contact_person_example",
"contact_display": "contact_display_example",
"contact_email": "[email protected]",
"contact_mobile": "contact_mobile_example",
"company": "Example Corp",
"transaction_date": "2024-01-15",
"first_response_time": 0,
"language": "language_example",
"base_opportunity_amount": 0,
"base_total": 0,
"total": 0,
"conversion_rate": 0,
"no_of_employees": "no_of_employees_example",
"annual_revenue": 0,
"industry": "industry_example",
"market_segment": "market_segment_example",
"opportunity_owner": "opportunity_owner_example",
"website": "website_example",
"whatsapp": "whatsapp_example",
"phone": "phone_example",
"phone_ext": "phone_ext_example",
"job_title": "job_title_example",
"city": "city_example",
"state": "state_example",
"country": "country_example",
"utm_source": "utm_source_example",
"utm_campaign": "utm_campaign_example",
"utm_medium": "utm_medium_example",
"utm_content": "utm_content_example"
} /api/crm/opportunity List all opportunitys
Returns a list of opportunitys. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of opportunity objects.
curl https://api.overplane.dev/api/crm/opportunity \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "opportunity_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"opportunity_from": "opportunity_from_example",
"party_name": "party_name_example",
"customer_name": "customer_name_example",
"title": "title_example",
"opportunity_type": "opportunity_type_example",
"status": "Open",
"order_lost_reason": "order_lost_reason_example",
"expected_closing": "expected_closing_example",
"currency": "USD",
"opportunity_amount": 0,
"sales_stage": "Prospecting",
"probability": 100,
"customer_address": "customer_address_example",
"address_display": "address_display_example",
"territory": "territory_example",
"customer_group": "customer_group_example",
"contact_person": "contact_person_example",
"contact_display": "contact_display_example",
"contact_email": "[email protected]",
"contact_mobile": "contact_mobile_example",
"company": "Example Corp",
"transaction_date": "2024-01-15",
"first_response_time": 0,
"language": "language_example",
"base_opportunity_amount": 0,
"base_total": 0,
"total": 0,
"conversion_rate": 0,
"no_of_employees": "no_of_employees_example",
"annual_revenue": 0,
"industry": "industry_example",
"market_segment": "market_segment_example",
"opportunity_owner": "opportunity_owner_example",
"website": "website_example",
"whatsapp": "whatsapp_example",
"phone": "phone_example",
"phone_ext": "phone_ext_example",
"job_title": "job_title_example",
"city": "city_example",
"state": "state_example",
"country": "country_example",
"utm_source": "utm_source_example",
"utm_campaign": "utm_campaign_example",
"utm_medium": "utm_medium_example",
"utm_content": "utm_content_example"
}
],
"has_more": false,
"total": 1
} /api/crm/opportunity Create a opportunity
Creates a new opportunity object.
Body parameters
Default: Open
Default: Prospecting
Default: 100
Returns
Returns the newly created opportunity object if the call succeeded.
curl https://api.overplane.dev/api/crm/opportunity \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"opportunity_from":"opportunity_from_example","party_name":"party_name_example","company":"Example Corp","transaction_date":"2024-01-15"}' {
"id": "opportunity_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"opportunity_from": "opportunity_from_example",
"party_name": "party_name_example",
"customer_name": "customer_name_example",
"title": "title_example",
"opportunity_type": "opportunity_type_example",
"status": "Open",
"order_lost_reason": "order_lost_reason_example",
"expected_closing": "expected_closing_example",
"currency": "USD",
"opportunity_amount": 0,
"sales_stage": "Prospecting",
"probability": 100,
"customer_address": "customer_address_example",
"address_display": "address_display_example",
"territory": "territory_example",
"customer_group": "customer_group_example",
"contact_person": "contact_person_example",
"contact_display": "contact_display_example",
"contact_email": "[email protected]",
"contact_mobile": "contact_mobile_example",
"company": "Example Corp",
"transaction_date": "2024-01-15",
"first_response_time": 0,
"language": "language_example",
"base_opportunity_amount": 0,
"base_total": 0,
"total": 0,
"conversion_rate": 0,
"no_of_employees": "no_of_employees_example",
"annual_revenue": 0,
"industry": "industry_example",
"market_segment": "market_segment_example",
"opportunity_owner": "opportunity_owner_example",
"website": "website_example",
"whatsapp": "whatsapp_example",
"phone": "phone_example",
"phone_ext": "phone_ext_example",
"job_title": "job_title_example",
"city": "city_example",
"state": "state_example",
"country": "country_example",
"utm_source": "utm_source_example",
"utm_campaign": "utm_campaign_example",
"utm_medium": "utm_medium_example",
"utm_content": "utm_content_example"
} /api/crm/opportunity/{id} Update a opportunity
Updates the specified opportunity by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the opportunity to update.
Body parameters
Default: Open
Default: Prospecting
Default: 100
Returns
Returns the updated opportunity object.
curl https://api.overplane.dev/api/crm/opportunity/opportunity_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"opportunity_from":"opportunity_from_example","party_name":"party_name_example"}' {
"id": "opportunity_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"opportunity_from": "opportunity_from_example",
"party_name": "party_name_example",
"customer_name": "customer_name_example",
"title": "title_example",
"opportunity_type": "opportunity_type_example",
"status": "Open",
"order_lost_reason": "order_lost_reason_example",
"expected_closing": "expected_closing_example",
"currency": "USD",
"opportunity_amount": 0,
"sales_stage": "Prospecting",
"probability": 100,
"customer_address": "customer_address_example",
"address_display": "address_display_example",
"territory": "territory_example",
"customer_group": "customer_group_example",
"contact_person": "contact_person_example",
"contact_display": "contact_display_example",
"contact_email": "[email protected]",
"contact_mobile": "contact_mobile_example",
"company": "Example Corp",
"transaction_date": "2024-01-15",
"first_response_time": 0,
"language": "language_example",
"base_opportunity_amount": 0,
"base_total": 0,
"total": 0,
"conversion_rate": 0,
"no_of_employees": "no_of_employees_example",
"annual_revenue": 0,
"industry": "industry_example",
"market_segment": "market_segment_example",
"opportunity_owner": "opportunity_owner_example",
"website": "website_example",
"whatsapp": "whatsapp_example",
"phone": "phone_example",
"phone_ext": "phone_ext_example",
"job_title": "job_title_example",
"city": "city_example",
"state": "state_example",
"country": "country_example",
"utm_source": "utm_source_example",
"utm_campaign": "utm_campaign_example",
"utm_medium": "utm_medium_example",
"utm_content": "utm_content_example"
} /api/crm/opportunity/{id} Delete a opportunity
Permanently deletes a opportunity. This cannot be undone.
Path parameters
The identifier of the opportunity to delete.
Returns
Returns a confirmation that the opportunity has been deleted.
curl https://api.overplane.dev/api/crm/opportunity/opportunity_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "opportunity_abc123",
"deleted": true
} Line items
Child objects that belong to this opportunity. These are accessed via the parent's ID.
Opportunity Item
Attributes
Endpoints
/api/crm/opportunity-item?parent_id={id} /api/crm/opportunity-item /api/crm/opportunity-item/{id} /api/crm/opportunity-item/{id} /api/crm/opportunity-item/reorder {
"id": "opportunity-item_abc123",
"idx": 1,
"opportunity_id": "opportunity_id_example",
"item_code": "item_code_example",
"qty": 1,
"item_group": "item_group_example",
"brand": "brand_example",
"uom": "uom_example",
"item_name": "item_name_example",
"description": "description_example",
"image": "image_example",
"image_view": "image_view_example",
"rate": 0,
"base_amount": 0,
"amount": 0,
"base_rate": 0
} Opportunity Lost Reason Detail
Attributes
Endpoints
/api/crm/opportunity-lost-reason-detail?parent_id={id} /api/crm/opportunity-lost-reason-detail /api/crm/opportunity-lost-reason-detail/{id} /api/crm/opportunity-lost-reason-detail/{id} /api/crm/opportunity-lost-reason-detail/reorder {
"id": "opportunity-lost-reason-detail_abc123",
"idx": 1,
"opportunity_id": "opportunity_id_example",
"lost_reason": "lost_reason_example"
}