Create, update and read leads and opportunities. New and updated leads and opportunities can start automations.
All endpoints use the base URL https://webapi.mymarketing.co.il and an API key in the Authorization header. New to the API? Start with Get started with the ActiveTrail API.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
POST | /api/ | Add new Lead |
PUT | /api/ | Modify existing lead |
GET | /api/ | Get lead by its id |
POST | /api/ | Add new Opportunity |
PUT | /api/ | Modify existing opportunity |
GET | /api/ | Get opportunity by its id |
Endpoint details
Add new Lead
POST https://webapi.mymarketing.co.il/api/salesLifeCycle/Lead
| Parameter | In | Type | Description |
|---|---|---|---|
leadId | body | string | The Lead ID. Required. |
leadName | body | string | The name of the Lead. |
externalId | body | string | The external user ID. Required. |
externalName | body | string | The external name. |
firstName | body | string | The first name of the contact. |
lastName | body | string | The last name of the contact. |
email | body | string | The email address of the contact. |
mobile | body | string | The mobile number of the contact. |
netAmount | body | decimal number | The net amount of the lead. |
tax | body | decimal number | The tax applied to the lead. |
coupon | body | string | The coupon code used for the lead. |
quantity | body | decimal number | The quantity of items in the lead. |
totalAmount | body | decimal number | The total amount of the lead. |
address | body | string | The address of the lead. |
city | body | string | The city. |
products | body | Collection of Product | The list of products in the lead. |
url | body | string | The URL associated with the lead. |
expectedPurchaseDate | body | date | The expected purchase date. Required. |
lastUpdate | body | date | The last update date of the lead. |
purchaseType | body | string | The type of purchase. |
status | body | string | The status of purchase. |
storeId | body | integer | The store ID associated with the lead. |
locationType | body | SalesLifecycleLocationType | The location type associated with the lead. |
ext1 … date3 | body | string / date / number | Custom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail. |
subscriptionStatus | body | boolean | Whether the contact approved subscription. |
createContact | body | boolean | Whether the contact should be created. |
The request body is a JSON object (ApiPostLead).
Full reference, request and response samples
Modify existing lead
PUT https://webapi.mymarketing.co.il/api/salesLifeCycle/Lead/{leadId}
| Parameter | In | Type | Description |
|---|---|---|---|
leadId | path | string | Lead ID to update. Required. |
leadName | body | string | The name of the Lead. |
externalId | body | string | The external user ID. Required. |
externalName | body | string | The external name. |
firstName | body | string | The first name of the contact. |
lastName | body | string | The last name of the contact. |
email | body | string | The email address of the contact. |
mobile | body | string | The mobile number of the contact. |
netAmount | body | decimal number | The net amount of the lead. |
tax | body | decimal number | The tax applied to the lead. |
coupon | body | string | The coupon code used for the lead. |
quantity | body | decimal number | The quantity of items in the lead. |
totalAmount | body | decimal number | The total amount of the lead. |
address | body | string | The address of the lead. |
city | body | string | The city. |
products | body | Collection of Product | The list of products in the lead. |
url | body | string | The URL associated with the lead. |
expectedPurchaseDate | body | date | The expected purchase date. Required. |
lastUpdate | body | date | The last update date of the lead. |
purchaseType | body | string | The type of purchase. |
status | body | string | The status of purchase. |
storeId | body | integer | The store ID associated with the lead. |
locationType | body | SalesLifecycleLocationType | The location type associated with the lead. |
ext1 … date3 | body | string / date / number | Custom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail. |
subscriptionStatus | body | boolean | Whether the contact approved subscription. |
createContact | body | boolean | Whether the contact should be created. |
The request body is a JSON object (ApiUpdateLead).
Full reference, request and response samples
Get lead by its id
GET https://webapi.mymarketing.co.il/api/salesLifeCycle/Lead/{leadId}
| Parameter | In | Type | Description |
|---|---|---|---|
leadId | path | string | Lead ID. Required. |
Full reference, request and response samples
Add new Opportunity
POST https://webapi.mymarketing.co.il/api/salesLifeCycle/Opportunity
| Parameter | In | Type | Description |
|---|---|---|---|
opportunityId | body | string | The opportunity ID. Required. |
opportunityName | body | string | The name of the opportunity. |
externalId | body | string | The external user ID. Required. |
externalName | body | string | The external name. |
firstName | body | string | The first name of the contact. |
lastName | body | string | The last name of the contact. |
email | body | string | The email address of the contact. |
mobile | body | string | The mobile number of the contact. |
netAmount | body | decimal number | The net amount of the opportunity. |
tax | body | decimal number | The tax applied to the opportunity. |
coupon | body | string | The coupon code used for the opportunity. |
quantity | body | decimal number | The quantity of items in the opportunity. |
totalAmount | body | decimal number | The total amount of the opportunity. |
address | body | string | The address of the opportunity. |
city | body | string | The city. |
products | body | Collection of Product | The list of products in the opportunity. |
url | body | string | The URL associated with the opportunity. |
expectedPurchaseDate | body | date | The expected purchase date. Required. |
lastUpdate | body | date | The last update date of the opportunity. |
purchaseType | body | string | The type of purchase. |
status | body | string | The status of purchase. |
storeId | body | integer | The store ID associated with the opportunity. |
locationType | body | SalesLifecycleLocationType | The location type associated with the opportunity. |
ext1 … date3 | body | string / date / number | Custom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail. |
subscriptionStatus | body | boolean | Whether the contact approved subscription. |
createContact | body | boolean | Whether the contact should be created. |
The request body is a JSON object (ApiPostOpportunity).
Full reference, request and response samples
Modify existing opportunity
PUT https://webapi.mymarketing.co.il/api/salesLifeCycle/Opportunity/{opportunityId}
| Parameter | In | Type | Description |
|---|---|---|---|
opportunityId | path | string | Opportunity ID to update. Required. |
opportunityName | body | string | The name of the opportunity. |
externalId | body | string | The external user ID. Required. |
externalName | body | string | The external name. |
firstName | body | string | The first name of the contact. |
lastName | body | string | The last name of the contact. |
email | body | string | The email address of the contact. |
mobile | body | string | The mobile number of the contact. |
netAmount | body | decimal number | The net amount of the opportunity. |
tax | body | decimal number | The tax applied to the opportunity. |
coupon | body | string | The coupon code used for the opportunity. |
quantity | body | decimal number | The quantity of items in the opportunity. |
totalAmount | body | decimal number | The total amount of the opportunity. |
address | body | string | The address of the opportunity. |
city | body | string | The city. |
products | body | Collection of Product | The list of products in the opportunity. |
url | body | string | The URL associated with the opportunity. |
expectedPurchaseDate | body | date | The expected purchase date. Required. |
lastUpdate | body | date | The last update date of the opportunity. |
purchaseType | body | string | The type of purchase. |
status | body | string | The status of purchase. |
storeId | body | integer | The store ID associated with the opportunity. |
locationType | body | SalesLifecycleLocationType | The location type associated with the opportunity. |
ext1 … date3 | body | string / date / number | Custom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail. |
subscriptionStatus | body | boolean | Whether the contact approved subscription. |
createContact | body | boolean | Whether the contact should be created. |
The request body is a JSON object (ApiUpdateOpportunity).
Full reference, request and response samples
Get opportunity by its id
GET https://webapi.mymarketing.co.il/api/salesLifeCycle/Opportunity/{opportunityId}
| Parameter | In | Type | Description |
|---|---|---|---|
opportunityId | path | string | opportunity ID. Required. |
Full reference, request and response samples
This reference is based on the ActiveTrail API documentation, where you can also test each endpoint with your own API key.