Updated: Jan 14th, 2019

Placing Advertising Orders with the Neon API

The page explains how to use the Adomni API to purchase ad space on Adomni devices.

For the purposes of this tutorial we will assume that the user already has an advertiser account on Adomni.com, and has access to the credentials for that account. We also assume that the user also has already set up a valid payment instrument such that the transaction will not fail due to lack of funds.

Placing an Order: Step By Step

Note: See our API Browser for details about each endpoint below, such as fields to pass in the request body.

1. Perform login

First, generate a valid token for your advertiser account using the POST /access-tokens endpoint (see detailed instructions on authentication)

2. Initialize the order

Initialize a new order by making a call to POST /orders (see our API Browser for specific fields to pass in the request body). The HTTP response object will contain an order ID for use with the additional steps below.

3. Search the inventory for available devices

Search against Adomni's real time device inventory using: GET /devices/search and check availability/pricing for a given device using: GET /devices/pricing.

4. Add device(s) to the order

Add one or more pieces of inventory (along with details about the reservation such as time period) to the order using POST /orders/{id}/items.

5. Checkout

Checkout (finalize) the order using POST /orders/{id}/checkout.

Checkout can fail for a number of reasons, the biggest is that the inventory became unavailable during the course of the order building process.

If checkout fails you may remove/modify the elements which caused the order to fail, and then reattempt checkout by another submission to the checkout endpoint.

6. Uploading / assigning content

Immediately after order checkout, the order will be in a pending state, awaiting content upload and assignment.

See our walkthrough on uploading content for more details.

The API endpoint for assigning content is a work-in-progress.

7. Proof of play

At any time once an order is generated, you may generate a proof-of-play report which comes in 2 forms, either summary which gives just summary information of how the order was executed, or full which contains a full listing of every every play that was recorded against the order. The report will have a state either IN_PROCESS or COMPLETE, depending on whether the order is still running.