Skip to main content

getListOfDiscountPrices.php

SM JSON Discounted Prices Service

Endpoint: getListOfDiscountPrices.php

This service lists the discounted price ticket records in JSON format.

Parameters:

  • user: SM user name for authentication
  • password: SM user password for authentication
  • fromdate: start date to get data from, in format yyyy-mm-dd
  • todate: end date to get data from, in format yyyy-mm-dd
  • branchnr: branch number to get data from
  • eventnr (optional): event number to get data from
  • itemnr (optional): item number to get data from
  • all (optional): show also tickets which aren't discounted and of every type

Return Values of the JSON Structure:

  • success: true or false
  • status: numeric status, see table below for details
  • data: if success is true, returns the list of tickets with reduced price. Precisely these values:
    • EventId: the id of the event where the ticket is
    • ItemNr: the item number of the ticket
    • RemainingContingent: the remaining contingent of this ticket
    • RemainingContingentTotal: the remaining contingent for all tickets on this event
    • ActualPrice: the actual price of the ticket without discount
    • DiscountedPrice: the actual price of the ticket with discount

Status Codes:

  • 0: Execution of the service succeeded
  • 102: Cannot connect to database/server
  • 103: Authentication failure
  • 104: No valid from/to date given
  • 105: No valid branch number given

Examples:

Request: /getListOfDiscountPrices.php?user=user&password=password&fromdate=2024-01-16&all&todate=2024-01-17&branchnr=5

Discount prices
{
"success": true,
"status": 0,
"data":
[
{
"EventId": "19733",
"ArtikelNr": "35641",
"RemainingContingent": 41,
"RemainingContingentTotal": 41,
"ActualPrice": 10,
"DiscountedPrice": 5
},
{
"EventId": "19751",
"ArtikelNr": "35642",
"RemainingContingent": 6,
"RemainingContingentTotal": 6,
"ActualPrice": 0,
"DiscountedPrice": 0
}
]
}