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

Priceff API v3.12.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.

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.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.12.0 (12.11.2021):

V3.11.0 (14.10.2021):

V3.10.0 (15.09.2021):

V3.9.0 (31.05.2021):

V3.8.0 (30.03.2021):

V3.7.0 (27.01.2021):

V3.6.0 (26.11.2020):

V3.5.0 (14.8.2020):

V3.4.0 (10.6.2020):

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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/authenticate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /authenticate

Authenticates the user with the API

Body parameter

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

Parameters

Name 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)
    // ...
}

 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://testing-api.priceff.com/items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

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

Name In Type Required Description
limit query integer(int32) false The limit of Items to be listed
lastItem query string(id) 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(id) 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 The boolean filter for Items which are active, i.e. current time is between the start and end dates
search query string(string) false The search term to filter Items based on title case insensitive fuzzy match

Example responses

200 Response

{
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "lastItem": "5d6cebdf37ad0b754e46ac6f",
  "firstItem": "5d6cebdf37ad0b754e46ac6f",
  "count": 134,
  "items": [
    {
      "title": "Artist X Ticket",
      "totalAmount": 1000,
      "startTimeISO": "2019-09-04T11:56:30.610Z",
      "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",
      "amount": 1000,
      "startTime": 1567598131610,
      "endTime": 1567598131610,
      "price": 2.5,
      "prevPrice": 2.5,
      "purchases": [
        {
          "price": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 2
        }
      ],
      "priceHistory": [
        {
          "price": 1.75,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 0,
          "acvExpected": 0.81
        }
      ],
      "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
      ],
      "weight": 0.5,
      "discovery": 0,
      "followers": [
        "446cebdf37ad0b754e46ac11",
        "776cebdf377d0b754e46ac88"
      ],
      "leader": "446cebdf37ad0b754e46ac11"
    }
  ]
}

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,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

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,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "endTimeISO": "2019-09-04T11:56:30.610Z",
  "priceInterval": 3600000,
  "minPrice": 1.5,
  "startPrice": 2.5,
  "maxPrice": 5.5,
  "currency": "$",
  "elasticity": 3,
  "elasticity2": 1
}

Parameters

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

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}

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,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}';
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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://testing-api.priceff.com/items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /items

Modifies an Item (Sales Batch) in the database

Send synchronous updates to multiple Items in one API call using an array of Items like PutRequestItemsList. The response is a list of PutResponseItemsList. NOTE: Please, send max of a couple hundred items in one batch to avoid a timeout, HTTP 502 Bad Gateway. In a case of a timeout, some items may have been updated.

Body parameter

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}

Parameters

Name In Type Required Description
body body any true Item to modify

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}

Responses

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

Response Schema

Enumerated Values

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

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)
    // ...
}

 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://testing-api.priceff.com/items/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /items/{id}

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

Parameters

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

Example responses

200 Response

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}

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)
    // ...
}

 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://testing-api.priceff.com/items/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /items/{id}

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

Parameters

Name In Type Required Description
id path string(id) 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",
  "externalId": "e123909902939",
  "prevPriceUpdateTime": "2019-09-04T11:56:30.610Z",
  "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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/buy', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /buy

Indicate a purchase event happened to the API.

NOTE: This is highly discouraged, but 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.

Send synchronous purchase events to multiple Items in one API call using an array of BuyItems. The response is a list of BuyItemResponseList. NOTE: Please, send about a hundred items in one batch to avoid a timeout, HTTP 502 Bad Gateway. In a case of a timeout, some purchases may have been recorded.

Body parameter

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "externalId": "e123909902939",
  "prevPriceUpdateTime": "2019-09-04T11:56:30.610Z",
  "amount": 10,
  "price": 1.2
}

Parameters

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

Example responses

200 Response

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

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",
  "externalId": "e123909902939",
  "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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/cancelBuy', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /cancelBuy

This endpoint effects the purchases of an Item. The default behavior is Cancel. 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",
  "externalId": "e123909902939",
  "type": "cancel",
  "amount": 5,
  "price": 10.5
}

Parameters

Name 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)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/importSales', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

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

Name 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

Trigger Price Updates for multiple Items

Code samples

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

POST https://testing-api.priceff.com/tryPush 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/tryPush',
  method: 'post',

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

