APIGetOrderDetails
This method returns details on a requested order.
/api/plain/?type=APIGetOrderDetails&[payload]&HashString=[hashstring]
URL Parameters
Payload Parameters
Field | Type | Description |
---|
Reference | Varchar | Order reference |
Success 200
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 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 |
- 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":[
]
}
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":"Product not found"},
{"Code":"104", "Error":"Ooops, the event slots are not available"},
{"Code":"107", "Error":"Resource is unavailable at this time, please select another time"},
{"Code":"111", "Error":"Please complete all required product options to complete the booking."},
{"Code":"115", "Error":"Please select a quantity for the main product."},
{"Code":"304", "Error":"Quantity of 1 is allowed in the basket for this product"},
]
}
>