Add Fuel Order
Create a new fuel order in PDI with complete order details including products, quantities, and delivery information.
Operation
Section titled “Operation”addFuelOrder
Resource
Section titled “Resource”order
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Order | JSON | Yes | - | PDI Fuel Order object in JSON format |
| Target Order Status | options | No | 5 | The status to assign to the order when created |
Target Order Status Options
Section titled “Target Order Status Options”| Value | Description |
|---|---|
0 | Quote |
1 | Open |
2 | Picklist Printed |
3 | Shipped |
4 | Dispatched |
5 | Released for Billing |
6 | Billed |
10 | Released for Dispatch |
12 | Released for Picking |
13 | Accepted by Site |
15 | Delivered |
16 | Pending |
Order Object Schema
Section titled “Order Object Schema”The order object must contain the following required fields:
| Field | Type | Required | Description |
|---|---|---|---|
| destinationType | number | Yes | Destination type code |
| deliveryDateTime | string | Yes | Delivery date/time |
| businessDate | string | Yes | Business date |
| liftDateTime | string | Yes | Lift date/time |
| fuelDetails | array | Yes | Array of fuel detail objects (at least one required) |
Example Order Object
Section titled “Example Order Object”{ "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" } ]}Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
| Include Debug Info | boolean | false | Whether to include raw request/response data for debugging |
Response
Section titled “Response”Success
Section titled “Success”{ "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}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the operation succeeded |
| resultCode | string | PDI result code |
| resultDescription | string | Description of the result |
| orderNo | string | Created order number |
| referenceNo | string | Reference number |
| siteId | string | Site ID |
| orderStatus | number | Final order status |
| exception | object | Exception details if error occurred |
Error Handling
Section titled “Error Handling”- 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