__

tariffs/search

Returns pricing and contract tariff details for a given product id. Can be passed an query string containing optional parameters to filter, sort, page and count the results.

REST URL:

http://api.powerupmobile.com/tariffs/search/id

Format

xml, json, jsonp

HTTP Method

GET

Resource

The brand id must be provided at the end of the URL:
i.e. tariffs/search/684

The recommended way to lookup values is using the products methods - i.e. products/category, or from a device method - i.e. device/details.

Parameters

api_key (required)
The API key. (More Info)

api_sig (required)
The generated request signature. (More info)

format (optional)
The desired response format. Value can be xml, json or jsonp. Defaults to xml. jsonp responds with a callback function named jsonPowApi.

Search Parameters

Additional parameters can be appended to the querystring to filter, sort, page and count the tariffs.

network
Filter by a mobile phone network - i.e. Vodafone, O2, T Mobile

contract
Set to 1 to only show contracts

simfree
Set to 1 to only show sim free prices

term
Filter by contract length - i.e. 12, 18, 24

mins_min
Filter by minimum number of minutes - i.e. 500

mins_max
Filter by maximum number of minutes - i.e. 1000

txts_min
Filter by minimum number of texts - i.e. 500

txts_max
Filter by maximum number of texts - i.e. 1000

line_min
Filter by minimum line rental cost - i.e. 25

line_max
Filter by maximum line rental cost - i.e. 35

cost_min
Filter by minimum handset cost - i.e. 50

cost_max
Filter by maximum handset cost - i.e. 200

sort
Sort results by one of three options:
handset (cheapest handset first)
line (cheapest line rental first)
total (cheapest total cost - handset + (line x term))

page
Go to a specific page of results.

per_page
The number of results to show per page, default is 50, maximum is 50.

count
Set to 1 to only output the number of results for a search.

Examples:
&network=Vodafone
&mins_min=500
&mins_min=500&mins_max=1000
&network=Vodafone&mins_min=500&mins_max=1000&page=2&per_page=10&sort=handset

Errors

10: Incorrect Signature
The API Key and/or the generated request signature are incorrect or are no longer valid.

20: Incorrect Number of Parameters
The minimum number of required parameters have not been provided.

30: Format Incorrect
The format requested is not supported.

41: No Numeric ID
The product id has not been provided or is not numeric.

50: No API Key
The api_key parameter and value are not in the request.

60: No Signature
The api_sig parameter and value are not in the request.

Example Requests

http://api.powerupmobile.com/tariffs/search/684/?api_key=q7jImKi89lYMo7TG&format=json&api_sig=ce67c6187000fcf69af2fcb67887f6b2448ed35649d955769b1dd19c853c9fd9

http://api.powerupmobile.com/tariffs/search/684/?api_key=q7jImKi89lYMo7TG&format=json&mins_min=500&network=T+Mobile&per_page=10&term=18&api_sig=2555b5d543083ab0665d40b7068813e6571bbc61e19b64df71e121707d753fc7

__