const fetch = require('node-fetch');
const inputBody = '{
  "ids": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('https://testing-api.priceff.com/tryPush',
{
  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/tryPush',
  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/tryPush', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://testing-api.priceff.com/tryPush");
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/tryPush", data)
    req.Header = headers

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

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'API_KEY',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://testing-api.priceff.com/tryPush', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /tryPush

Trigger asynchronous attempts to send price updates according to the integration configuration for each of the given identifiers in the body of the request

Body parameter

{
  "ids": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ]
}

Parameters

Name In Type Required Description
body body Ids true An array of Item identifiers

Example responses

200 Response

{
  "updated": 10,
  "failed": 2
}

Responses

Status Meaning Description Schema
200 OK The operation succeeded and the notifications will be attempted in the next minutes TryPushResponse
default Default An unexpected error Error

Schemas

Item

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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",
  "amount": 1000,
  "startTime": 1567598131610,
  "endTime": 1567598131610,
  "price": 2.5,
  "prevPrice": 2.5,
  "purchases": [
    {
      "price": 1.5,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 2
    }
  ],
  "priceHistory": [
    {
      "price": 1.75,
      "time": 1567598131610,
      "timeISO": "2019-09-04T11:56:30.610Z",
      "amount": 0,
      "acvExpected": 0.81
    }
  ],
  "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
  ],
  "weight": 0.5,
  "discovery": 0,
  "followers": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ],
  "leader": "446cebdf37ad0b754e46ac11"
}

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(id) 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
» amount integer(int32) false none Current amount of goods to be sold. NB: This is a read-only field, and is a summation of the purchases array.
» startTime number(epoch millis) false none The start of the sales window. UNIX timestamp representation of the startTimeISO
» endTime number(epoch millis) false none The end of the sales window. UNIX timestamp representation of the endTimeISO
» 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
» priceHistory [PriceHistory] false none An array of price history, as calculated by the algorithm
» 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. This value must be unique among each account, i.e. if you have several sales batches for the same logical product, only one sales batch can have the product id of the logical product. Please, edit the value or remove it from the sales batches that are not in use. To remove an externalId, set the value to an empty string (i.e. "") in the Update PUT call.
» 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.
» weight number(double) false none The percentage of how much the previous price is taking into consideration when calculating a new price in addition to the startPrice. 1 means 100% and 0 means 0%. 0 is the default, in which case the startPrice has all the power.
» discovery number(double) false none The value signifies the aggressiveness of the discovery price test to gauge shopper price sensitivity. The aggressiveness of the discovery price is reverse to the input to this variable. 0 is off.
» followers array(string) false none Allows the sales batch to know which sales batches are following its price. Multiple sales batches can have the same leader. If followers list is present, the sales batch cannot follow other sales batches.
» leader string(id) false none Makes the sales batch fetch the price from the leader sales batch. A sales batch can only have one leader, and it cannot have followers then.

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.

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

Ids

{
  "ids": [
    "446cebdf37ad0b754e46ac11",
    "776cebdf377d0b754e46ac88"
  ]
}

Properties

Name Type Required Restrictions Description
ids array(string) true none Id of the Item

BuyItem

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "externalId": "e123909902939",
  "prevPriceUpdateTime": "2019-09-04T11:56:30.610Z",
  "amount": 10,
  "price": 1.2
}

Properties

Name Type Required Restrictions Description
id string true none Id of the Item. This parameter is not required if you provide an externalId.
externalId string false none Id of the product in the integrated system. E.g. An id of the product variant that this sales batch corresponds to. If this is provided, the id of the Item is not required.
prevPriceUpdateTime string(ISO_8601) false none The time when price was updated to the store. That is, when was it possible that a shopper has seen the price and is able to make a purchase. This optional value helps to make more timely analyses of the price behavior when we know exactly that users can react to the price regardless of any caches in between the Priceff price and the web store.
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
}

Properties

Name Type Required Restrictions Description
id string(id) 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.

BuyItemError

{
  "id": "5d6cebdf37ad0b754e46ac6f",
  "message": "Item not found",
  "statusCode": 400
}

Properties

Name Type Required Restrictions Description
id string(id) false none Id of the Item
message string false none Human readable error message as to what went wrong
statusCode integer(int32) false none The status code of the individual sales batch

BuyItemResponseList

[
  {
    "id": "5d6cebdf37ad0b754e46ac6f",
    "message": "Item not found",
    "statusCode": 400
  }
]

Buy Responses and Error responses in a list

Properties

Name Type Required Restrictions Description
anonymous [BuyItemError] false none Buy Responses and Error responses in a list

CancelBuy

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

Properties

Name Type Required Restrictions Description
id string(id) false none Id of the Item. Either this or the externalId has to be present.
externalId string(id) false none ExternalId of the Item. Either this or the id has to be present.
type string false none The type of the cancellation: 'undo' or 'cancel'. Default: 'cancel' when no 'type'-parameter is provided. Undo function removes the last purchase, leaving no trace. Cancel function deducts purchases amount from the list recording a negative sale.
amount integer(int32) false 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. We highly recommend that, you can use this parameter to record the price at which the original product was sold to deliver accurate analyses of pricing data.

