Atoka API User Reference

Lead Events Creation

With this API you can register an event on one of your leads (a "Lead Event").

https://api.atoka.io/v2/leadevents

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -XPOST "https://api.atoka.io/v2/leadevents"

Lead Event data

In this section we grouped together many parameters necessary for the creation of a new lead event.

Parameters
  • lead string required

    ID of the lead the event is about

  • type string required

    type of the lead the event is about

    Choose only one among:

    • company
    • person
  • note string

    a textual note associated to the event; what you put here can be used for search later

  • status string

    the new status of the lead

    choose between one of the statuses configured by your application

  • date string

    date of the event

    it must be after the most recent event, and not in the future; defaults to now

  • leadAssignee string

    An indentifier of the the user to whom this lead is assigned. If not specified, last known value is used. Ignored if leadAssigneeRemove is true.

  • leadAssigneeRemove boolean,
    default is false

    Remove leadAssignee. Has priority over leadAssignee.

curl -XPOST "https://api.atoka.io/v2/leadevents" -d "lead=123456789abc" -d "type=company" -d "note=got contact of area manager" -d "date=2015-10-21" -d "leadAssignee=larentis+unicorno@spaziodati.eu" -d "leadAssigneeRemove=true"

Lead Events List

With this API you can see all the Lead Events for a subset of Leads

https://api.atoka.io/v2/leadevents

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -G "https://api.atoka.io/v2/leadevents"

Filtering

This section groups parameters related to filtering the Lead Events.

Parameters
  • leads array required

    Filter Lead Events by the specified Lead IDs

    Accepts multiple values, separated with , (comma) char.

curl -G "https://api.atoka.io/v2/leadevents" -d "leads=123456789abc,def987654321"

Ordering and pagination

This section contains parameter related to the quantity and order of the results.

Parameters
  • offset integer,
    default is 0

    This offsets the start of each page by the number specified.

    Use a number between 0 and 9950.

  • limit integer,
    default is 50

    The maximum number of results to retrieve

  • ordering string,
    default is "newest"

    How to order the results

    Choose only one among:

    • newest
    • oldest
curl -G "https://api.atoka.io/v2/leadevents" -d "offset=30" -d "limit=100" -d "ordering=newest"

Lead Event Details

This API allows you to get a single Lead Event by its ID.

https://api.atoka.io/v2/leadevents/{id}

Replace {id} with the Lead Event ID you want to retrieve.

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -G "https://api.atoka.io/v2/leadevents/{id}"

Lead Event Update

This API allows you to update an existing Lead Event. Only the note text can be updated.

https://api.atoka.io/v2/leadevents/{id}

Replace {id} with the Lead Event ID you want to update.

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -XPUT "https://api.atoka.io/v2/leadevents/{id}"

Lead Event data

The data you need to update.

Parameters
  • note string

    a textual note associated to the event; what you put here can be used for search later

  • date string

    date of the event

    it must be after the most recent event, and not in the future; defaults to now

curl -XPUT "https://api.atoka.io/v2/leadevents/{id}" -d "note=got contact of area manager" -d "date=2015-10-21"

Lead Event Deletion

This API allows you to delete an existing Lead Event

https://api.atoka.io/v2/leadevents/{id}

Replace {id} with the Lead Event ID you want to delete.

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -XDELETE "https://api.atoka.io/v2/leadevents/{id}"

general

Parameters
  • forceDelete boolean

    The maximum number of results to retrieve

curl -XDELETE "https://api.atoka.io/v2/leadevents/{id}"

Lead Statuses List

With this API you can list all the Statuses that your application can assign to Lead Events.

https://api.atoka.io/v2/leadevents/statuses

All requests must be properly authenticated.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

  • appUserId string Private parameter

    To properly authenticate each requests you should send the application id of the user sending the request, see the Authentication section for more info

curl -G "https://api.atoka.io/v2/leadevents/statuses"

Lead Events Synchronization

With this Internal API you can list all the Lead Events updated after certain moment in time. Requires Atoka feature: useLeadEventsSync.

https://api.atoka.io/v2/leadevents/sync

All requests must be properly authenticated.

Authorization

All API endpoints require to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -G "https://api.atoka.io/v2/leadevents/sync"

general

Parameters
  • fromUpdateTime string

    Value of LeadEevent.update_time to fetch from.

curl -G "https://api.atoka.io/v2/leadevents/sync" -d "fromUpdateTime=2015-10-21"

Ordering and pagination

This section contains parameter related to the quantity and order of the results.

Parameters
  • offset integer,
    default is 0

    This offsets the start of each page by the number specified.

    Use a number between 0 and 9900.

  • limit integer,
    default is 100

    The maximum number of results to retrieve

curl -G "https://api.atoka.io/v2/leadevents/sync" -d "offset=30" -d "limit=100"