API setup
API documentation
Work with your Rokt account manager to complete the API setup process described below.
API documentation can encompass some or all of the points listed as requirements such as:
- Endpoint
- Method
- Body
This should detail exactly how Rokt can deliver leads to your system.
The API documentation as well as a technical contact should be sufficient to start the API setup process.
For a good example of API documentation, check out the Mailchimp API documentation.
Technical contact details
Provide the relevant contact (either yourself or someone else on your team) who's best suited to address any questions about the API setup process.
The technical contact should be able to help with:
- Verifying that test leads have been recorded successfully in your system
- Explaining why we're receiving a response status of 403
For example:
John Smith
Technical Support
Endpoint
This is the location where Rokt should deliver data. If you have a staging or testing endpoint, this will help the Rokt team during the setup and testing process so that no test leads are delivered to your live CRM.
For example:
https://us9.api.mailchimp.com/3.0/lists/abcdefghij/members
Method
This is the HTTP request type that Rokt uses to deliver data to your list. The majority of the time, this is a POST request.
Rokt supports the following submit methods:
- GET
- POST
- PUT
Authentication
Provide any authentication details necessary for Rokt to call your API. This could come in many forms, such as:
- User name and password combination
- An API key
- Client ID and secret
API parameters
Provide a list of parameters for Rokt to include through in each API request. If possible, specify any:
- Required attributes (attributes that must be sent in order for the request to succeed)
- Optional attributes
- Parameter names for each attribute (whether to use
firstname
,FirstName
, orfirst-name
, for example)
Common attributes include:
- First name
- Last name
- Source
- Country
For reference, Rokt can share any of these attributes.
Rokt supports the following body encoding:
- JSON
- URL encoded
- Plain text
- XML
Expected API responses
By providing a list of possible API responses, Rokt can set up response handling logic to quickly identify leads that were delivered successfully, versus those that failed to deliver or were labelled as duplicates.
The response handling could be created based on the status code we receive or the response body, depending on how your API is set up.
Example status codes:
- 201 (lead created successfully)
- 400 (unauthorized)
- 500 (server error)
Example response body values:
"successfully delivered"
{"status": "duplicate"}
{"success": false}
As a Rokt partner, you may want to receive data about the customers that engage with Rokt placements on your site so that you can integrate this data into a your own CRM or reporting dashboard. Our data management platform provides the ability for you to receive real-time and secure access to transaction data. One of the popular options is integrating transactions data via API directly into your CRM.
An API is the most efficient way for Rokt to deliver transactions data to you. This is because it works in real time, meaning that as soon as a customer engages with a placement on your site, the Rokt system can communicate the event to your system. There are a few technical pieces required to get this completed, which are outlined below.