CancelBuyResponse

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

Properties

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

TryPushResponse

{
  "updated": 10,
  "failed": 2
}

Properties

Name Type Required Restrictions Description
updated integer(int32) true none The number of ids that were successfully sent to the notification queue
failed integer(int32) true none The number of ids that failed for some reason

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(id) 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(id) true none The identifier of the Item
serverTime number(epoch millis) true none The time when the Item was deleted
serverTimeISO string(ISO_8601) true none The time when the Item was deleted in ISO format

ItemsList

{
  "serverTime": 1567598131610,
  "serverTimeISO": "2019-09-04T11:56:30.610Z",
  "lastItem": "5d6cebdf37ad0b754e46ac6f",
  "firstItem": "5d6cebdf37ad0b754e46ac6f",
  "count": 134,
  "items": [
    {
      "title": "Artist X Ticket",
      "totalAmount": 1000,
      "startTimeISO": "2019-09-04T11:56:30.610Z",
      "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",
      "amount": 1000,
      "startTime": 1567598131610,
      "endTime": 1567598131610,
      "price": 2.5,
      "prevPrice": 2.5,
      "purchases": [
        {
          "price": 1.5,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 2
        }
      ],
      "priceHistory": [
        {
          "price": 1.75,
          "time": 1567598131610,
          "timeISO": "2019-09-04T11:56:30.610Z",
          "amount": 0,
          "acvExpected": 0.81
        }
      ],
      "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
      ],
      "weight": 0.5,
      "discovery": 0,
      "followers": [
        "446cebdf37ad0b754e46ac11",
        "776cebdf377d0b754e46ac88"
      ],
      "leader": "446cebdf37ad0b754e46ac11"
    }
  ]
}

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(id) 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(id) 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
count number(integer) false none The number of items matching the current filter set, incl. search filters and quick filters like activeOnly. The default is the total number of sales batches when no filters are provided.
items [Item] true none The list of Items that were returned with the given parameters.

PutResponseError

{
  "message": "Invalid value: startPrice (Double)",
  "statusCode": 400,
  "id": "5d6cebdf37ad0b754e46ac6f"
}

Errors that resulted from the update

Properties

Name Type Required Restrictions Description
message string false none Message containing the error that caused the update to fail
statusCode number false none Error code
id string false none The id of the Sales Batch in the request that has the issue

PutRequestItemsList

[
  {
    "title": "Artist X Ticket",
    "totalAmount": 1000,
    "startTimeISO": "2019-09-04T11:56:30.610Z",
    "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",
    "amount": 1000,
    "startTime": 1567598131610,
    "endTime": 1567598131610,
    "price": 2.5,
    "prevPrice": 2.5,
    "purchases": [
      {
        "price": 1.5,
        "time": 1567598131610,
        "timeISO": "2019-09-04T11:56:30.610Z",
        "amount": 2
      }
    ],
    "priceHistory": [
      {
        "price": 1.75,
        "time": 1567598131610,
        "timeISO": "2019-09-04T11:56:30.610Z",
        "amount": 0,
        "acvExpected": 0.81
      }
    ],
    "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
    ],
    "weight": 0.5,
    "discovery": 0,
    "followers": [
      "446cebdf37ad0b754e46ac11",
      "776cebdf377d0b754e46ac88"
    ],
    "leader": "446cebdf37ad0b754e46ac11"
  }
]

Items how they are delivered to the API

Properties

Name Type Required Restrictions Description
anonymous [Item] false none Items how they are delivered to the API

PutResponseItemsList

[
  {
    "message": "Invalid value: startPrice (Double)",
    "statusCode": 400,
    "id": "5d6cebdf37ad0b754e46ac6f"
  }
]

Items and the Error messages that resulted from the update

Properties

Name Type Required Restrictions Description
anonymous [PutResponseError] false none Items and the Error messages that resulted from the update

NewItem

{
  "title": "Artist X Ticket",
  "totalAmount": 1000,
  "startTimeISO": "2019-09-04T11:56:30.610Z",
  "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
startTimeISO string(ISO_8601) true none The start of the sales window in ISO format
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 stating value for further optimizations. Contact Priceff staff for further details and more examples.
elasticity2 number(double) false none An error correction parameter. This values should be tailored to each case individually. However, 1 is a good stating value for further optimizations. Contact Priceff staff for further details and more examples.

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