Actions APIs

The nooked actions API can be used to track you application actions. Actions are the completion of some task by the end user as a result of having clicked through on a feed entry. For example, buying a product on a merchant website after previously having clicked through from a nooked feed. Action notifications are typically sent from the merchant web site back-end, as part of rendering the final confirmation page for example.

Register action

You can register actions completed in your application via the following API call.

URL

https://api.nooked.com/v1/do_action/<COOKIE_CODE> (secure) or http://api.nooked.com/v1/do_action/<COOKIE_CODE>

Authentication

No authentication is required.

Request

Send a HTTP POST request. Optionally you can pass price of the action as attribute in POST body:

  • price=<PRICE> where <PRICE> is a value of an item

Response

The platform responds with:

  • 201 Created status code and empty response body
  • 400 Bad request status code and error message as in XML format

Register action successful request / response example:

Request:

Http method: POST
URL: https://api.nooked.com/v1/do_action/1random23string4cookie

Request data:

  price=799.00

Response Header:

Status: 201 Created

Response Body:

empty

Register action incorrect request / response example:

Request:

Http method: POST
URL: https://api.nooked.com/v1/do_action/WRONG_COOKIE_CODE

Request data:

  price=123.45

Response Header:

Status: 400 Bad Request

Response Body:

<?xml version="1.0" encoding="UTF-8"?>
<errors> 
  <error>Cookie code not found in the system WRONG_COOKIE_CODE.</error>
</errors>