Skip to content

Pricing API

Price formulas over named inputs and watchers on a price or rate.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/price-rules

Read price rules

The price rules of the workspace. Needs miniself:read.

Scope price-rules:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/price-rules

Add price rule

Writes a price formula over named inputs, each tied to a source. Needs miniself:write.

Scope price-rules:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/price-rules/{id}

Read price rule

One price rule. Needs miniself:read.

Scope price-rules:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/price-rules/{id}/reprice

Reprice from readings

Works the price out from the readings sent. Inside the allowed move it is applied; otherwise the owner is told and the price stays. Needs miniself:write.

Scope price-rules:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/price-watches

Read price watchers

The price watchers of the workspace. Needs miniself:read.

Scope price-watches:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/price-watches

Add price watcher

Watches a source for a level or a move. Needs miniself:write.

Scope price-watches:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/price-watches/{id}

Read price watcher

One price watcher. Needs miniself:read.

Scope price-watches:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/price-watches/{id}/observe

Give a watcher a reading

Looks at one reading. An alert comes back and the owner is told when the trigger fired. Needs miniself:write.

Scope price-watches:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.