NAV Navigation
Shell HTTP JavaScript Node.js Ruby Python Java Go

Priceff API v3.3.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This API documentation describes the endpoints of the Priceff platform for integration purposes.

If you have any questions about the API, please send an email to team [at] priceff.com, and we can help you.

Important: New version of the API (V3) is out with better performance and optimization. We recommend you to take a look at http://developers.priceff.com/v3

Create an API User Account

The user of the API must create credentials on the App, and use those credentials to authenticate with the API. For development purposes, you can have a development account and an official account separately for production. The same accounts work on both the staging and the production environments.

To create an account:

  1. Go to https://app-v3.priceff.com/signup
  2. Check your email for "Your verification code"
  3. Verify your user and login to the app to confirm that the credentials work
  4. See Authenticate for details for authentication with the API

Release Notes

V3.3.0 (8.5.2020):

V3.2.0 (31.03.2020):

V3.1.0 (24.2.2020):

V3.0.0:

V2.9.0 (10.2.2020):

V2.8.0 (11.1.2020):

V2.7.0 (29.11.2019):

V2.6.0 (4.10.2019):

V2.5.0 (13.9.2019):

V2.4.2 (5.8.2019):

V2.4.0 (18.7.2019):

V2.3.1:

Environments

Staging:

Production:

The staging environment is meant for integration testing. Please use this environment to develop, instead of the production environment. The staging environment and the production environment have different data.

Base URLs:

Web: Priceff License: Proprietary

Authentication

The user must register at app.priceff.com to create an account.

The same credentials are used to acquire a token for the API.

User

These methods provide means to authenticate with the API

Authenticate

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/authenticate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://testing-api.priceff.com/authenticate HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

