-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Client API for Sales.lv Premium service. In its essence Premium is a platform for implementing services based on mobile-originated (incoming from users) SMS processing. In practice there is a number of applications built upon this platform, for example, user message processing, SMS micropayment handling, lotteries, etc. (Lotteries are a special case as there is a lot of lottery-specific functionality implemented in Premium that goes above and beyond SMS processing).
This is a simple HTTP API where data is requested or manipulated with HTTP requests. We are also providing client libraries (currently only in PHP) to make work easier.
Once you've signed up for the Premium service, you'll be provided with an API key and a campaign code (these will be necessary for making API calls).
The guide has a quick overview of the API and has an examples of the most common tasks you might use this API for.
This page describes the general information about making any API call and common errors.
The API is contains multiple sections depending on data you want to retrieve or change. They are:
General information about the campaign - titles, dates, various other parameters depending on campaign configuration.
Messages are what Premium is built around - these are SMS messages for SMS campaigns, as well as messages submitted via API from campaign websites. This section lets you create and retrieve message data.
Various statistics and aggregate data about the campaign.
This is a somewhat disjointed part of the API as in that all of the above deals with data retrieval from Premium and adding your own data to it. The SMS API, however, allows you to hook up to Premium to receive and handle incoming SMS messages in your application. The SMS data exchange happens live - if you're using this API, the processing logic must be implemented on your side. We pass the message to you, you parse it, decide on the response and what amount should be charged and we send the response message back to the user. Once we receive charge status, you are notified about that, too.
- PHP (PHP 5.2 and up)
Please write to support@sales.lv with any feedback, questions or suggestions that might arise.