Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
version: 0.0.3
title: OneRail Delivery Cloud - Delivery Documents API
description: Allows authorized 3rd parties to request new deliveries through the OneRail network
license:
name: UNLICENSED
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.
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'
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