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

MethodEndpointWhat it does
POST/api/salesLifeCycle/LeadAdd new Lead
PUT/api/salesLifeCycle/Lead/{leadId}Modify existing lead
GET/api/salesLifeCycle/Lead/{leadId}Get lead by its id
POST/api/salesLifeCycle/OpportunityAdd new Opportunity
PUT/api/salesLifeCycle/Opportunity/{opportunityId}Modify existing opportunity
GET/api/salesLifeCycle/Opportunity/{opportunityId}Get opportunity by its id

Endpoint details

Add new Lead

POST https://webapi.mymarketing.co.il/api/salesLifeCycle/Lead
ParameterInTypeDescription
leadIdbodystringThe Lead ID. Required.
leadNamebodystringThe name of the Lead.
externalIdbodystringThe external user ID. Required.
externalNamebodystringThe external name.
firstNamebodystringThe first name of the contact.
lastNamebodystringThe last name of the contact.
emailbodystringThe email address of the contact.
mobilebodystringThe mobile number of the contact.
netAmountbodydecimal numberThe net amount of the lead.
taxbodydecimal numberThe tax applied to the lead.
couponbodystringThe coupon code used for the lead.
quantitybodydecimal numberThe quantity of items in the lead.
totalAmountbodydecimal numberThe total amount of the lead.
addressbodystringThe address of the lead.
citybodystringThe city.
productsbodyCollection of ProductThe list of products in the lead.
urlbodystringThe URL associated with the lead.
expectedPurchaseDatebodydateThe expected purchase date. Required.
lastUpdatebodydateThe last update date of the lead.
purchaseTypebodystringThe type of purchase.
statusbodystringThe status of purchase.
storeIdbodyintegerThe store ID associated with the lead.
locationTypebodySalesLifecycleLocationTypeThe location type associated with the lead.
ext1 … date3bodystring / date / numberCustom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail.
subscriptionStatusbodybooleanWhether the contact approved subscription.
createContactbodybooleanWhether 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}
ParameterInTypeDescription
leadIdpathstringLead ID to update. Required.
leadNamebodystringThe name of the Lead.
externalIdbodystringThe external user ID. Required.
externalNamebodystringThe external name.
firstNamebodystringThe first name of the contact.
lastNamebodystringThe last name of the contact.
emailbodystringThe email address of the contact.
mobilebodystringThe mobile number of the contact.
netAmountbodydecimal numberThe net amount of the lead.
taxbodydecimal numberThe tax applied to the lead.
couponbodystringThe coupon code used for the lead.
quantitybodydecimal numberThe quantity of items in the lead.
totalAmountbodydecimal numberThe total amount of the lead.
addressbodystringThe address of the lead.
citybodystringThe city.
productsbodyCollection of ProductThe list of products in the lead.
urlbodystringThe URL associated with the lead.
expectedPurchaseDatebodydateThe expected purchase date. Required.
lastUpdatebodydateThe last update date of the lead.
purchaseTypebodystringThe type of purchase.
statusbodystringThe status of purchase.
storeIdbodyintegerThe store ID associated with the lead.
locationTypebodySalesLifecycleLocationTypeThe location type associated with the lead.
ext1 … date3bodystring / date / numberCustom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail.
subscriptionStatusbodybooleanWhether the contact approved subscription.
createContactbodybooleanWhether 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}
ParameterInTypeDescription
leadIdpathstringLead ID. Required.

Full reference, request and response samples

Add new Opportunity

POST https://webapi.mymarketing.co.il/api/salesLifeCycle/Opportunity
ParameterInTypeDescription
opportunityIdbodystringThe opportunity ID. Required.
opportunityNamebodystringThe name of the opportunity.
externalIdbodystringThe external user ID. Required.
externalNamebodystringThe external name.
firstNamebodystringThe first name of the contact.
lastNamebodystringThe last name of the contact.
emailbodystringThe email address of the contact.
mobilebodystringThe mobile number of the contact.
netAmountbodydecimal numberThe net amount of the opportunity.
taxbodydecimal numberThe tax applied to the opportunity.
couponbodystringThe coupon code used for the opportunity.
quantitybodydecimal numberThe quantity of items in the opportunity.
totalAmountbodydecimal numberThe total amount of the opportunity.
addressbodystringThe address of the opportunity.
citybodystringThe city.
productsbodyCollection of ProductThe list of products in the opportunity.
urlbodystringThe URL associated with the opportunity.
expectedPurchaseDatebodydateThe expected purchase date. Required.
lastUpdatebodydateThe last update date of the opportunity.
purchaseTypebodystringThe type of purchase.
statusbodystringThe status of purchase.
storeIdbodyintegerThe store ID associated with the opportunity.
locationTypebodySalesLifecycleLocationTypeThe location type associated with the opportunity.
ext1 … date3bodystring / date / numberCustom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail.
subscriptionStatusbodybooleanWhether the contact approved subscription.
createContactbodybooleanWhether 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}
ParameterInTypeDescription
opportunityIdpathstringOpportunity ID to update. Required.
opportunityNamebodystringThe name of the opportunity.
externalIdbodystringThe external user ID. Required.
externalNamebodystringThe external name.
firstNamebodystringThe first name of the contact.
lastNamebodystringThe last name of the contact.
emailbodystringThe email address of the contact.
mobilebodystringThe mobile number of the contact.
netAmountbodydecimal numberThe net amount of the opportunity.
taxbodydecimal numberThe tax applied to the opportunity.
couponbodystringThe coupon code used for the opportunity.
quantitybodydecimal numberThe quantity of items in the opportunity.
totalAmountbodydecimal numberThe total amount of the opportunity.
addressbodystringThe address of the opportunity.
citybodystringThe city.
productsbodyCollection of ProductThe list of products in the opportunity.
urlbodystringThe URL associated with the opportunity.
expectedPurchaseDatebodydateThe expected purchase date. Required.
lastUpdatebodydateThe last update date of the opportunity.
purchaseTypebodystringThe type of purchase.
statusbodystringThe status of purchase.
storeIdbodyintegerThe store ID associated with the opportunity.
locationTypebodySalesLifecycleLocationTypeThe location type associated with the opportunity.
ext1 … date3bodystring / date / numberCustom contact fields (18 fields). Same meaning as the contact fields in ActiveTrail.
subscriptionStatusbodybooleanWhether the contact approved subscription.
createContactbodybooleanWhether 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}
ParameterInTypeDescription
opportunityIdpathstringopportunity 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.