APIGetEventsByProductIDs
Returns all events for a selected product
/api/plain/?type=APIGetEventsByProductIDs&[payload]&HashString=[hashstring]
URL Parameters
Field | Type | Description |
---|---|---|
Type | String | API that will be called |
Payload | URL_ENCODED | An URL encoded JSON array |
HashString | Varchar | sha256 encoded string. Read how to create payload and hashstring |
Payload Parameters
Field | Type | Description |
---|---|---|
StartDate | Date | |
EndDate | Date | |
ProductIDs | Varchar | comma 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
Field | Type | Description |
---|---|---|
Created | Date | The date the order was created |
Status | String | Order Status (e.g. Completed) |
Reference | String | Reference of the order |
NetTotal | Double | Total amount of the order without the Tax |
GrossTotal | Double | Total of amount including the Tax |
TaxTotal | Double | Tax Total |
EmailNotification | Boolean | Can emails be sent for this order |
SMSNotification | String | Can SMS be sent for this order |
Transaction | array() | Array of all transaction done for this order including the payment gateway and type of transaction |
- Type | String | Type of the payment (CARD,CASH and etc) |
- Code | Varchar | Code of transaction |
- Vendor | String | Payment gateway |
- Amount | Double | |
- PaymentGatewayReference | Varchar | |
Params | array() | |
OrderItems | array() | 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
Field | Type | Description |
---|---|---|
Errors | array() | |
- Code | Int | Number of error |
- Error | String | Error message |
- Error-Response:
HTTP/1.1 200 OK { "Reference": "" "Errors": [ {"Code":"403", "Error": "No events found"}, ] }