Skip to content

Add Fuel Order

Create a new fuel order in PDI with complete order details including products, quantities, and delivery information.

addFuelOrder

order

ParameterTypeRequiredDefaultDescription
OrderJSONYes-PDI Fuel Order object in JSON format
Target Order StatusoptionsNo5The status to assign to the order when created
ValueDescription
0Quote
1Open
2Picklist Printed
3Shipped
4Dispatched
5Released for Billing
6Billed
10Released for Dispatch
12Released for Picking
13Accepted by Site
15Delivered
16Pending

The order object must contain the following required fields:

FieldTypeRequiredDescription
destinationTypenumberYesDestination type code
deliveryDateTimestringYesDelivery date/time
businessDatestringYesBusiness date
liftDateTimestringYesLift date/time
fuelDetailsarrayYesArray of fuel detail objects (at least one required)
{
"destinationType": 1,
"deliveryDateTime": "2024-01-16T10:00:00",
"businessDate": "2024-01-16",
"liftDateTime": "2024-01-16T08:00:00",
"customerId": "CUST001",
"siteId": "SITE001",
"fuelDetails": [
{
"productId": "PROP001",
"quantity": 500,
"uom": "GAL"
}
]
}
OptionTypeDefaultDescription
Include Debug InfobooleanfalseWhether to include raw request/response data for debugging
{
"success": true,
"resultCode": "0",
"resultDescription": "Success",
"orderNo": "12345",
"referenceNo": "REF001",
"siteId": "SITE001",
"orderStatus": 5,
"httpStatusCode": 200,
"response": {}
}
{
"success": false,
"resultCode": "1",
"resultDescription": "Validation Error",
"exception": {
"type": "ValidationException",
"typeDescription": "Input validation failed",
"description": "Invalid customer ID",
"additionalData": null
},
"httpStatusCode": 200
}
FieldTypeDescription
successbooleanWhether the operation succeeded
resultCodestringPDI result code
resultDescriptionstringDescription of the result
orderNostringCreated order number
referenceNostringReference number
siteIdstringSite ID
orderStatusnumberFinal order status
exceptionobjectException details if error occurred
  • Missing Order Object: Order object is required
  • Missing destinationType: Required field ‘destinationType’ is missing
  • Missing deliveryDateTime: Required field ‘deliveryDateTime’ is missing
  • Missing businessDate: Required field ‘businessDate’ is missing
  • Missing liftDateTime: Required field ‘liftDateTime’ is missing
  • Missing fuelDetails: At least one fuel detail is required
  • SOAP Fault: Error returned from PDI SOAP service
  • Parse Error: Failed to parse XML response