{
  "swagger": "2.0",
  "info": {
    "version": "v3",
    "title": " TruckFuelNet CustomerAPI v3.0",
    "description": "RESTful API for interacting with TFN system.<br/>\r\n<br/>\r\n<strong><h3>Notice:</h3></strong>\r\n<br/>\r\n<h3>Kindly note that TFNCustomerAPI is now versioned. To continue using a specific API call without issues, please specify an additional parameter with your required version you would wish to use.\r\nIf no version is specified, the latest version will be used. Older versions of the API's will continue to function. Please consult response headers for current supported and deprecated versions. </h3>\r\n<br/>\r\n<br/>\r\nExample URL: https://api.tfn.co.za/api/Ping?api-version=3 or https://api.tfn.co.za/api/Ping\r\n<br/>\r\n<br/>\r\n<h3>Links to other swagger documents</h3>\r\n<br/>\r\n<a href=\"https://customerapi.qa.tfn.co.za/swagger/webhooksample/ui/index\" target=\"_blank\">TruckFuelNet Web Hook Receive Transactions Sample</a>\r\n"
  },
  "host": "customerapi.qa.tfn.co.za",
  "schemes": [
    "https"
  ],
  "paths": {
    "/api/Depots": {
      "get": {
        "tags": [
          "depots"
        ],
        "summary": "Retrieves a list of depots",
        "description": "Only depots which a user has access to will be returned.",
        "operationId": "Depots_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the depot belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.DepotSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Drivers": {
      "get": {
        "tags": [
          "drivers"
        ],
        "summary": "Returns the customer's full driver list.",
        "operationId": "Drivers_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number to get all drivers for.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.DriverSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "tags": [
          "drivers"
        ],
        "summary": "Provide a driver to import into the TFN system or to update with new info",
        "operationId": "Drivers_Post",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number to which the driver has to be added to",
            "required": true,
            "type": "string"
          },
          {
            "name": "driver",
            "in": "body",
            "description": "DriverSerializable to use to create new driver",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.DriverSerializable"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.DriverSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/LogOut": {
      "post": {
        "tags": [
          "logOut"
        ],
        "summary": "Signs out the current user.",
        "description": "Provide your refresh token to end your session. The refresh token is permanently cancelled\r\nand can no longer be used to get new access tokens. Your current access token will keep\r\nworking until it naturally expires.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `204 No Content` | Sign-out successful. |\r\n| `400 Bad Request` | The refresh token was not recognised. |\r\n| `401 Unauthorized` | You are not signed in. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "LogOut_Post",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "logoutPoco",
            "in": "body",
            "description": "Your refresh token.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CustomerAPI.Controllers.LogoutPOCO"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          },
          "204": {
            "description": "NoContent"
          },
          "400": {
            "description": "BadRequest"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Orders/{orderNumber}": {
      "get": {
        "tags": [
          "orders"
        ],
        "summary": "Retrieves a specific order for a given customer.",
        "description": "Returns the order identified by the supplied {orderNumber} for the\r\nspecified {customerNumber}, provided that the current user has access\r\nto that customer.\r\n            \r\nIf no matching order exists, a `401 Unauthorized` response is returned. Order existence\r\nis not distinguished from authorization failure to prevent enumeration.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Order retrieved successfully. |\r\n| `400 Bad Request` | The {orderNumber} or {customerNumber} is invalid, or the request failed business validation (for example, invalid arguments). |\r\n| `401 Unauthorized` | The caller is not authorized, the customer number is not valid for this user, or the order was not found. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to retrieve the order. |",
        "operationId": "Orders_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "orderNumber",
            "in": "path",
            "description": "5-digit order number. The value will be left-padded with `\"0\"` if less than 5 digits.",
            "required": true,
            "type": "string"
          },
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Orders": {
      "get": {
        "tags": [
          "orders"
        ],
        "summary": "Retrieves a list of orders for a given customer after the specified date.",
        "description": "Returns all orders for the specified {customerNumber} that have been modified\r\nafter {modifiedAfterDate}.\r\n            \r\nThe {modifiedAfterDate} parameter has a maximum range of 14 days ago. Requests\r\nwith a date older than 14 days will be rejected. Orders that have been marked as deleted will\r\nalso be returned.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Orders retrieved successfully. |\r\n| `400 Bad Request` | The {customerNumber} is invalid, {modifiedAfterDate} is earlier than the allowed 14-day limit, or the request failed business validation. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to retrieve orders. |",
        "operationId": "Orders_GetOrders",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number to retrieve orders for.",
            "required": true,
            "type": "string"
          },
          {
            "name": "modifiedAfterDate",
            "in": "query",
            "description": "Only orders modified after this date will be returned.",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderSerializable"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "tags": [
          "orders"
        ],
        "summary": "Updates a specified order.",
        "description": "Uses the supplied order data to process an update operation. The order is identified\r\nby the `OrderNumber` field on the order object.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Order successfully updated. |\r\n| `400 Bad Request` | The request is invalid or failed business validation (for example, validation rules were not met for the supplied order details). |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to update the order. |",
        "operationId": "Orders_UpdateOrder",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "order",
            "in": "body",
            "description": "The order object that will be used to update the order.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderSerializableV2"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderProcessingResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "tags": [
          "orders"
        ],
        "summary": "Creates a new order.",
        "description": "When creating a new order or adding new entries to an existing order you must specify a\r\n`newRecordIdentifier`. The API uses this value to ensure that repeated attempts to create\r\nnew records do not result in duplicates.\r\n            \r\nIf the `newRecordIdentifier` is not specified for a new order or an existing order with new\r\nentries, the update will fail. You may generate a throwaway `System.Guid` for this value as\r\nlong as you include the same value for repeated attempts to complete a specific change.\r\n            \r\nFor deletions, you may attempt to set the `IsDeleted` flag to `1` for order entries. If\r\ndeletion is possible, the entry will be deleted; otherwise it will not be deleted, and you will\r\nreceive information in the `OrderProcessingResult` to confirm the failed deletion attempt.\r\nAll other information will still be processed.\r\n            \r\n**Important: Integer Values with Leading Zeros**\r\n            \r\nInteger fields (e.g., `SupplierNumber`, `ProductNumber`) with leading zeros must be sent as\r\nstrings in quotes to avoid octal interpretation. For example, send `\"0144\"` instead of `0144`,\r\notherwise the value may be parsed as octal (0144 octal = 100 decimal instead of 144 decimal).\r\n            \r\n**Finding entry numbers for the Delete Entry endpoint**\r\n            \r\nThe response includes `Order.Entries`, each containing a `Position` field.\r\nThis `Position` value is the `entryNumber` required by the `DELETE {entryNumber}` endpoint.\r\nA `Position` of `0` in the request means \"create a new entry\"; the response will\r\nalways return the system-assigned position (greater than zero).\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**V3 Changes**\r\n            \r\n- Added \"SkipSMS\" property. If \"SkipSMS\" is set to true, SMS notifications will not be sent for this order.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Order created/processed successfully. |\r\n| `400 Bad Request` | The order could not be created due to business validation failures (for example, orders are not enabled for this customer or validation rules were not met). |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to create the order. |",
        "operationId": "Orders_CreateOrder",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "order",
            "in": "body",
            "description": "The order object that will be used to create the new order.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderSerializableV2"
            }
          },
          {
            "name": "newRecordIdentifier",
            "in": "query",
            "description": "GUID that will be used to uniquely identify the order operation.",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderProcessingResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "orders"
        ],
        "summary": "Deletes the specified order.",
        "description": "The order will be marked as deleted in the database. Order data is never physically removed.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Order deleted successfully. |\r\n| `400 Bad Request` | The {orderNumber} or {customerNumber} is invalid, or the delete operation failed business validation. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to delete the order. |",
        "operationId": "Orders_DeleteOrder",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "orderNumber",
            "in": "query",
            "description": "5-digit order number to delete.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderProcessingResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Orders/{entryNumber}": {
      "delete": {
        "tags": [
          "orders"
        ],
        "summary": "Deletes a specified order entry.",
        "description": "The order entry will be marked as deleted in the database. Entry data is never physically removed.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Order entry deleted successfully. |\r\n| `400 Bad Request` | The request is invalid or the delete operation failed business validation. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to delete the order entry. |",
        "operationId": "Orders_DeleteOrderEntry",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "orderNumber",
            "in": "query",
            "description": "5-digit order number. Value will be left padded with `\"0\"` if less than 5 digits.",
            "required": true,
            "type": "string"
          },
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "entryNumber",
            "in": "path",
            "description": "The entry number (position) within the order to delete.\r\nObtain this value from the Position field on the entry in the response returned by the\r\nPOST (create order) or GET (fetch order) endpoints.",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderProcessingResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Ping": {
      "get": {
        "tags": [
          "ping"
        ],
        "summary": "Returns the current server timestamp.",
        "operationId": "Ping_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Pricing": {
      "get": {
        "tags": [
          "pricing"
        ],
        "summary": "Retrieves pricing for specific product code",
        "operationId": "Pricing_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "productCode",
            "in": "query",
            "description": "Product number to retrieve pricing for.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.CustomerPriceSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/token#RefreshAccessToken": {
      "post": {
        "tags": [
          "token"
        ],
        "summary": "Refresh specified access token",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "parameters": [
          {
            "name": "grant_type",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": "refresh_token"
          },
          {
            "name": "client_ID",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": "customerAPI"
          },
          {
            "name": "refresh_token",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": ""
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "access_token": {
                  "type": "string"
                },
                "token_type": {
                  "type": "string"
                },
                "expires_in": {
                  "type": "integer"
                },
                "refresh_token": {
                  "type": "string"
                },
                "as:client_id": {
                  "type": "string"
                },
                "userName": {
                  "type": "string"
                },
                ".issued": {
                  "type": "string"
                },
                ".expires": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "token_expired"
          }
        }
      }
    },
    "/api/SubAccountBalance": {
      "get": {
        "tags": [
          "subAccountBalance"
        ],
        "summary": "Gets the current balance for a sub-account.",
        "description": "Returns the live statement balance and available balance for the given customer number.\r\nYou can only query accounts that belong to you.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Balance retrieved successfully. |\r\n| `400 Bad Request` | The customer number was not provided or is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "SubAccountBalance_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "The sub-account's customer number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.SubAccountBalanceSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/SubAccountCreditLimit": {
      "get": {
        "tags": [
          "subAccountCreditLimit"
        ],
        "summary": "Gets the credit limit for a sub-account.",
        "description": "Returns the current credit limit for the specified sub-account customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Credit limit retrieved successfully. |\r\n| `400 Bad Request` | The customer number was not provided or is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "SubAccountCreditLimit_GetSubAccountCreditLimit",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "The sub-account's customer number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.SubAccountCreditLimitSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "tags": [
          "subAccountCreditLimit"
        ],
        "summary": "Updates the credit limit for a sub-account.",
        "description": "Sets a new credit limit on the specified sub-account and returns the updated limit on success.\r\nOne sub-account can be updated per request.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Credit limit updated successfully. Returns the new limit. |\r\n| `400 Bad Request` | A customer number was not provided or is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "SubAccountCreditLimit_PostSubAccountCreditLimits",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "parentCustomerNumber",
            "in": "query",
            "description": "The parent account's customer number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "subAccountCustomerNumber",
            "in": "query",
            "description": "The customer number of the sub-account to update.",
            "required": true,
            "type": "string"
          },
          {
            "name": "newCreditLimit",
            "in": "query",
            "description": "The new credit limit to apply.",
            "required": true,
            "type": "number",
            "format": "double"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.SubAccountCreditLimitSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/SubAccountCreditLimits": {
      "get": {
        "tags": [
          "subAccountCreditLimit"
        ],
        "summary": "Gets the credit limits for all sub-accounts under a parent account.",
        "description": "Returns the credit limit for every sub-account belonging to the given parent customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Credit limits retrieved successfully. |\r\n| `400 Bad Request` | The customer number was not provided or is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "SubAccountCreditLimit_GetSubAccountCreditLimits",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "parentCustomerNumber",
            "in": "query",
            "description": "The parent account's customer number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.SubAccountCreditLimitSerializable"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/SubAccountPayment": {
      "post": {
        "tags": [
          "subAccountPayment"
        ],
        "summary": "Applies a debit or credit to a sub-account.",
        "description": "Posts a payment against the customer's sub-account and returns the updated balance on success.\r\n            \r\n**Payment action values**\r\n            \r\n| Value | Action |\r\n| ----- | ------ |\r\n| `1` | Debit |\r\n| `2` | Credit |\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Payment applied successfully. Returns the updated account balance. |\r\n| `400 Bad Request` | The customer number, action, or amount is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "SubAccountPayment_PostSubAccountPayment",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "The customer account number to debit or credit.",
            "required": true,
            "type": "string"
          },
          {
            "name": "action",
            "in": "query",
            "description": "The payment action: Debit (1) or Credit (2).",
            "required": true,
            "type": "integer",
            "format": "int32",
            "enum": [
              1,
              2
            ]
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to apply.",
            "required": true,
            "type": "number",
            "format": "double"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.SubAccountBalanceSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/TransactionsWithUtilisedOrders/{transactionId}": {
      "get": {
        "tags": [
          "transactions"
        ],
        "summary": "Retrieves a specific transaction for a given customer by transaction ID.",
        "description": "Returns the transaction identified by the supplied {transactionId} for the\r\nspecified {customerNumber}, provided that the current user has access\r\nto that customer.\r\n            \r\nIf no matching transaction exists, a `400 Bad Request` response is returned.\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Transaction retrieved successfully. |\r\n| `400 Bad Request` | The {transactionId} or {customerNumber} is invalid, the transaction was not found, or the request failed business validation. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to retrieve the transaction. |",
        "operationId": "Transactions_GetTransactionById",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the transaction belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "transactionId",
            "in": "path",
            "description": "Unique identifier of the transaction.",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerAPI.Integration.TransactionSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Transactions": {
      "get": {
        "tags": [
          "transactions"
        ],
        "summary": "Retrieves transactions for a customer after a specified date.",
        "description": "Returns batches of transactions captured after the supplied {capturedDateAfter}\r\nfor the specified {customerNumber}, provided that the current user has access\r\nto that customer.\r\n            \r\nThis endpoint can be used to retrieve all transactions in batches by continuously moving the date\r\nforward to the date and time of the last transaction retrieved after the previous retrieval.\r\n            \r\nThe minimum date should be the first transaction date for a customer. A maximum of 100 transactions\r\nwill be included at a time.\r\n            \r\n**Limitations**\r\n            \r\n- Maximum of 100 transactions per request.\r\n- Maximum of 3 months of data (limited to 2 weeks from 5AM until 7PM).\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n- Only transactions which the user has access to will be returned.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Transactions retrieved successfully. |\r\n| `400 Bad Request` | The {capturedDateAfter} is invalid, or the {customerNumber} is incorrect. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to fetch transactions. |",
        "operationId": "Transactions_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "capturedDateAfter",
            "in": "query",
            "description": "DateTime after which transactions will be retrieved.",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerAPI.Integration.TransactionSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/TransactionsWithUtilisedOrders": {
      "get": {
        "tags": [
          "transactions"
        ],
        "summary": "Retrieves transactions for a customer after a specified date, including those with utilised orders.",
        "description": "Returns batches of transactions captured after the supplied {capturedDateAfter}\r\nfor the specified {customerNumber}, including transactions with utilised orders,\r\nprovided that the current user has access to that customer.\r\n            \r\nThis endpoint can be used to retrieve all transactions in batches by continuously moving the date\r\nforward to the date and time of the last transaction retrieved after the previous retrieval.\r\n            \r\n**Limitations**\r\n            \r\n- Maximum of 50 transactions per request.\r\n- Maximum of 1 month of data (limited to 1 week from 5AM until 7PM).\r\n            \r\n**Security**\r\n            \r\n- Requires a valid bearer token in the `Authorization` header.\r\n- The caller must be authorized for the specified customer.\r\n- Only transactions which the user has access to will be returned.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Transactions retrieved successfully. |\r\n| `400 Bad Request` | The {capturedDateAfter} is invalid, or the {customerNumber} is incorrect. |\r\n| `401 Unauthorized` | The caller is not authorized, or the customer number is not valid for this user. |\r\n| `500 Internal Server Error` | An internal error occurred while trying to fetch transactions. |",
        "operationId": "Transactions_GetWithUtilised",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the order belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "capturedDateAfter",
            "in": "query",
            "description": "DateTime after which transactions will be retrieved.",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerAPI.Integration.TransactionSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/UserStatus": {
      "get": {
        "tags": [
          "userStatus"
        ],
        "summary": "Gets the status of a user account.",
        "description": "Returns whether the account is active, locked, or restricted. Useful for checking\r\na user's access before performing actions on their behalf.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Status retrieved successfully. |\r\n| `400 Bad Request` | The username was not found or the account is locked. |\r\n| `401 Unauthorized` | You are not signed in. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "UserStatus_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "userName",
            "in": "query",
            "description": "The username of the account to check.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.Services.CustomerService.UserStatusPOCO"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Vehicle": {
      "get": {
        "tags": [
          "vehicle"
        ],
        "summary": "Retrieves a list of vehicles",
        "description": "Only vehicles which a user has access to will be returned.",
        "operationId": "Vehicle_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the vehicle belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.VehicleSerializable"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "tags": [
          "vehicle"
        ],
        "summary": "Updates the details of an existing vehicle.",
        "description": "Changes the registration, tank size, status, fleet number, and external reference for a vehicle\r\non the specified customer account.\r\n            \r\n**Vehicle status values**\r\n            \r\n| Value | Status |\r\n| ----- | ------ |\r\n| `0` | Disposed |\r\n| `1` | WrittenOff |\r\n| `2` | Dormant |\r\n| `3` | Unused |\r\n| `4` | Active |\r\n| `5` | Stolen |\r\n| `6` | Moved |\r\n| `7` | Sold |\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Vehicle updated successfully. |\r\n| `400 Bad Request` | The registration, tank size, or customer number is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "Vehicle_UpdateVehicle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Your customer account number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "registration",
            "in": "query",
            "description": "The vehicle's registration number, without spaces.",
            "required": true,
            "type": "string"
          },
          {
            "name": "tankSize",
            "in": "query",
            "description": "The vehicle's tank capacity in litres.",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "status",
            "in": "query",
            "description": "The new status for the vehicle. See the status values table above.",
            "required": true,
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ]
          },
          {
            "name": "fleetNumber",
            "in": "query",
            "description": "An optional fleet reference number for the vehicle.",
            "required": false,
            "type": "string"
          },
          {
            "name": "externalNumber",
            "in": "query",
            "description": "An optional external reference number for the vehicle.",
            "required": false,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.Services.VehicleResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "tags": [
          "vehicle"
        ],
        "summary": "Adds a new vehicle to a customer account.",
        "description": "Creates the vehicle with an Active status. Provide the registration without spaces.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Vehicle added successfully. |\r\n| `400 Bad Request` | The registration, tank size, or customer number is invalid. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "Vehicle_CreateVehicle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Your customer account number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "registration",
            "in": "query",
            "description": "The vehicle's registration number, without spaces.",
            "required": true,
            "type": "string"
          },
          {
            "name": "tankSize",
            "in": "query",
            "description": "The vehicle's tank capacity in litres.",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "fleetNumber",
            "in": "query",
            "description": "An optional fleet reference number for the vehicle.",
            "required": false,
            "type": "string"
          },
          {
            "name": "externalNumber",
            "in": "query",
            "description": "An optional external reference number for the vehicle.",
            "required": false,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.Services.VehicleResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/Vehicle/{vehicleRegistration}": {
      "get": {
        "tags": [
          "vehicle"
        ],
        "summary": "Retrieves a specific vehicle.",
        "description": "Only vehicles which a user has access to will be returned.",
        "operationId": "Vehicle_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Customer number the vehicle belongs to.",
            "required": true,
            "type": "string"
          },
          {
            "name": "vehicleRegistration",
            "in": "path",
            "description": "Vehicle registration number of the vehicle to return.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.VehicleSerializable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/token#Login": {
      "post": {
        "tags": [
          "token"
        ],
        "summary": "Get new OAuth token",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "parameters": [
          {
            "name": "grant_type",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": "password"
          },
          {
            "name": "username",
            "in": "formData",
            "required": false,
            "type": "string"
          },
          {
            "name": "password",
            "in": "formData",
            "required": false,
            "type": "string"
          },
          {
            "name": "client_ID",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": "customerAPI"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "access_token": {
                  "type": "string"
                },
                "token_type": {
                  "type": "string"
                },
                "expires_in": {
                  "type": "integer"
                },
                "refresh_token": {
                  "type": "string"
                },
                "as:client_id": {
                  "type": "string"
                },
                "userName": {
                  "type": "string"
                },
                ".issued": {
                  "type": "string"
                },
                ".expires": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "token_expired"
          }
        }
      }
    },
    "/api/VirtualCardNumber": {
      "get": {
        "tags": [
          "virtualCardNumber"
        ],
        "summary": "Gets the virtual card number for a vehicle.",
        "description": "Returns the virtual card number assigned to a vehicle on the specified customer account.\r\nYou can only query vehicles that belong to your account.\r\n            \r\n**Response codes**\r\n            \r\n| Status | Description |\r\n| ------ | ----------- |\r\n| `200 OK` | Virtual card number retrieved successfully. |\r\n| `400 Bad Request` | The customer number was not found. |\r\n| `401 Unauthorized` | You are not signed in, or this customer account is not accessible to you. |\r\n| `500 Internal Server Error` | Something went wrong — please try again. |",
        "operationId": "VirtualCardNumber_Get",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/problem+json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerNumber",
            "in": "query",
            "description": "Your customer account number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "vehicleRegistration",
            "in": "query",
            "description": "The registration number of the vehicle.",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "type": "string",
            "default": "Bearer "
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.VirtualCardSerialisable"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Tranzact.Transport.BusinessLogic.DepotSerializable": {
      "type": "object",
      "properties": {
        "DepotID": {
          "format": "uuid",
          "description": "Unique Depot Identifier",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Number": {
          "format": "int32",
          "description": "Depot number",
          "type": "integer"
        },
        "Title": {
          "description": "Depot name",
          "default": "",
          "type": "string",
          "example": ""
        },
        "GPSLatitude": {
          "format": "double",
          "description": "GPS latitude of the depot",
          "type": "number"
        },
        "GPSLongitude": {
          "format": "double",
          "description": "GPS longitude of the depot",
          "type": "number"
        },
        "MarketingCategory": {
          "format": "int32",
          "description": "TFN’s site marketing category\r\n -  Refuel2Save\r\n -  Standard\r\n -  CrossBorder",
          "enum": [
            0,
            1,
            2
          ],
          "type": "integer"
        },
        "Products": {
          "description": "Products offered by the depot",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.DepotProductSerializable"
          }
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.DepotProductSerializable": {
      "type": "object",
      "properties": {
        "ProductCode": {
          "description": "Product code",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ProductTitle": {
          "description": "Name of the product",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.DriverSerializable": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "uuid",
          "description": "The driver UniqueIdentifier",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The driver name",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Surname": {
          "description": "The driver surname",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Cellphone": {
          "description": "The driver cell number",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "CustomerAPI.Controllers.LogoutPOCO": {
      "description": "The information needed to sign out.",
      "type": "object",
      "properties": {
        "refreshToken": {
          "description": "The refresh token you received when you signed in.",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.OrderSerializable": {
      "description": "Represents a single order in the system.\r\nAn order consists of one or more order entries.",
      "type": "object",
      "properties": {
        "IsDeleted": {
          "description": "Indicates if a previously existing order is now deleted.\r\nOrders from both FetchOrders and FetchOrder will return deleted orders so that the third party system can \r\neasily update the status in the 3rd party system.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "Planned": {
          "description": "Indicates if an order is specified with enough detail to be made active and be used.\r\nPlanned orders are missing detail but have been persisted.\r\nValidations: Read only",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "PlannedReasons": {
          "description": "Reasons this order is in the planned status\r\nValidations: Read only",
          "default": "",
          "type": "string",
          "example": ""
        },
        "OrderNumber": {
          "description": "The unique order number\r\nValidations: Read-only.\r\nSpecify a valid OrderNumber when updating an existing order\r\nLeave blank when creating a new order. The returned order will include the system issued order number.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerNumber": {
          "description": "The customer number of the associated customer.\r\nValidations: A valid customer number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SubContractorCustomerNumber": {
          "description": "The customer number of the associated sub contractor.\r\nTo be used when the order is for another customer (the 'Farmer' model).\r\nValidations: A valid customer number and associated as a sub contractor to the customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerReference": {
          "description": "A reference from the customer system or process\r\nValidations: Max length 100 characters\r\nNote: Not used when entry-level references are enabled for this customer. In that case, set CustomerReference on each entry instead.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "EntriesCompleteAfterFirstUse": {
          "description": "True if order entries complete after first usage.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "MaxAllocation": {
          "format": "double",
          "description": "The maximum litres (for fuel products) or maximum ZAR amount (for non fuel products)\r\nthat can be allocated to this order.\r\nOnly applicable for sub-contractor orders (i.e. when SubContractorCustomerNumber is specified).\r\nValidations: Not 0.00 and not negative",
          "type": "number"
        },
        "SubContractorAccepted": {
          "description": "True when a sub-contractor has accepted this order\r\nValidations: Cannot be true at the same time SubContractorDeclined is true",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "SubContractorDeclined": {
          "description": "True when a sub-contractor has declined this order\r\nValidations: Cannot be true at the same time SubContractorAccepted is true",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "StatusTitle": {
          "description": "The current status that the order is in",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Entries": {
          "description": "Individual order entry instructions associated with this parent level order",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderEntrySerializable"
          }
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.OrderEntrySerializable": {
      "description": "Represents a single order entry (which is contained within an order)\r\nAn order entry is an instruction to purchase product on the network.",
      "type": "object",
      "properties": {
        "IsDeleted": {
          "description": "Indicates if a previously existing entry is now deleted.\r\nEntries returned include deleted entries so that the third party system can easily.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "Position": {
          "format": "int32",
          "description": "The position is used to uniquely identify an entry in the system.\r\n\r\nWhen adding a new entry set the position to zero.\r\nThe returning order will include the system allocated position.\r\nWhen editing an entry make sure the position is specified correctly.\r\n            \r\nThe position also indicates the order in which an entry\r\nshows in the list of entries when viewing the order.\r\nHowever, it is not possible to change the position of an entry.",
          "type": "integer"
        },
        "SupplierNumber": {
          "format": "int32",
          "description": "The system number for the supplier (when applicable)\r\nThe numbers are available on request or can be determined via the Depots method documented in the Supporting Data API.\r\nWe recommend getting an updated list once a day to ensure depots for a customer are up-to-date",
          "type": "integer"
        },
        "ProductCode": {
          "description": "The code of the purchased product (when applicable)\r\nThe product codes are available on request.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleRegistration": {
          "description": "Vehicle registration\r\nValidations: Should already exist on the specified customer record\r\n(or sub-contractor if sub-contractor is specified) record",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CardNumber": {
          "description": "Returns the card associated with the specified vehicle (if any - virtual cards are not linked to vehicles)\r\nCard number (read only)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "DriverCellNumber": {
          "description": "Driver cell number. To be specified when using virtual cards. To be left blank when using cards.\r\nValidations: Should already exist on the specified customer record (or sub-contractor if sub-contractor is specified) record",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CurrentVirtualCardNumber": {
          "description": "Current virtual card number if applicable (read only)\r\nNumber will change when the expiry date is reached and is only guaranteed to be correct as at the time the API is called.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "MaxAllocation": {
          "format": "double",
          "description": "The maximum litres (for fuel products) or maximum ZAR amount (for non fuel products)\r\nthat can be allocated to this entry.",
          "type": "number"
        },
        "ValidDateStart": {
          "format": "date-time",
          "description": "Start of the order entry's usable period\r\nValidations: Is before the end period",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ValidDateEnd": {
          "format": "date-time",
          "description": "End of the order entry's usable period\r\nValidations: Is after the start period",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerReference": {
          "description": "A reference from the third party system or process\r\nValidations: Max length 100 characters",
          "default": "",
          "type": "string",
          "example": ""
        },
        "LinkedTransactions": {
          "description": "List of product purchases linked to this entry",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderTransactionSerializable"
          }
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.OrderTransactionSerializable": {
      "description": "Transaction information returned with an order.\r\nThis can be optionally used to match transactions returned using\r\nthe FetchTransactions API",
      "type": "object",
      "properties": {
        "TransactionID": {
          "format": "uuid",
          "description": "Transaction information returned with an order.\r\nThis can be optionally used to match transactions returned using\r\nthe FetchTransactions API",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.OrderSerializableV2": {
      "type": "object",
      "properties": {
        "IsDeleted": {
          "description": "Indicates if a previously existing order is now deleted.\r\nOrders from both FetchOrders and FetchOrder will return deleted orders so that the third party system can \r\neasily update the status in the 3rd party system.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "Planned": {
          "description": "Indicates if an order is specified with enough detail to be made active and be used.\r\nPlanned orders are missing detail but have been persisted.\r\nValidations: Read only",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "PlannedReasons": {
          "description": "Reasons this order is in the planned status\r\nValidations: Read only",
          "default": "",
          "type": "string",
          "example": ""
        },
        "OrderNumber": {
          "description": "The unique order number\r\nValidations: Read-only.\r\nSpecify a valid OrderNumber when updating an existing order\r\nLeave blank when creating a new order. The returned order will include the system issued order number.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerNumber": {
          "description": "The customer number of the associated customer.\r\nValidations: A valid customer number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SubContractorCustomerNumber": {
          "description": "The customer number of the associated sub-contractor.\r\nTo be used when the order is for another customer (the 'Farmer' model).\r\nValidations: A valid customer number and associated as a sub-contractor to the customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerReference": {
          "description": "A reference from the customer system or process\r\nValidations: Max length 100 characters\r\nNote: Not used when entry-level references are enabled for this customer. In that case, set CustomerReference on each entry instead.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "EntriesCompleteAfterFirstUse": {
          "description": "True if order entries complete after first usage.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "MaxAllocation": {
          "format": "double",
          "description": "The maximum litres (for fuel products) or maximum ZAR amount (for non fuel products)\r\nthat can be allocated to this order.\r\nOnly applicable for sub-contractor orders (i.e. when SubContractorCustomerNumber is specified).\r\nValidations: Not 0.00 and not negative",
          "type": "number"
        },
        "SubContractorAccepted": {
          "description": "True when a sub-contractor has accepted this order\r\nValidations: Cannot be true at the same time SubContractorDeclined is true",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "SubContractorDeclined": {
          "description": "True when a sub-contractor has declined this order\r\nValidations: Cannot be true at the same time SubContractorAccepted is true",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "StatusTitle": {
          "description": "The current status that the order is in",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SkipSMS": {
          "description": "Skips sending of SMS on order creation. Defaults to false.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "Entries": {
          "description": "Individual order entry instructions associated with this parent level order",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderEntrySerializable"
          }
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.OrderProcessingResult": {
      "description": "The result returned when calling UpdateOrCreateOrder.\r\nThe message field returns information in addition to the validation category.",
      "type": "object",
      "properties": {
        "ValidationResult": {
          "default": "",
          "enum": [
            "Successful",
            "InvalidVehicle",
            "InvalidDriver",
            "InvalidCustomer",
            "InvalidSubContractor",
            "InvalidProduct",
            "InvalidDepot",
            "InvalidOrderNumber",
            "InvalidOrderID",
            "InvalidOrderEntryID",
            "InvalidOrderEntry",
            "MixedCardAndVirtualCardEntries",
            "InvalidSubContractorAccepted",
            "NoEntries",
            "OrderEntryWithActivityRemoved",
            "InvalidMaxAllocation",
            "InvalidDates",
            "RequireUniqueOrderReference",
            "OrdersNotEnabled",
            "UnspecifiedError",
            "DormantDepot",
            "OrderLimitViolation",
            "OrderComplete",
            "OrderEntryComplete"
          ],
          "type": "string",
          "example": ""
        },
        "Order": {
          "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.OrderSerializable"
        },
        "Message": {
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.CustomerPriceSerializable": {
      "type": "object",
      "properties": {
        "SupplierName": {
          "description": "The name of the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SupplierNumber": {
          "description": "The TFN account number for the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Price": {
          "format": "double",
          "description": "The final price (including volume and promotional discounts) paid by the logged in customer.\r\nFor a fuel product this is the price per litre, relative to grid.\r\nFor a non fuel product this is the price of a single quantity of the product.",
          "type": "number"
        },
        "PriceIncludingGrid": {
          "format": "double",
          "description": "The final price (including volume and promotional discounts) paid by the logged in customer.\r\nFor a fuel product this is the price per litre.\r\nFor a non fuel product this is the price of a single quantity of the product.",
          "type": "number"
        },
        "VolumeDiscount": {
          "format": "double",
          "description": "Volume discount received",
          "type": "number"
        },
        "PromotionalDiscount": {
          "format": "double",
          "description": "Promotional discount received",
          "type": "number"
        },
        "HasSpecificPricing": {
          "description": "Has Specific Pricing",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "SpecificPricing": {
          "description": "If it has specific pricing then a list of specific prices is returned",
          "type": "array",
          "items": {
            "$ref": "#/definitions/POCOs.SupplySiteSpecificPricingPOCO"
          }
        },
        "CustomerExternalReference": {
          "default": "",
          "type": "string",
          "example": ""
        },
        "ParentExternalReference": {
          "description": "The external reference for the parent customer at this supply site and product.\r\nOnly populated for sub-account customers where the parent has external references enabled.\r\nWill be empty for normal (non-sub-account) customers.",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "POCOs.SupplySiteSpecificPricingPOCO": {
      "type": "object",
      "properties": {
        "Description": {
          "default": "",
          "type": "string",
          "example": ""
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "CurrencySymbol": {
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.Services.WebHookTransactionExport.WebhookTransaction": {
      "type": "object",
      "properties": {
        "TransactionID": {
          "format": "uuid",
          "description": "Unique Transaction Identifier",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CustomerNumber": {
          "description": "The customer number of the associated customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerExternalNumber": {
          "description": "The external account reference of the associated customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ChildCustomerNumber": {
          "description": "The child customer number of the associated child customer (only applicable to service provider transactions)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ChildCustomerExternalNumber": {
          "description": "The external account reference of the associated child customer (only applicable to service provider transactions)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ProductCode": {
          "description": "The code of the purchased product (when applicable)\r\nExample codes:\r\n- SHO:\tShower\r\n- WB:\tWeigh bridge\r\n- D1:\tDiesel (500ppm)\r\n- ULP93:\tPetrol (ULP93)\r\n- D0:\tDiesel (50ppm)\r\n- PAR:\tParts\r\n- IPB:\tIP (Bulk)\r\n- F2:\tAdBlue\r\n- OS:\tOvernight stay\r\n- F:\tOil\r\n- ULP95:\tPetrol (ULP95)\r\n- L1:\tLaundry\r\n- WKS:\tWorkshop\r\n- CAN:\tCanteen\r\n- SHP:\tShop\r\n- W:\tTruck wash\r\n- D3:\tDiesel (10ppm)\r\n- EW:\teWallet Allocation",
          "default": "",
          "type": "string",
          "example": ""
        },
        "TransactionTypeCode": {
          "description": "The type of transaction\r\nWhen a product code is specified then the transaction type is assumed to be a purchase.\r\nExample codes:\r\n- CX: Correction\r\n- ETMF: eToll account management fee\r\n- EWF: eWallet fee\r\n- SMS: SMS Monitor fee\r\n- ASF: Account setup fee\r\n- ACF: Annual card fee\r\n- CD: Account debit\r\n- LCP: Lost card protection fee\r\n- CDR: Cash deposit fee\r\n- CC: Customer credit (funds deposit)\r\n- OF: Order setup fee\r\n- MCF: Monthly account fee\r\n- CDF: Cheque deposit fee\r\n- OR: Monthly orders and route management fee\r\n- ER: Exception reporting service fee\r\n- HBDF: Home base depot fee\r\n- EM: Email monitor fee",
          "default": "",
          "type": "string",
          "example": ""
        },
        "TransactionDate": {
          "format": "date-time",
          "description": "The date the transaction took place",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CapturedDate": {
          "format": "date-time",
          "description": "The date the transaction was captured in the TFN system",
          "default": "",
          "type": "string",
          "example": ""
        },
        "DepotName": {
          "description": "The name of the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "DepotNumber": {
          "description": "The TFN account number for the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleRegistration": {
          "description": "Vehicle registration",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleFleetNumber": {
          "description": "Vehicle fleet number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Amount": {
          "format": "double",
          "description": "Transaction Amount\r\n - Positive amounts increase customer balance\r\n - Negative amounts decrease customer balance",
          "type": "number"
        },
        "VAT": {
          "format": "double",
          "description": "Transaction VAT Amount",
          "type": "number"
        },
        "ChildAccountAmount": {
          "format": "double",
          "description": "The amount charged to the child customer (only applicable to service provider transactions)\r\n - Positive amounts increase child customer balance\r\n - Negative amounts decrease child customer balance",
          "type": "number"
        },
        "ChildAccountVAT": {
          "format": "double",
          "description": "The VAT amount charged to the child customer (only applicable to service provider transactions)",
          "type": "number"
        },
        "Litres": {
          "format": "double",
          "description": "The Litres pumped (when applicable)",
          "type": "number"
        },
        "Odometer": {
          "format": "double",
          "description": "The odometer of the vehicle (when available)",
          "type": "number"
        },
        "UtilisedOrders": {
          "description": "Orders utilised to complete this transaction",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.TransactionOrder"
          }
        },
        "TransactionReference": {
          "description": "The Transaction reference number of the transaction",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ReversedTransactionDetails": {
          "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.ReversedTransaction",
          "description": "A reference to the transaction that has been reversed.\r\nTypically this is a product purchase of some sort that has been cancelled or reprocessed.\r\nWill be set for transaction reversals and \r\ncan be used to determine if the current transaction is a reversal."
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.TransactionOrder": {
      "description": "An order utilised or partially utilised to complete a transaction",
      "type": "object",
      "properties": {
        "OrderNumber": {
          "description": "System generated order number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerReferences": {
          "description": "Any customer references specified on the order (entry and order level)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "AllocatedLitres": {
          "format": "double",
          "description": "Number of litres allocated to the order by the transaction",
          "type": "number"
        },
        "AllocatedAmount": {
          "format": "double",
          "description": "Amount in ZAR allocated to the order by the transaction",
          "type": "number"
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.ReversedTransaction": {
      "description": "Information about a reversed transaction",
      "type": "object",
      "properties": {
        "TransactionID": {
          "format": "uuid",
          "description": "The TransactionID of the reversed transaction",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IsFuel": {
          "description": "The transaction type of the reversed transaction (Fuel or Non Fuel)",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "TransactionReference": {
          "description": "The authorisation reference of the reversed transaction.",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.SubAccountBalanceSerializable": {
      "description": "The current balance for a sub-account.",
      "type": "object",
      "properties": {
        "CustomerNumber": {
          "description": "The sub-account's customer number.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "AccountBalance": {
          "format": "double",
          "description": "The current statement balance on the account.",
          "type": "number"
        },
        "AccountAvailableBalance": {
          "format": "double",
          "description": "The amount still available to spend, after accounting for pending transactions.",
          "type": "number"
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.SubAccountCreditLimitSerializable": {
      "description": "The credit limit for a sub-account.",
      "type": "object",
      "properties": {
        "SubAccountNumber": {
          "description": "The sub-account's customer number.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SubAccountName": {
          "description": "The name of the sub-account.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CreditLimit": {
          "format": "double",
          "description": "The maximum credit available to this sub-account.",
          "type": "number"
        }
      }
    },
    "CustomerAPI.Integration.TransactionSerializable": {
      "type": "object",
      "properties": {
        "TransactionID": {
          "format": "uuid",
          "description": "Unique Transaction Identifier",
          "default": "",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CustomerNumber": {
          "description": "The customer number of the associated customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CustomerExternalNumber": {
          "description": "The external account reference of the associated customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ChildCustomerNumber": {
          "description": "The child customer number of the associated child customer (only applicable to service provider transactions)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ChildCustomerExternalNumber": {
          "description": "The external account reference of the associated child customer (only applicable to service provider transactions)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ProductCode": {
          "description": "The code of the purchased product (when applicable)\r\nExample codes:\r\n- SHO:\tShower\r\n- WB:\tWeigh bridge\r\n- D1:\tDiesel (500ppm)\r\n- ULP93:\tPetrol (ULP93)\r\n- D0:\tDiesel (50ppm)\r\n- PAR:\tParts\r\n- IPB:\tIP (Bulk)\r\n- F2:\tAdBlue\r\n- OS:\tOvernight stay\r\n- F:\tOil\r\n- ULP95:\tPetrol (ULP95)\r\n- L1:\tLaundry\r\n- WKS:\tWorkshop\r\n- CAN:\tCanteen\r\n- SHP:\tShop\r\n- W:\tTruck wash\r\n- D3:\tDiesel (10ppm)\r\n- EW:\teWallet Allocation",
          "default": "",
          "type": "string",
          "example": ""
        },
        "TransactionTypeCode": {
          "description": "The type of transaction\r\nWhen a product code is specified then the transaction type is assumed to be a purchase.\r\nExample codes:\r\n- CX: Correction\r\n- ETMF: eToll account management fee\r\n- EWF: eWallet fee\r\n- SMS: SMS Monitor fee\r\n- ASF: Account setup fee\r\n- ACF: Annual card fee\r\n- CD: Account debit\r\n- LCP: Lost card protection fee\r\n- CDR: Cash deposit fee\r\n- CC: Customer credit (funds deposit)\r\n- OF: Order setup fee\r\n- MCF: Monthly account fee\r\n- CDF: Cheque deposit fee\r\n- OR: Monthly orders and route management fee\r\n- ER: Exception reporting service fee\r\n- HBDF: Home base depot fee\r\n- EM: Email monitor fee",
          "default": "",
          "type": "string",
          "example": ""
        },
        "TransactionDate": {
          "format": "date-time",
          "description": "The date the transaction took place",
          "default": "",
          "type": "string",
          "example": ""
        },
        "CapturedDate": {
          "format": "date-time",
          "description": "The date the transaction was captured in the TFN system",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SupplierName": {
          "description": "The name of the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "SupplierNumber": {
          "description": "The TFN account number for the supplier (when applicable)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleRegistration": {
          "description": "Vehicle registration",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleFleetNumber": {
          "description": "Vehicle fleet number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleExternalNumber": {
          "description": "Vehicle external number",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Amount": {
          "format": "double",
          "description": "Transaction Amount\r\n - Positive amounts increase customer balance\r\n - Negative amounts decrease customer balance",
          "type": "number"
        },
        "VAT": {
          "format": "double",
          "description": "Transaction VAT Amount",
          "type": "number"
        },
        "ChildAccountAmount": {
          "format": "double",
          "description": "The amount charged to the child customer (only applicable to service provider transactions)\r\n - Positive amounts increase child customer balance\r\n - Negative amounts decrease child customer balance",
          "type": "number"
        },
        "ChildAccountVAT": {
          "format": "double",
          "description": "The VAT amount charged to the child customer (only applicable to service provider transactions)",
          "type": "number"
        },
        "Litres": {
          "format": "double",
          "description": "The Litres pumped (when applicable)",
          "type": "number"
        },
        "Odometer": {
          "format": "double",
          "description": "The odometer of the vehicle (when available)",
          "type": "number"
        },
        "UtilisedOrders": {
          "description": "Orders utilised to complete this transaction",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.TransactionOrder"
          }
        },
        "TransactionReference": {
          "description": "The Transaction reference number of the transaction",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Identifier": {
          "description": "The identifiers used to identify the customer",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ReversedTransaction": {
          "$ref": "#/definitions/Tranzact.Transport.BusinessLogic.ReversedTransaction",
          "description": "A reference to the transaction that has been reversed.\r\nTypically this is a product purchase of some sort that has been cancelled or reprocessed.\r\nWill be set for transaction reversals and \r\ncan be used to determine if the current transaction is a reversal."
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.Services.CustomerService.UserStatusPOCO": {
      "description": "The current status of a user account.",
      "type": "object",
      "properties": {
        "Username": {
          "description": "The account username.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Email": {
          "description": "The email address associated with the account.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Locked": {
          "description": "Whether the account is locked. A locked account cannot sign in.",
          "default": false,
          "type": "boolean",
          "example": false
        },
        "LoginAttempts": {
          "format": "int32",
          "description": "The number of consecutive failed sign-in attempts.",
          "type": "integer"
        },
        "LastActivity": {
          "format": "date-time",
          "description": "The date and time of the user's last activity.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "Status": {
          "description": "A description of the account's current status (e.g. Active, Locked).",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.VehicleSerializable": {
      "type": "object",
      "properties": {
        "Registration": {
          "description": "The vehicle registration number (mandatory)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "FleetNumber": {
          "description": "The vehicle fleet number  (optional)",
          "default": "",
          "type": "string",
          "example": ""
        },
        "TankSize": {
          "format": "int32",
          "description": "Tank size in litres  (mandatory)",
          "type": "integer"
        },
        "Status": {
          "format": "int32",
          "description": "Status of the vehicle\r\n - Disposed\r\n - WrittenOff\r\n - Dormant\r\n - Unused\r\n - Active\r\n - Stolen\r\n - Moved\r\n - Sold",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7
          ],
          "type": "integer"
        },
        "ExternalNumber": {
          "description": "The vehicle external number  (optional)",
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.Services.VehicleResult": {
      "type": "object",
      "properties": {
        "Successful": {
          "type": "boolean"
        },
        "Message": {
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "CustomerAPI.Controllers.VersionPOCO": {
      "type": "object",
      "properties": {
        "Version": {
          "default": "",
          "type": "string",
          "example": ""
        },
        "SupportVersion": {
          "default": "",
          "type": "string",
          "example": ""
        }
      }
    },
    "Tranzact.Transport.BusinessLogic.VirtualCardSerialisable": {
      "description": "The virtual card number assigned to a vehicle.",
      "type": "object",
      "properties": {
        "VirtualCardNumber": {
          "description": "The virtual card number to use for transactions.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "VehicleRegistration": {
          "description": "The registration number of the vehicle this card is assigned to.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "StartDate": {
          "format": "date-time",
          "description": "The date and time from which this card number is valid.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "ExpiryDate": {
          "format": "date-time",
          "description": "The date and time after which this card number can no longer be used.",
          "default": "",
          "type": "string",
          "example": ""
        },
        "IsOneUse": {
          "description": "Whether this card number is single-use. When true, the number expires after one transaction.",
          "default": false,
          "type": "boolean",
          "example": false
        }
      }
    }
  },
  "securityDefinitions": {
    "apiKey": {
      "type": "apiKey",
      "description": "API Key Authentication",
      "name": "Authorization",
      "in": "header"
    }
  }
}