$.ajax({
  url: 'https://testing-api.priceff.com/authenticate',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "email": "email@domain.com",
  "password": "password"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('https://testing-api.priceff.com/authenticate',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://testing-api.priceff.com/authenticate',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://testing-api.priceff.com/authenticate', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/authenticate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/authenticate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /authenticate

Authenticates the user with the API

Body parameter

{
  "email": "email@domain.com",
  "password": "password"
}

Parameters

Parameter In Type Required Description
body body Credentials true Credentials of the user

Example responses

200 Response

{
  "token": "raWQiOiI2SjFJVzh4d005aGFYU...",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Responses

Status Meaning Description Schema
200 OK A successful authentication. The Token is in the body of the response. Token
400 Bad Request The authentication failed due to wrong credentials. NotAuthorizedException
default Default An unexpected error Error

Item

Item (tech. term for Sales Batch) methods provide access to information and operations on the Items (Sales Batches) for the user. You can do the same operations also on the App.

Check out the App

Get All Items

Code samples

# You can also use wget
curl -X GET https://testing-api.priceff.com/items \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

GET https://testing-api.priceff.com/items HTTP/1.1
Host: testing-api.priceff.com
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/items',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/items',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://testing-api.priceff.com/items',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://testing-api.priceff.com/items', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://testing-api.priceff.com/items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /items

Returns all or the next Items that the user has created

To paginate the results, fetch the result set with the 'limit' parameter (i.e. how many results you want to list on one page).

To get the next page of Items, add the 'lastItem'-parameter to the call to be equal to the 'lastItem' in the result body. If the 'lastItem' value in the JSON is equal to null, then there are no more pages to return, and you have reached the end of the result set.

To get the previous page of Items, add the 'firstItem'-parameter to the call to be equal to the 'firstItem' in the result body. If the 'firstItem' value in the JSON is equal to null, then there are no more pages to return, and you have reached the beginning of the result set.

NB: If both lastItem and firstItem are provided, firstItem value will be ignored since finding all the items between firstItem and lastItem is not supported due to MongoDB.

Parameters

Parameter In Type Required Description
limit query integer(int32) false The limit of Items to be listed
lastItem query string(uuid) false The id of the last Item on the current page, to start the scan for the next page from the next item on the list. Providing this parameter in the request, searches for the next page from the Items list.
firstItem query string(uuid) false The id of the first Item on the current page, to start the scan for the previous page from the Item before the first Item on the current list. Providing this parameter in the request, searches for the previous page from the Items list.
noPriceHistory query string(boolean) false The priceHistory-field will not be sent for all Items with the response when this GET-parameter is set
skipPriceCalculation query string(boolean) false The price calculation will be skipped for all Items when this GET-parameter is set. Note that this means that the price may not be up-to-date. Therefore, if you use this feature and display the results to a user on a UI, tell them that the price should be updated before.
activeOnly query string(boolean) false This will only send the Items which are not expired.
search query string(string) false search for Items which its title contains the provided string

Example responses

200 Response

{
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "lastItem": "5d6cebdf37ad0b754e46ac6f",
  "firstItem": "5d6cebdf37ad0b754e46ac6f",
  "items": [
    {
      "title": "Artist X Ticket",
      "totalAmount": 1000,
      "amount": 1000,
      "startTime": 1567598131610,
      "startTimeISO": "2019-09-04T11:56:30.610Z",
      "endTime": 1567598131610,
      "endTimeISO": "2019-09-04T11:56:30.610Z",
      "priceInterval": 3600000,
      "minPrice": 1.5,
      "startPrice": 2.5,
      "maxPrice": 5.5,
      "currency": "$",
      "elasticity": 3,
      "elasticity2": 1,
      "id": "5d6cebdf37ad0b754e46ac6f",
      "description": "Example description for this sales batch",
      "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
      "created": 1567598131610,
      "createdISO": "2019-09-04T11:56:30.610Z",
      "price": 2.5,
      "prevPrice": 2.5,
      "purchases": [
        {
          "price": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 2
        }
      ],
      "capacities": [
        {
          "free": 10,
          "total": 100,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "priceHistory": [
        {
          "price": 1.75,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 0,
          "acvExpected": 0.81
        }
      ],
      "priceFactorHistory": [
        {
          "priceFactor": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "targetUtilization": 0.7,
          "avgUtilization": 0.75
        }
      ],
      "profile": 1,
      "changeHistory": [
        {
          "key": "title",
          "oldValue": "Ticket Artist",
          "newValue": "Artist x Ticket",
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "changeEvents": [
        {
          "key": "elasticity",
          "newValue": 2,
          "time": 1542785399846,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "lastPriceCalculateTime": 1567598131610,
      "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
      "nextPriceCalculateTime": 1567598131610,
      "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
      "serverTime": 1567598131610,
      "serverTimeISO": "2019-09-04T11:56:30.610Z",
      "pushPriceUpdate": "false",
      "pushPriceUpdateEmail": "user@client.com",
      "pushPriceUpdateURL": "https://api.client.com/updates",
      "round": 0.5,
      "roundingOffset": 0.1,
      "amountRolling": 70,
      "externalId": "154278",
      "priceBehavior": "NORMAL",
      "targetAmount": 0.8,
      "acvExpected": 0.81,
      "customProfile": [
        -11.733,
        20.8,
        -10.067,
        2,
        0
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The list of Items for the logged in user ItemsList
default Default An unexpected error Error

Create Item

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/items \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST https://testing-api.priceff.com/items HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/items',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/items',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://testing-api.priceff.com/items',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://testing-api.priceff.com/items', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /items

Creates a new Item (Sales Batch). Duplicate titles are allowed. Each new Item is created with a different id.

Body parameter

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1
}

Parameters

Parameter In Type Required Description
body body NewItem true Item to add

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK The new Item as a response from the database Item
default Default An unexpected error Error

Modify Item

Code samples

# You can also use wget
curl -X PUT https://testing-api.priceff.com/items \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

PUT https://testing-api.priceff.com/items HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/items',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/items',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.put 'https://testing-api.priceff.com/items',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.put('https://testing-api.priceff.com/items', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://testing-api.priceff.com/items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /items

Modifies an Item (Sales Batch) in the database

Body parameter

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Parameters

Parameter In Type Required Description
body body Item true Item to modify

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK The Item as a response from the database Item
default Default An unexpected error Error

Find Item By Id

Code samples

# You can also use wget
curl -X GET https://testing-api.priceff.com/items/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

GET https://testing-api.priceff.com/items/{id} HTTP/1.1
Host: testing-api.priceff.com
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/items/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/items/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://testing-api.priceff.com/items/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.get('https://testing-api.priceff.com/items/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/items/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://testing-api.priceff.com/items/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /items/{id}

Returns the Item (Sales Batch) by the Id supplied (URI-parameter)

Parameters

Parameter In Type Required Description
id path string(uuid) true Id of the Item

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK Response Item from the database Item
404 Not Found The item was not found from the database NotFound
default Default An unexpected error Error

Delete Item

Code samples

# You can also use wget
curl -X DELETE https://testing-api.priceff.com/items/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

DELETE https://testing-api.priceff.com/items/{id} HTTP/1.1
Host: testing-api.priceff.com
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/items/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/items/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://testing-api.priceff.com/items/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://testing-api.priceff.com/items/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/items/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://testing-api.priceff.com/items/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /items/{id}

Deletes a single Item (Sales Batch) by the Id supplied (URI-parameter)

Parameters

Parameter In Type Required Description
id path string(uuid) true Id of Item to delete

Example responses

200 Response

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Responses

Status Meaning Description Schema
200 OK Item Deleted DeletedItem
404 Not Found Item Not Found None
default Default An unexpected error Error

Price Change Operations

These methods deliver the sales data needed to calculate the new price for the Item. These calls are repeated continuously throughout the sales window.

Purchase an Item

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/buy \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST https://testing-api.priceff.com/buy HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/buy',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 10,
  "price": 1.2
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/buy',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://testing-api.priceff.com/buy',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://testing-api.priceff.com/buy', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/buy");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/buy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /buy

Indicate a purchase event happened to the API. If no amount is provided or it is not a positive integer, the amount defaults to 1. If no price is provided, the current price is recorded as the price of sale.

Body parameter

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 10,
  "price": 1.2
}

Parameters

Parameter In Type Required Description
body body BuyItem true Item to add

Example responses

200 Response

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 990,
  "price": 1.2,
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Responses

Status Meaning Description Schema
200 OK Response Item from the database BuyItemResponse
400 Bad Request The request was invalid IdRequiredError
default Default An unexpected error Error

Cancel Item Purchase

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/cancelBuy \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST https://testing-api.priceff.com/cancelBuy HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/cancelBuy',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "type": "cancel",
  "amount": 5,
  "price": 10.5
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/cancelBuy',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://testing-api.priceff.com/cancelBuy',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://testing-api.priceff.com/cancelBuy', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/cancelBuy");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/cancelBuy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /cancelBuy

This endpoint effects the purchases of an Item. Undo-operation removes the last purchase, and Cancel-operation deducts purchase amount from the by making a negative purchase. This can be used to adjust the amount of products left when a shopper cancels an order that has been recorded.

Body parameter

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "type": "cancel",
  "amount": 5,
  "price": 10.5
}

Parameters

Parameter In Type Required Description
body body CancelBuy true Item to cancel

Example responses

200 Response

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 990
}

Responses

Status Meaning Description Schema
200 OK The request was successful CancelBuyResponse
400 Bad Request The request was invalid BadRequest
401 Unauthorized The user does not have access to this Item UnauthorizedAccess
404 Not Found Something was not found. Message gives more information NotFound
409 Conflict There was a conflict with the data and the request. The provided message explains the error. Conflict
default Default An unexpected error Error

Import Sales for Multiple Items

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/importSales \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST https://testing-api.priceff.com/importSales HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/importSales',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '[
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist X Ticket",
    "amountLeft": 89
  },
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist Z Ticket",
    "amountLeft": 30
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/importSales',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://testing-api.priceff.com/importSales',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://testing-api.priceff.com/importSales', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/importSales");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/importSales", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /importSales

Import sales data for multiples sales batches.

Body parameter

[
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist X Ticket",
    "amountLeft": 89
  },
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist Z Ticket",
    "amountLeft": 30
  }
]

Parameters

Parameter In Type Required Description
body body ImportSales true array of sales data.

Example responses

200 Response

{
  "results": [
    {
      "id": "5d6cebdf37ad0b754e46ac6f",
      "name": "Artist X Ticket",
      "status": "Updated",
      "message": "Item not found. Please check the ID (An example when there is an error)",
      "amount": 2
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Feedback that shows success or failure status for the imported sales. ImportSalesResponse
400 Bad Request The request was invalid BadRequest
default Default An unexpected error Error

Set Capacity

Code samples

# You can also use wget
curl -X POST https://testing-api.priceff.com/capacity \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST https://testing-api.priceff.com/capacity HTTP/1.1
Host: testing-api.priceff.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

$.ajax({
  url: 'https://testing-api.priceff.com/capacity',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "free": 10,
  "total": 100,
  "targetUtilization": 0.7
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/capacity',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://testing-api.priceff.com/capacity',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'API_KEY'
}

r = requests.post('https://testing-api.priceff.com/capacity', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/capacity");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"API_KEY"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://testing-api.priceff.com/capacity", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /capacity

Sets the capacity of a given Item (Sales Batch)

Body parameter

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "free": 10,
  "total": 100,
  "targetUtilization": 0.7
}

Parameters

Parameter In Type Required Description
body body Capacity true The utilization situation of the capacity

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK The Item from the database Item
400 Bad Request The authentication failed NotAuthorizedException
default Default An unexpected error Error

Schemas

Item

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1,
  "id": "5d6cebdf37ad0b754e46ac6f",
  "description": "Example description for this sales batch",
  "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
  "created": 1567598131610,
  "createdISO": "2019-09-04T11:56:30.610Z",
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "capacities": [
    {
      "free": 10,
      "total": 100,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "priceFactorHistory": [
    {
      "priceFactor": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "targetUtilization": 0.7,
      "avgUtilization": 0.75
    }
  ],
  "profile": 1,
  "changeHistory": [
    {
      "key": "title",
      "oldValue": "Ticket Artist",
      "newValue": "Artist x Ticket",
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "changeEvents": [
    {
      "key": "elasticity",
      "newValue": 2,
      "time": 1542785399846,
      "timeISO": "2019-09-04T11:56:30.610Z"
    }
  ],
  "lastPriceCalculateTime": 1567598131610,
  "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "nextPriceCalculateTime": 1567598131610,
  "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "pushPriceUpdate": "false",
  "pushPriceUpdateEmail": "user@client.com",
  "pushPriceUpdateURL": "https://api.client.com/updates",
  "round": 0.5,
  "roundingOffset": 0.1,
  "amountRolling": 70,
  "externalId": "154278",
  "priceBehavior": "NORMAL",
  "targetAmount": 0.8,
  "acvExpected": 0.81,
  "customProfile": [
    -11.733,
    20.8,
    -10.067,
    2,
    0
  ]
}

Properties

allOf

Name Type Required Restrictions Description
anonymous NewItem false none none

and

Name Type Required Restrictions Description
anonymous object false none none
» id string(uuid) true none The identifier of the Item, as generated by the system
» description string false none The optional description of the sales batch. Anything that does not fit to the title of the sales batch.
» userId string(uuid) true none The identifier of the user, as generated by the system
» created integer(epoch millis) false none The timestamp when the Item was created
» createdISO string(ISO_8601) false none The timestamp when the Item was created in ISO format
» price number(double) false none The price of the item at this current moment. This field varies during the sales window. After the sales window, this field holds the last price of the Item.
» prevPrice number(double) false none The price of the previous price history entry. Note that this may not always be the same as the priceHistory, since the priceHistory may be compressed
» purchases [Purchases] false none An array of the purchases that have been recorded. This data is provided with the /buy-call
» capacities [Capacities] false none An array of the historical data provided in the /capacity-call
» priceHistory [PriceHistory] false none An array of price history, as calculated by the algorithm
» priceFactorHistory [PriceFactorHistory] false none An array of the price factor history change, as calculated by the algorithm based on the current capacity
» profile number false none A value to determine the expected average cumulative volume of sales as a function of time
» changeHistory [changeHistory] false none An array of changes history recorded after updating the attributes in a sales batch
» changeEvents [changeEvents] false none An array of changes in the sales batch's attributes set up by the customer that will be updated automatically later during the price calculation time
» lastPriceCalculateTime number(ISO_8601) false none The time when the last price change happened
» lastPriceCalculateTimeISO string(ISO_8601) false none The time when the last price change happened in ISO format
» nextPriceCalculateTime number(epoch millis) false none The time when the next price change will be calculated. This is determined by the price interval parameter.
» nextPriceCalculateTimeISO string(ISO_8601) false none The time when the next price change will be calculated in ISO format. This is determined by the price interval parameter.
» serverTime number(epoch millis) false none The current time of the server
» serverTimeISO string(ISO_8601) false none The current time of the server in ISO format
» pushPriceUpdate string(boolean) false none Toggles the push price updates feature. If this features is on, the Item price is evaluated, and a price update is sent to 'pushPriceUpdateEmail' and/or 'pushPriceUpdateURL'
» pushPriceUpdateEmail string(email) false none A single email address that can receive push price updates from the Priceff API. Beware that the emails might be flagged as spam, due to the possible high amount of price updates. Thus it is advisable to add the priceff no-reply@priceff.com as a contact so that the emails do not end up in the spam folder.
» pushPriceUpdateURL string(URL) false none Describes the URL of the API that can receive an HTTPS POST request with the new price. The JSON body includes the following values: secret (API secret), priceffId (Item Id), price, userId NB: The secret value is currently a static value. But will change in the future to be configurable by the user. Thus, this feature is not secure yet for the clients.
» round number(double) false none A customizable rounding for the price.
- Value 0 or undefined defaults to nearest cent. Also 0.01 round to the nearest cent.
- 0.25 rounds to the nearest 25 cents, e.g. 1.71 becomes 1.75.
- 0.5 rounds to the nearest 50 cents. e.g. 1.71 becomes 1.50, and 1.76 becomes 2.0
- 1 rounds to the nearest integer.
- n rounds to the nearest multiple of n. E.g. 3 rounds to the nearest multiple of 3
» roundingOffset number(double) false none An offset for the rounded price that is always subtracted from the calculated price.
Example 1: if the price after calculation is 2.0, and the offset is 0.1, the price is set to 1.90
Example 2: if the price is 2.50, and the offset 0.01, the final price is 2.49
The offset cannot be larger than the round-value.
» amountRolling integer(int32) false none A part of the total amount for the rolling estimation window. This value must be between 1 and the total amount. Values outside this range will be ignored. If the value is now defined, it defaults to the total amount. E.g. totalAmount = 100 and no amountRolling defined, then amountRolling = 100
» externalId string false none The external id that the client system can use to track the sales batch on our system.
» priceBehavior string false none Overrides the default price behavior to some direction, e.g. price may only rise (priceBehavior set to UP). Price can also be set to only go down (priceBehavior set to DOWN). Reset to the normal behavior by setting this value to NORMAL. By default this value is undefined, which means NORMAL behavior. NB: Using this feature breaks the normal behavior of the algorithm. Therefore, is is not recommended for most purposes because the most optimal price may not be found. Please consult the Priceff sales team if you consider using this feature.
» targetAmount number(double) false none Defines the true sales target from a given maximum capacity of items to be sold (totalAmount). The feature helps to define the sales targets better without artificially setting the totalAmount to be a lower amount than it really is. E.g. if a concert hall has 500 seats and the owner wants to leave 100 of the seats to be sold at the door, the targetAmount should be set to 0.8, i.e. 400 of the totalAmount. You can choose to ignore this parameter and define the 400 in the totalAmount as well, as the effect is the same. This feature helps to keep the real capacity the same between a client's sales platform and the Priceff API.
» acvExpected number(double) false none The percentage of the total amount of inventory that the algorithm expects to have been sold at this point in time based on the parameters given.
» customProfile array(float[5]) false none If this parameter is defined correctly, it overrides the profile parameter. The value represents how aggressive the expected sales amount will behave over time
For custom profile type profile, "values" is an Array[5] ([a, b, c, d, e]) represents the coefficients of a fourth degree polynomials
f(t) y = at^4 + bt^3 + ct^2 + dt + e where t is between [0,1] and represents the time of the sales window.

Enumerated Values

Property Value
priceBehavior UP
priceBehavior DOWN
priceBehavior NORMAL
priceBehavior (undefined)

Purchases

{
  "price": 1.5,
  "time": 1567598131610,
  "timeISO": "2019-09-04T11:56:30.610Z",
  "amount": 2
}

Properties

Name Type Required Restrictions Description
price number(double) true none The price at the time of the sales.
time number(epoch millis) true none The time when the sale happened.
timeISO string(ISO_8601) true none The time when the sale happened in ISO format.
amount integer(int32) true none The amount of items sold until this point.

PriceHistory

{
  "price": 1.75,
  "time": 1567598131610,
  "timeISO": "2019-09-04T11:56:30.610Z",
  "amount": 0,
  "acvExpected": 0.81
}

Properties

Name Type Required Restrictions Description
price number(double) true none The price at the time of the price change event
time number(epoch millis) true none The time when the the price change event happened
timeISO string(ISO_8601) true none The time when the the price change event happened in ISO format
amount integer(int32) true none The amount of items sold
acvExpected number(double) true none The percentage of the total amount of inventory that the algorithm expects to have been sold at this point in time based on the parameters given.

PriceFactorHistory

{
  "priceFactor": 1.5,
  "time": 1567598131610,
  "timeISO": "2019-09-04T11:56:30.610Z",
  "targetUtilization": 0.7,
  "avgUtilization": 0.75
}

Properties

Name Type Required Restrictions Description
priceFactor number(double) true none The price factor for the given capacity utilization
time number(epoch millis) true none The time when the price calculation happened
timeISO string(ISO_8601) true none The time when the price calculation happened in ISO format
targetUtilization number(double) true none The desired target utilization ratio as given in the /capacity-request
avgUtilization number(double) true none The rolling average of the capacities from previous updates

changeHistory

{
  "key": "title",
  "oldValue": "Ticket Artist",
  "newValue": "Artist x Ticket",
  "time": 1567598131610,
  "timeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
key string true none The attribute of the Item that has been changed
oldValue number true none The value of the Item's attribute before updating
newValue number true none The value of the Item's attribute after updating
time number(epoch millis) true none The time when the update happened
timeISO string(ISO_8601) true none The time when the update happened in ISO format

changeEvents

{
  "key": "elasticity",
  "newValue": 2,
  "time": 1542785399846,
  "timeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
key string true none The attribute of the Item that will be changed
newValue number true none The value of the Item's attribute after updating
time number(epoch millis) true none The time when the update should be happened
timeISO number(ISO_8601) true none The time when the update should be happened in ISO format

Capacity

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "free": 10,
  "total": 100,
  "targetUtilization": 0.7
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none The id of the Item
free integer(int32) true none The amount of free capacity
total integer(int32) true none The total capacity
targetUtilization number(double) true none The desired target utilization of the capacity

Capacities

{
  "free": 10,
  "total": 100,
  "time": 1567598131610,
  "timeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
free integer(int32) true none The amount of free capacity
total integer(int32) true none The total capacity
time number(epoch millis) true none The time when the capacity was updated
timeISO string(ISO_8601) true none he time when the capacity was updated in ISO format

BuyItem

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 10,
  "price": 1.2
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none Id of the Item
amount integer(int32) false none Amount of Items purchased. If no amount is provided or it is not a positive integer, the amount defaults to 1.
price number(float) false none The price point at which the shopper purchased the sales batch. If no price is provided, the current price is recorded as the price of sale.

BuyItemResponse

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 990,
  "price": 1.2,
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none Id of the Item
amount integer(int32) false none Amount of items still available after the purchase amount deducted from the total amount.
price number(float) false none The price point which was saved to the database. If no price was provided, the current price is recorded as the price of sale.
serverTime number(ISO_8601) false none The current server time
serverTimeISO string(ISO_8601) false none The current server time in ISO format

CancelBuy

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "type": "cancel",
  "amount": 5,
  "price": 10.5
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none Id of the Item
type string true none The type of the cancellation: 'undo' or 'cancel'. Undo function removes the last purchase, leaving no trace. Cancel function deducts purchases amount from the list recording a negative sale.
amount integer(int32) true none The amount of items canceled ('cancel' function). The amount is not required for the 'undo' function, but providing it does not matter as it is ignored.
price number(float) false none The price of the items cancelled. If no price is provided, the current price of the item is used as the price of cancellation. You can use this parameter to record the price at which the original product was sold.

CancelBuyResponse

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "amount": 990
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none Id of the Item
amount integer(int32) false none Amount of items still available after the cancel was successful

ImportSales

[
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist X Ticket",
    "amountLeft": 89
  },
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "name": "Artist Z Ticket",
    "amountLeft": 30
  }
]

array of sales data.

Properties

Name Type Required Restrictions Description
id integer true none Id of the Item
name string false none name of the item
amountLeft integer true none The amount of items left in stock.

ImportSalesResponse

{
  "results": [
    {
      "id": "5d6cebdf37ad0b754e46ac6f",
      "name": "Artist X Ticket",
      "status": "Updated",
      "message": "Item not found. Please check the ID (An example when there is an error)",
      "amount": 2
    }
  ]
}

Properties

Name Type Required Restrictions Description
results [ImportResult] false none an array of feedback showing the success or failure of each of the imported sales

ImportResult

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "name": "Artist X Ticket",
  "status": "Updated",
  "message": "Item not found. Please check the ID (An example when there is an error)",
  "amount": 2
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none Id of the Item
name string true none The name of the Item
status string true none Showing the status of the import. I.e. 'Updated' or 'Error'
message string false none Only for failed updates. This is a description of the error.
amount integer(int32) false none This only shown for a successful update. The amount of items sold until this point.

DeletedItem

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none The identifier of the Item
serverTime number(epoch millis) true none The time when the capacity was updated
serverTimeISO string(ISO_8601) true none The time when the capacity was updated in ISO format

ItemsList

{
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "lastItem": "5d6cebdf37ad0b754e46ac6f",
  "firstItem": "5d6cebdf37ad0b754e46ac6f",
  "items": [
    {
      "title": "Artist X Ticket",
      "totalAmount": 1000,
      "amount": 1000,
      "startTime": 1567598131610,
      "startTimeISO": "2019-09-04T11:56:30.610Z",
      "endTime": 1567598131610,
      "endTimeISO": "2019-09-04T11:56:30.610Z",
      "priceInterval": 3600000,
      "minPrice": 1.5,
      "startPrice": 2.5,
      "maxPrice": 5.5,
      "currency": "$",
      "elasticity": 3,
      "elasticity2": 1,
      "id": "5d6cebdf37ad0b754e46ac6f",
      "description": "Example description for this sales batch",
      "userId": "64ad9a86-1f16-4230-bbf4-108a1c951aee",
      "created": 1567598131610,
      "createdISO": "2019-09-04T11:56:30.610Z",
      "price": 2.5,
      "prevPrice": 2.5,
      "purchases": [
        {
          "price": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 2
        }
      ],
      "capacities": [
        {
          "free": 10,
          "total": 100,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "priceHistory": [
        {
          "price": 1.75,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 0,
          "acvExpected": 0.81
        }
      ],
      "priceFactorHistory": [
        {
          "priceFactor": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "targetUtilization": 0.7,
          "avgUtilization": 0.75
        }
      ],
      "profile": 1,
      "changeHistory": [
        {
          "key": "title",
          "oldValue": "Ticket Artist",
          "newValue": "Artist x Ticket",
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "changeEvents": [
        {
          "key": "elasticity",
          "newValue": 2,
          "time": 1542785399846,
          "timeISO": "2019-09-04T11:56:30.610Z"
        }
      ],
      "lastPriceCalculateTime": 1567598131610,
      "lastPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
      "nextPriceCalculateTime": 1567598131610,
      "nextPriceCalculateTimeISO": "2019-09-04T11:56:30.610Z",
      "serverTime": 1567598131610,
      "serverTimeISO": "2019-09-04T11:56:30.610Z",
      "pushPriceUpdate": "false",
      "pushPriceUpdateEmail": "user@client.com",
      "pushPriceUpdateURL": "https://api.client.com/updates",
      "round": 0.5,
      "roundingOffset": 0.1,
      "amountRolling": 70,
      "externalId": "154278",
      "priceBehavior": "NORMAL",
      "targetAmount": 0.8,
      "acvExpected": 0.81,
      "customProfile": [
        -11.733,
        20.8,
        -10.067,
        2,
        0
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
serverTime number(epoch millis) true none The current time of the server
serverTimeISO string(ISO_8601) true none The current time of the server in ISO format
lastItem string(uuid) false none The last item on the current list. This id should be provided in the next query using the "lastItem"-parameter to get the next page of Items
firstItem string(uuid) false none The first Item on the current list. This id should be provided in the next query using the "firstItem"-parameter to get the previous page of Items
items [Item] true none The list of Items that were returned with the given parameters.

NewItem

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "amount": 1000,
  "startTime": 1567598131610,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTime": 1567598131610,
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1
}

Properties

Name Type Required Restrictions Description
title string true none The title of the Item
totalAmount integer(int32) true none Total amount of goods to be sold
amount integer(int32) false none Current amount of goods to be sold
startTime number(epoch millis) true none The start of the sales window
startTimeISO string(ISO_8601) true none The start of the sales window in ISO format
endTime number(epoch millis) true none The end of the sales window
endTimeISO string(ISO_8601) true none The end of the sales window in ISO format
priceInterval integer(int32) true none The interval in milliseconds how often the price should change
minPrice number(double) true none The minimum price, under which the price should not fall, even if there is no demand
startPrice number(double) true none The starting price point
maxPrice number(double) true none The maximum price, over which the price should not rise, even if the indicators tell otherwise
currency string false none The currency indicator. This can be anything, as this is only used for displaying the price on the UI.
elasticity number(double) false none The main price elasticity parameter. This value dictates how quickly the price changes at each price update interval. This values should be tailored to each case individually. However, 3 is a good estimate. Contact us.
elasticity2 number(double) false none An error correction parameter. This values should be tailored to each case individually. However, 1 is a good estimate. Contact us.

Credentials

{
  "email": "email@domain.com",
  "password": "password"
}

Properties

Name Type Required Restrictions Description
email string true none The email address (same as on the App).
password string true none The password of the user.

Token

{
  "token": "raWQiOiI2SjFJVzh4d005aGFYU...",
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z"
}

Properties

Name Type Required Restrictions Description
token string true none The token to be supplied in all consecutive calls
serverTime number(epoch millis) true none The current time of the server
serverTimeISO string(ISO_8601) true none The current time of the server in ISO format

IdRequiredError

{
  "message": "Item Id is required"
}

The operation requires the Item Id to complete.

Properties

Name Type Required Restrictions Description
message string true none none

Error

{
  "message": "Internal server error"
}

The server encountered an unrecoverable error

Properties

Name Type Required Restrictions Description
message string true none none

BadRequest

{
  "message": "X was invalid in request"
}

Something went wrong when evaluating the request. Either some parameter is missing, it is of wrong type or the value is out of bounds.

Properties

Name Type Required Restrictions Description
message string true none none

NotFound

{
  "message": "Item not found"
}

The item was not found from the database

Properties

Name Type Required Restrictions Description
message string true none none

Conflict

{
  "message": "Conflict with the request and the data"
}

Some conflict happened that cannot be solved. System was expecting something different.

Properties

Name Type Required Restrictions Description
message string true none none

TokenExpiredException

{
  "message": "The incoming token has expired"
}

Authentication token is too old. Authenticate again.

Properties

Name Type Required Restrictions Description
message string true none none

UnauthorizedAccess

{
  "message": "Unauthorized access"
}

The user does not have access to this resource

Properties

Name Type Required Restrictions Description
message string true none none

NotAuthorizedException

{
  "message": "Incorrect username or password"
}

Authentication information is missing or invalid

Properties

Name Type Required Restrictions Description
message string true none none