OneRail Documents API
The Documents API from OneRail — 1 operation(s) for documents.
The Documents API from OneRail — 1 operation(s) for documents.
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-documents-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 Documents API
version: 0.0.3
license:
name: UNLICENSED
description: 'Operations tagged Documents across 2 of this provider''s published API definitions: onerail-delivery-api-openapi.yml, onerail-documents-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).
security:
- ApiKey: []
AppId: []
tags:
- name: Documents
paths:
/delivery/{id}/documents:
x-exegesis-controller: Documents
get:
tags:
- Documents
summary: Retrieve all documents associated with a specific delivery. This includes a variety of documents required for the shipment process, such as shipping labels, hazard labels, Bills of Lading (BOL), invoices, and additional delivery receipts.
operationId: getDocuments
description: Fetches all documents linked to a given delivery or order ID. These documents may include mandatory shipment documentation, regulatory compliance forms, hazardous materials labels (if applicable), and other related paperwork essential for tracking and verification purposes. This endpoint supports authentication and requires a valid `deliveryId` or `orderId` parameter to identify the delivery in question.
security:
- ApiKeyAndAppId: []
- ApiKey: []
AppId: []
parameters:
- name: id
in: path
description: The unique identifier for the delivery, used to locate and retrieve its associated documents or order id .
required: true
schema:
type: string
- name: withBase64
in: query
description: Indicates whether the documents should be returned as base64-encoded strings.
required: false
schema:
type: boolean
default: false
- name: containerId
in: query
description: Optional shipper container ID to filter documents for a specific container within the delivery.
required: false
schema:
type: string
responses:
'200':
description: Successfully retrieved the documents associated with the specified delivery.
content:
application/json:
schema:
type: object
properties:
deliveryId:
type: string
description: The unique identifier for the delivery.
example: 0a5f3e5f-63bd-4472-9eee-a99f17cfeb44
orderId:
type: string
description: The unique shipper's identifier for the order associated with this delivery.
example: 999-637-9299
documents:
type: array
description: A list of documents associated with the delivery, providing important information like Bill of Lading (BOL), invoice, and any required compliance documents.
items:
type: object
properties:
fileType:
type: string
description: The type of document related to the delivery. Possible values include BOL, Invoice, Weight Inspection, Hazmat Document, and Delivery Receipt.
enum:
- BOL
- Invoice
- Weight Inspection
- Hazmat Document
- Delivery Receipt
example: BOL
subFileType:
type:
- string
- 'null'
description: A specific subtype of the document, if applicable. This helps the shipper understand the exact document they have received, such as OP950 for hazardous materials.
example: null
fileLink:
type: string
description: A URL link to access or download the document.
example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png
fileBase64:
type:
- string
- 'null'
description: The base64 encoded document, if applicable. Controlled by the withBase64 query parameter.
example: iVBORw0KGg
containers:
type: array
description: A list of containers or packages within the delivery. Each container includes information on shipping labels, container identifiers, and any hazardous material labeling.
items:
type: object
properties:
containerId:
type: string
description: The unique identifier for the container within the delivery.
example: 93ca6ee6-d4ef-4879-8b5e-bb85a7ae2da7
containerTrackingId:
type:
- string
- 'null'
description: The tracking ID for the container, if available.
example: '794810563883'
shipperContainerId:
type:
- string
- 'null'
description: The identifier for the container as assigned by the shipper.
example: '2222'
shippingLabelLink:
type:
- string
- 'null'
description: The shipping label for the container, if applicable.
example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png
hazmatLabelType:
type:
- string
- 'null'
description: The type or classification of the hazardous material label, if applicable.
example: OP900
hazmatLabelLink:
type:
- string
- 'null'
description: A URL link to the hazardous material label image or documentation, if applicable.
example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png
hazmatLabelBase64:
type:
- string
- 'null'
description: The base64 encoded hazardous material label, if applicable. Controlled by the withBase64 query parameter.
example: iVBORw0KGg...
shippingLabelBase64:
type:
- string
- 'null'
description: The base64 encoded shipping label, if applicable. Controlled by the withBase64 query parameter.
example: iVBORw0KGg...
'404':
description: Resource not found
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).
components:
schemas:
Error:
required:
- message
properties:
code:
type: integer
format: int32
message:
type: string
errors:
type: object
errorDetails:
type: array
items:
type: object
properties:
detail:
type: string
description: A human-readable explanation specific to this occurrence of the problem
pointer:
type: string
description: A JSON Pointer [RFC6901] to the associated entity in the request document
required:
- detail
securitySchemes:
ApiKey:
type: apiKey
in: header
name: X-ONERAIL-API-KEY
AppId:
type: apiKey
in: header
name: X-ONERAIL-APP-ID
ApiKeyAndAppId:
type: apiKey
in: header
name: X-ONERAIL-API-KEY-AND-APP-ID
x-refined-from:
- onerail-delivery-api-openapi.yml
- onerail-documents-api-openapi.yml