APIGetEventsByProductIDs


Returns all events for a selected product
/api/plain/?type=APIGetEventsByProductIDs&[payload]&HashString=[hashstring]

URL Parameters

 Field TypeDescription
TypeStringAPI that will be called
PayloadURL_ENCODEDAn URL encoded JSON array 
HashString Varchar sha256 encoded string. Read how to create payload and hashstring 

Payload Parameters

 Field TypeDescription
StartDateDate
EndDateDate
ProductIDsVarcharcomma separated values of product ids (1,2,45,5)


Success 200

All the order details are returned, grouped by order and event times as requested. The detail for each order is the same as Get Order Details

FieldTypeDescription
CreatedDateThe date the order was created
StatusStringOrder Status (e.g. Completed)
ReferenceStringReference of the order
NetTotalDoubleTotal amount of the order without the Tax
GrossTotalDoubleTotal of amount including the Tax
TaxTotalDoubleTax Total
EmailNotificationBooleanCan emails be sent for this order
SMSNotificationStringCan SMS be sent for this order
Transactionarray()Array of all transaction done for this order 
including the payment gateway and type of 
transaction
 - TypeStringType of the payment (CARD,CASH and etc)  
 - CodeVarcharCode of transaction
 - VendorStringPayment gateway
 - AmountDouble
 - PaymentGatewayReferenceVarchar
Paramsarray()
OrderItemsarray()Array of orderitems in the order
Notes array() All notes added for this order
Upsells array() All upsells added to the order
  •  Success-Response: 
  •     HTTP/1.1 200 OK
        {
    	  "Created": "2020-01-14 11:35:26",
    	  "Status": "Completed",
    	  "Reference": "REF-200004-DAR",
    	  "NetTotal": "15.00",
    	  "GrossTotal": "18.00",
    	  "TaxTotal": "3.00",
    	  "EmailNotification: 1,
    	  "SMSNotification: 0,
    	  "Transactions": [
    		{
    		  "Name": null,
    		  "Type": "Card",
    		  "Code": "",
    		  "Vendor": "SagePay",
    		  "Amount": "18.00",
    		  "PaymentGatewayReference": "REF-200004-DAR"
    		}
    	  ],
    	  "Params":{
    		"op_test_status": "booked"
    	  },
    	  "OrderItems":[
    		{
    		  "OrderItem":{
    			"Created": "2020-01-14 11:35:27",
    			"OrderItemID":4,
    			"NetTotal": "15.00",
    			"GrossTotal":18,
    			"TaxTotal": "3.00",
    			"AccountingCodes":{
    			  "Name": "Tax",
    			  "AccountingCode": "BLTAX",
    			  "FundCode": "BLTAX"
    			},
    			"Event":{
    			  "ResourceName": "",
    			  "LocationName": "Bristol",
    			  "LocationPostCode": "PostCode",
    			  "ProductName": "Carting",
    			  "ProductID": 4,
    			  "ProductDescription": "Allow customers to book at multiple locations",
    			  "StartDateTime": "2020-01-24 10:00:00",
    			  "EndDateTime": "2020-01-24 11:00:00",
    			  "OrderItemID": 4,
    			  "PreTime": 0,
    			  "PostTime": 0
    			}
    		  }
    		}
    	  ],
    	  "Notes": [
    
    	  ],
    	  "Upsells": [
    
    	  ]
    }

Error 4xx

FieldTypeDescription
Errorsarray() 
 - Code IntNumber of error
 - Error StringError message
  •  Error-Response: 
  •     HTTP/1.1 200 OK
        {
          "Reference": ""
          "Errors": [
    	  	{"Code":"403", "Error": "No events found"},
    	  ]
        }
>