OneRail Order API
The Order API from OneRail — 22 operation(s) for order.
The Order API from OneRail — 22 operation(s) for order.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/onerail-order-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Onerail Order API
version: '1.0'
description: 'Operations tagged Order across 3 of this provider''s published API definitions: onerail-delivery-api-openapi.yml, onerail-operations-api-openapi.yml, onerail-order-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
- url: /
description: Default relative server URL
tags:
- name: Order
paths:
/v2/order:
x-exegesis-controller: Order
post:
tags:
- Order
summary: Create an order with deliveries and returns
operationId: createV2
security:
- ApiKey: []
- OAuth: []
- AppId: []
requestBody:
description: 'The top-level parameter, `orderAction`, determines whether the contents of the `orderData`
object will create a new order or will be used as a reference for the creation of deliveries
and returns. <br><br>
If `orderAction == "ADD"`, the given orderId must refer to an existing order with which to
associate the deliveries being created. If `orderAction == "CREATE"`, the given
`orderId` must be unique. Then if `orderAction === "RETURN"`, the given orderId must refer to an existing order with which to the associated returns being created<br><br>
Deliveries can be created and associated in the same request that an order is created.
'
content:
application/json:
schema:
$ref: '#/components/schemas/v2OrderRequest'
responses:
'200':
description: Success. The order and any deliveries and returns have been created
content:
application/json:
schema:
$ref: '#/components/schemas/v2OrderResponse'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
/order/{orderId}/partial-update:
x-exegesis-controller: Order
patch:
tags:
- Order
summary: Partial update an order with deliveries, appending items and containers
operationId: patchPartialUpdate
security:
- ApiKey: []
- OAuth: []
- AppId: []
parameters:
- name: orderId
in: path
description: order Id
required: true
schema:
type: string
requestBody:
description: Order Info and its deliveries
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPartialUpdate'
responses:
'200':
description: Success. The order deliveries are updated
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreated'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- Order
summary: Partial update an order with deliveries, replacing items and containers
operationId: putPartialUpdate
security:
- ApiKey: []
- OAuth: []
- AppId: []
parameters:
- name: orderId
in: path
description: order Id
required: true
schema:
type: string
requestBody:
description: Order Info and its deliveries
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPartialUpdate'
responses:
'200':
description: Success. The order and deliveries have been updated
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreated'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
/order/create:
x-exegesis-controller: Order
post:
tags:
- Order
summary: Create an order with deliveries
operationId: create
security:
- ApiKey: []
- OAuth: []
- AppId: []
requestBody:
description: "Order Info and its deliveries\n<br>\nto get accessorials you should pass it in:\n<br>\n deliveries -> dropOffData -> capabilityTags or deliveries -> pickUpData -> capabilityTags\n<br>\nin request body as one of the these schemas:\n<br>\n1 => array of capabilityTags ids ['043e7f08-10f7-4c13-bfb1-76eaf96e4a24'];\n<br>\n2 => array of capabilityTags names ['Pup'];\n<br>\n3 => array of name and quantity object [{ name : 'Pup', quantity : 20 }];\n<br>\n4 => array of id and quantity object [{ id : '043e7f08-10f7-4c13-bfb1-76eaf96e4a24', quantity : 20 }]\n"
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreate'
responses:
'200':
description: Success. The order and deliveries have been created
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreated'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
/order/add-return:
x-exegesis-controller: Order
post:
tags:
- Order
summary: Add return delivery to order
operationId: addReturn
security:
- ApiKey: []
- OAuth: []
- AppId: []
requestBody:
description: Order Info and its deliveries
content:
application/json:
schema:
$ref: '#/components/schemas/ReturnDeliveryCreate'
responses:
'200':
description: Success. The return deliveries have been created
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DeliveryCreated'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
/order/add-delivery:
x-exegesis-controller: Order
post:
tags:
- Order
summary: Create an order with deliveries
operationId: addDelivery
security:
- ApiKey: []
- OAuth: []
- AppId: []
requestBody:
description: Success. The deliveries have been created
content:
application/json:
schema:
$ref: '#/components/schemas/OrderUpdate'
responses:
'200':
description: Success. The return deliveries have been created
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DeliveryCreated'
'422':
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
servers:
- url: https://onerail-delivery-api-prod.azurewebsites.net
description: Base URL declared by the provider in apis.yml (roadmap#122).
/v1/order/optimize/{organizationId}:
parameters:
- name: organizationId
in: path
required: true
schema:
type: string
format: uuid
post:
x-exegesis-controller: Order
summary: Optimize system orders
operationId: optimize
requestBody:
description: Route Optimizes orders
content:
application/json:
schema:
type: object
properties:
orderIds:
description: Array of order Ids
type: array
items:
type: string
format: uuid
vehicleId:
description: Optional vehicle id to force all orders inside
type:
- string
- 'null'
format: uuid
tags:
- Order
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
ordersThatFit:
type: array
items:
type: string
format: uuid
ordersExceedingWeightCapacity:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
orderId:
type: string
description: External order ID
netAmountCent:
type: number
description: Net Amount, in cents
barCode:
type: string
orderSourceInfo:
$ref: '#/paths/~1v1~1order~1%7BorderId%7D/get/responses/200/content/application~1json/schema/properties/orderSourceInfo'
orderItems:
type: array
items:
$ref: '#/paths/~1v1~1order~1%7BorderId%7D/get/responses/200/content/application~1json/schema/properties/orderItems/items'
status:
type: string
ordersExceedingDimensionCapacity:
type: array
items:
$ref: '#/paths/~1v1~1order~1optimize~1%7BorganizationId%7D/post/responses/200/content/application~1json/schema/properties/ordersExceedingWeightCapacity/items'
errors:
type: array
items:
type: string
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
security:
- bearer: []
servers:
- url: /
description: Default relative server URL
/v1/order/optimize/{organizationId}/with-multiple-locations:
parameters:
- name: organizationId
in: path
required: true
schema:
type: string
format: uuid
post:
x-exegesis-controller: OrderOptimizer
summary: Optimize system orders with multiple locations
operationId: optimizeOrdersWithMultipleLocations
requestBody:
description: Route Optimizes orders
content:
application/json:
schema:
type: object
properties:
orderIds:
description: Array of order Ids
type: array
items:
type: string
format: uuid
vehicleId:
description: vehicle id to force all orders inside
type: string
format: uuid
startingLocationId:
description: location id where vehicle will start
type: string
format: uuid
skipVehicleChecks:
description: Optional flag to force all orders inside the given vehicle
type:
- boolean
- 'null'
tags:
- Order
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
ordersThatFit:
type: array
items:
type: string
format: uuid
ordersExceedingWeightCapacity:
type: array
items:
$ref: '#/paths/~1v1~1order~1optimize~1%7BorganizationId%7D/post/responses/200/content/application~1json/schema/properties/ordersExceedingWeightCapacity/items'
ordersExceedingDimensionCapacity:
type: array
items:
$ref: '#/paths/~1v1~1order~1optimize~1%7BorganizationId%7D/post/responses/200/content/application~1json/schema/properties/ordersExceedingWeightCapacity/items'
errors:
type: array
items:
type: string
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
security:
- bearer: []
servers:
- url: /
description: Default relative server URL
/v1/order/control-tower:
get:
x-exegesis-controller: Order
summary: Optimize system orders
operationId: controlTower
parameters:
- name: shipperIds
in: query
description: shipperIds to filter down to.
schema:
type: array
items:
type: string
- name: locationIds
in: query
description: locationIds to filter down to.
schema:
type: array
items:
type: string
- name: includeExternal
in: query
description: whether or not to include external routes
schema:
type: boolean
default: false
tags:
- Order
responses:
'200':
description: Success
content:
application/json:
schema:
anyOf:
- type: array
items:
type: object
description: LP Markets/Locations
properties:
id:
type: string
name:
type: string
pickUpLocation:
type: object
description: Pick up Location associated with this lp market
properties:
id:
type: string
name:
type: string
location:
type: object
address:
type: object
ownFleetVehicles:
type: array
items:
type: object
description: OwnFleetVehicles
properties:
id:
type: string
name:
type: string
currentRoute:
type: object
description: Route of this vehicle
properties:
id:
type: string
orgSourcedIdentifier:
type: string
description: Organization Route ID
createdAt:
type: string
updatedAt:
type: string
calculatedShipperCostCent:
type: number
status:
type: string
totalMilesEstimate:
type: number
totalDurationSecondsEstimate:
type: number
plannedStartAt:
type:
- string
- 'null'
format: date-time
pathCoordinates:
type: array
items:
type: array
items:
type: array
items:
type: number
routeStops:
type: array
items:
type: object
description: Route Stop
properties:
id:
type: string
eta:
type: string
description: ETA of the route stop
computedLegDistanceMile:
type: number
description: Distance of the route stop
computedLegDurationSeconds:
type: number
description: Duration of the route stop
delivery:
type: object
description: Delivery object
properties:
id:
type: string
to:
type: object
description: Location object
order:
type: object
description: Order of delivery
properties:
orderItems:
description: List of items for the order
type: array
items:
type: object
required:
- quantity
properties:
description:
type:
- string
- 'null'
identifier:
type:
- string
- 'null'
priceCent:
description: Price in cents
type:
- number
- 'null'
lengthIn:
description: item length in inches. Smallest value is an inch. Float values are rounded up
type:
- number
- 'null'
widthIn:
description: item width in inches. Smallest value is an inch. Float values are rounded up
type:
- number
- 'null'
heightIn:
description: item height in inches. Smallest value is an inch. Float values are rounded up
type:
- number
- 'null'
weightLbs:
description: Item weight in pounds. Float values are rounded up
type:
- number
- 'null'
quantity:
description: How many of this item
type: integer
default: 1
sortOrdinal:
type:
- integer
- 'null'
nmfc:
type:
- string
- 'null'
description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery.
example: 82790-11
hsCode:
type:
- string
- 'null'
description: HS Code (Harmonized System Code) is an internationally standardized system of names and numbers to classify traded products. Needs to be provided by the shipper and is used for customs clearance of international deliveries.
countryOfManufacture:
type:
- string
- 'null'
description: The country code where the item was manufactured
example: US
freightClass:
type:
- string
- 'null'
enum:
- '50'
- '55'
- '60'
- '65'
- '70'
- '77.5'
- '85'
- '92.5'
- '100'
- '110'
- '125'
- '150'
- '175'
- '200'
- '250'
- '300'
- '400'
- '500'
- ''
- null
description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery.
doNotRotate:
type: boolean
doNotStack:
type: boolean
hazardousMaterialDetails:
type:
- object
- 'null'
properties:
identificationNumber:
type:
- string
- 'null'
properShippingName:
type:
- string
- 'null'
packagingGroup:
type:
- string
- 'null'
hazardClass:
type:
- string
- 'null'
hazardSubClass:
type:
- string
- 'null'
technicalName:
type:
- string
- 'null'
packagingType:
type:
- string
- 'null'
dotLabeling:
type:
- string
- 'null'
fedExPackagingType:
type:
- string
- 'null'
weightLbs:
type: number
description: the combined weight of all orderitems for the current routestop on the current route
routeInfo:
type: object
description: Route information of this vehicle
properties:
vehicleId:
type: string
deliveryIds:
type: array
items:
type: string
description: id of delivery in route
itemCount:
type: string
description: number of total items for this route delivery
weightLbs:
type: number
description: the combined weight of all orderitems for all routestops on the current route
external:
type: boolean
description: if the route is external or internal
- type: array
items:
type: object
description: LP Markets/Locations
properties:
ownFleetVehicles:
type: array
items:
type: object
description: OwnFleetVehicles
properties:
name:
type: string
currentRoute:
type: object
description: Route of this vehicle
properties:
id:
type: string
status:
type: string
totalMilesEstimate:
type: number
totalDurationSecondsEstimate:
type: number
orgSourcedIdentifier:
type: string
description: Organization Route ID
createdAt:
type: string
updatedAt:
type: string
# --- truncated at 32 KB (198 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onerail/refs/heads/main/openapi/onerail-order-api-openapi.yml