Earnware API Post Documentation

Following are instructions for sending a POST payload to the Earnware API.

Development Endpoint:
https://api.earnware.com/development/contacts

Production Endpoint:
https://api.earnware.com/production/contacts

Example Payload (JSON):

{

“userId”: “e2a163d31aa5b987b80debf5d3683e00

“sourceId”: “yourSourceId

“placementId”: “yourPlacementId”,

“email”: “user@example.com”,

“firstName”: “Fname”,

“lastName”: “Lname”,

“regDate”: “2017-10-30T22:48:15.092Z”,

“sourceUrl”: “http://www.domain.com/registration-page”,

“ipAddress”: “123.123.123.123”

}

The userId referenced above is an example-only, you’ll need your actual userId which you can get from an Earnware support team member.

Use the sourceId and placementId that you wish to post and keep in mind, you can use one or both of these values as filter criteria to target your desired list using an Earnware Workflow.

Your payload can be submitted either as:

  • JSON (application/json) or
  • Form data (x-www-form-urlencoded)

Once you have sent a successful payload, please have the Earnware team confirm receipt of your data. Once receipt has been verified, switch over to the production endpoint.

 

CURL EXAMPLE

curl -d ‘{“userId”: “732256138762e407a252d9177d965d8d”, “sourceId”: “yourSourceId”, “placementId”: “yourPlacementId”, “email”: “keith+curl-example@earnware.com”, “firstName”: “Fname”, “lastName”: “Lname”, “regDate”: “2017-10-30T22:48:15.092Z”, “sourceUrl”: “http://www.domain.com/registration-page”, “ipAddress”: “123.123.123.123”}’ -H “Content-Type: application/json” -X POST https://api.earnware.com/production/contacts