Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.0.0
info:
title: BNSF Prices and Rates API
description: 'Freight pricing for BNSF carload and intermodal shipments: prices within a BNSF Price Authority, open invoices
by patron code, and rail-mile inquiry for BNSF local and Rule 11 shipments.'
termsOfService: http://www.bnsf.com/site-terms-of-use.html
contact:
name: BNSF Customer API
email: CustomerAPI@bnsf.com
version: '1.0'
servers:
- url: https://api.bnsf.com:6443
description: Production
- url: https://api-trial.bnsf.com:6443
description: Trial
paths:
/v1/carload-rates:
post:
tags:
- Prices and Rates
summary: Carload Rates - Returns a list of prices within a BNSF Carload Price Authority.
requestBody:
$ref: '#/components/requestBodies/Post_Rates'
responses:
'200':
description: '**OK**
The request has succeeded.'
content:
application/json:
schema:
$ref: '#/components/schemas/prices_response'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'429':
description: "**Too Many Requests**\n\nThe BNSF API Gateway enforces rate limits to maintain application security\
\ and performance. Current rate limits are set as follows:\n* 1 API Request Per Second, Per Partner, Per Service\n\
* 15 API Requests Per Minute, Per Partner, Per Service\n* 100 API Request Per Minute, Per Service\n \nWhen requests\
\ exceed these limits the API Gateway will return **429 Too Many Requests** error response to the Client. Upon\
\ receiving such exceptions, the client can resubmit failed requests in a rate-limited manner, complying with\
\ the API Gateway throttle limits.\n"
'500':
$ref: '#/components/responses/500'
'504':
$ref: '#/components/responses/504'
security:
- Restricted: []
operationId: postV1CarloadRates
/v1/intermodal-rates:
post:
tags:
- Prices and Rates
summary: Intermodal Rates - Returns a list of prices within a BNSF Intermodal Price Authority.
requestBody:
$ref: '#/components/requestBodies/Post_Rates'
responses:
'200':
description: '**OK**
The request has succeeded.'
content:
application/json:
schema:
$ref: '#/components/schemas/prices_response'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'429':
description: "**Too Many Requests**\n\nThe BNSF API Gateway enforces rate limits to maintain application security\
\ and performance. Current rate limits are set as follows:\n* 1 API Request Per Second, Per Partner, Per Service\n\
* 15 API Requests Per Minute, Per Partner, Per Service\n* 100 API Request Per Minute, Per Service\n \nWhen requests\
\ exceed these limits the API Gateway will return **429 Too Many Requests** error response to the Client. Upon\
\ receiving such exceptions, the client can resubmit failed requests in a rate-limited manner, complying with\
\ the API Gateway throttle limits.\n"
'500':
$ref: '#/components/responses/500'
'504':
$ref: '#/components/responses/504'
security:
- Restricted: []
operationId: postV1IntermodalRates
/v1/invoices:
post:
tags:
- Prices and Rates
summary: Retrieve Open Invoices - Returns details of customer's open invoices for given Patron code of customer. Up
to 5 Patron codes.
requestBody:
$ref: '#/components/requestBodies/Post_Invoice'
responses:
'200':
description: '**OK**
The request has succeeded.
**Note:** The response data is paginated, with 20 invoices displayed per page. You can find pagination details
at the bottom of the response.'
content:
application/json:
schema:
$ref: '#/components/schemas/customerInvoice'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'429':
description: "**Too Many Requests**\n\nThe BNSF API Gateway enforces rate limits to maintain application security\
\ and performance. Current rate limits are set as follows:\n* 1 API Request Per Second, Per Partner, Per Service\n\
* 15 API Requests Per Minute, Per Partner, Per Service\n* 100 API Request Per Minute, Per Service\n \nWhen requests\
\ exceed these limits the API Gateway will return **429 Too Many Requests** error response to the Client. Upon\
\ receiving such exceptions, the client can resubmit failed requests in a rate-limited manner, complying with\
\ the API Gateway throttle limits.\n"
'500':
$ref: '#/components/responses/500'
'504':
$ref: '#/components/responses/504'
security:
- Restricted: []
operationId: postV1Invoices
/v1/rail-miles:
post:
tags:
- Prices and Rates
summary: Rail Mile Inquiry API – Mileage – Returns mileage for BNSF local and/or rule 11 shipments, up to 1000 at a
time
requestBody:
$ref: '#/components/requestBodies/Post_oD_Pairs'
responses:
'200':
description: '**OK**
The request has succeeded.
'
content:
application/json:
schema:
$ref: '#/components/schemas/OD_Pairs_Response'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'429':
description: "**Too Many Requests**\n\nThe BNSF API Gateway enforces rate limits to maintain application security\
\ and performance. Current rate limits are set as follows:\n* 1 API Request Per Second, Per Partner, Per Service\n\
* 15 API Requests Per Minute, Per Partner, Per Service\n* 100 API Request Per Minute, Per Service\n \nWhen requests\
\ exceed these limits the API Gateway will return **429 Too Many Requests** error response to the Client. Upon\
\ receiving such exceptions, the client can resubmit failed requests in a rate-limited manner, complying with\
\ the API Gateway throttle limits.\n"
'500':
$ref: '#/components/responses/500'
'504':
$ref: '#/components/responses/504'
operationId: postV1RailMiles
components:
schemas:
Price_Authority:
type: object
properties:
priceAuthority:
type: object
required:
- priceAuthorityGroups
properties:
priceAuthorityOwnerIssuedName:
type: string
description: 'A name must be assigned by the Owner of a Price Authority which is combined with the Owner''s
ID, an Owner Issued Number, and an optional Owner Issued Item Number to help uniquely identify an official
document (Authority) containing price(s) for shipment(s). It may consist of any alpha numeric character string
excluding special characters, which may be a minimum of one character and a maximum of ten characters in length;
examples include: BNSF, BNSFQ, QTYELLOW, C, CIRC, NSPQ, MA42MW, etc.
'
example: BNSFQ (Carload) --OR-- QTTSSLC (Intermodal)
priceAuthorityNumber:
type: number
format: float
description: 'A number can be assigned by the Owner of a Price Authority such that it can be combined with the
Owner''s ID, an Owner Issued Name, and an optional Owner Issued Item Number to help uniquely identify an official
document (Authority) containing price(s) for shipment(s). If the Owner does not wish to create a specific
number, then the Owner must identify this number as 9999999999 (ten 9''s) to indicate there is no specific
Price Authority Owner Issued Number. The only characters allowed in the number are zero (0) through nine
(9) and one decimal point (if needed). The number must not exceed ten (10) characters in length; a decimal
point counts as a character. The number of positions to the right of the decimal point must not exceed four
(4) characters.
'
example: 105355
priceAuthorityItemNumber:
type: number
format: float
description: 'A number that Identifies an Owner Issued Item (or Implementing Agreement) which is used to identify
a more granular reference to a given price when combined with the Owner ID, Owner Issued Name, and Owner Issued
Number. Marketing sometimes divides a given Price Authority into what might be referred to as sub-authorities
which are identified by a given Owner Issued Item Number. The only characters allowed in the number are zero
(0) through nine (9) and one decimal point (if needed). The number must not exceed ten (10) characters in
length; a decimal point counts as a character. The number of positions to the right of the decimal point
must not exceed four (4) characters: eg, ''00123.4567'' would be valid. If a Price Authority does not actually
have a item number, then the item number will be set to '' '' (Blank).
'
example: 100
priceAuthorityRevisionNumber:
type: string
description: 'Identifies the Revision of a given Price Authority as it changes over time. When a Pricing Authority
is created, Marketing starts the revision numbering for it at 0 (zero), which indicates that the Pricing Authority
is brand new (the first initial creation of it). After the initial creation of the authority, the revision
number is incremented by one each time Marketing decides and makes a revision to the Pricing Authority which
is for external publication. This differs from a Pricing Authority internal only change where the Version
Number is incremented alone and the Revision Number remains the same. For example a PA currently set at Version
Number #10 and the Revision Number still set as #5 indicates there have been more internal changes than external
changes. Revision Numbers begin the series at #0 (zero).
'
example: '29'
priceAuthorityOwnerId:
type: string
description: 'A two to four character alpha abbreviation which identifies the Owner of a Price Authority. An
Owner ID is usually a SCAC (Standard Carrier Alpha Code) used to designate a transportation company. SCACs
are assigned by the National Motor Freight Traffic Association (NMFTA). Examples of a railroad SCAC include: BNSF,
NS, UP. Sometimes, however, the Owner ID might be an abbreviation for a Tarrif Bureau. Examples of a Tariff
Bureau include: WRTA = "Western Railroad Traffic Association", RPS = "Railroad Publishing Services".
'
example: BNSF
priceAuthorityVersionNumber:
type: number
format: float
description: 'Every time a Price Authority is to be changed by Marketing for Pricing, the Pricing Authority
Version Number is incremented by one, no matter whether it is an internal or external (reported to a customer)
change. This differs from a Pricing Authority external change where the Version Number is incremented as
well as the Revision Number. For example a PA can be set at Version Number 10 and the Revision Number may
not have changed from 5, because there have been more internal changes than external changes. Version Numbers
begin the series with a value of 1 (one).
'
example: 37
priceAuthorityVersionId:
type: number
format: float
description: "The identifier of the Price Authority Version table. \n"
example: 1411524
priceAuthorityFileId:
type: string
description: 'An identification of the internal identifier (alpha numeric) assigned to a Price Authority generated
from either the Legacy Rate Price Management System (RPMS) or from RAPID /Price Translator. This internal
identifier is a business term (Price Authority File ID) that is used and referenced by the Marketing Department
as well as other business areas.
'
example: 0212242279
priceAuthorityGeneralRuleSet:
type: string
description: 'Identifies the General Rules that apply to the Prices within the given Price Authority. '
example: Freight charges must be prepaid. Price applies in U.S. Funds. Price does not apply on shipments accorded
transit, inspection, sampling, reconsignment, diversion, or stopping in transit for loading or unloading.
prices:
type: array
description: Identifies an array of one or more rates within a given Price Authority.
items:
type: object
description: Identifies the price data elements that are common (are core) to most Price Authorities.
properties:
priceAuthorityPriceEffectiveDate:
type: string
format: date
description: 'Effective Date. (yyyy-mm-dd format)
'
example: '2019-09-01'
priceAuthorityPriceExpirationDate:
type: string
format: date
description: 'Expiration Date. (yyyy-mm-dd format)
'
example: '2020-08-31'
priceAuthorityPriceAmount:
type: string
description: 'Identifies the rate amount of a given Price Package qualified by the Rate Unit Calculation
Code (RT_UNT_CALCTN_CD) and Currency Type Code (CURR_TYP_CD) within that Price Package.
'
example: '913.0000'
unitOfMeasure:
type: string
description: 'indicate the unit of measure that the price can be applied. For example: PC - per car, PT
- Per net ton, etc...'
example: PC
priceAuthorityPriceUnitCalculationCode:
type: string
description: 'Identifies the rate unit calculation code for a Rate Amount (RT_AMT) within a given Price
Package qualified by the Currency Type Code (CURR_TYP_CD) within that Price Package.
'
example: IM
priceAuthorityPriceCurrencyTypeCode:
type: string
description: 'Identifies the currency type that is to be used. Valid values are: ''U'' United States;
''C'' = Canada, ''M'' = Mexico.
'
example: USD
minimumWeightQuantity:
type: string
description: "The Quantity of Weight (if present and not zero) that will be used as the Minimum Weight\
\ to rate a weight-based shipment if the actual lading weight is less than this minimum weight.\n\n\
For example, if the Minimum Weight Quantity is 50,000 (pounds) and the actual lading weight of the shipment\
\ is 20,000 (pounds), the shipment will be rated at the minimum 50,000.\n\nThis is used to protect that\
\ a customer does not load up a car with only 100 pounds of lading for a shipment from California to\
\ Illinois where the rate is $10.00 per hundred pounds.\n\nA minimum weight quantity of 50,000 pounds\
\ means that the customer must pay at least $5,000 for such a shipment. \n"
example: '5000'
minimumWeightQuantityUomCode:
type: string
description: 'Identifies what unit of measure that the Minimum Weight is expressed in, e.g., pounds ("LB"),
net tons ("PT"), etc. Example: if the Minimum Weight Quantity is 500, then this can be 500 pounds,
500 net tons, etc.'
example: LB
originGeographicTypeCode:
type: string
description: 'Identifies the type of geography (eg. city, state, zip code, etc.). Examples include:
''AC'' = OPSL Station Name (City), ''CO''= County, ''SP'' = States/Provinces, ''PQ'' = ZIP 3, ''PS''
= ZIP 5, ''FS'' = FREIGHT STATIONS, ''S2'' = two digit SPLC, ''S4'' = four digit SPLC, ''S6'' = six
digit SPLC. Canadian Postal Region Codes may be added in the future as ''PU''. ''OL'' = OPSL number
ranges may be added in the future.
'
example: AC
originStationName:
type: string
description: 'OPEN AND PREPAID STATION LIST NAME. OPEN AND PREPAID STATION LIST (OPSL) IS AN OFFICIAL
LIST OF ALL STATIONS IN THE UNITED STATES THAT ARE LEGAL AND OFFICIAL RAILROAD STATIONS THAT A SHIPMENT
MAY BE BILLED TO OR FROM. THIS LIST ALSO HAS SPECIAL INSTRUCTIONS THAT APPLY TO EACH STATION
'
example: CHICAGO
originStateCode:
type: string
description: 'The identifier of the State / Province. '
example: IL
originSwitchingLimitsUsedIndicator:
type: string
description: "Indicates \"T\" (True) or \"F\" (False) whether the price is valid also for all revenue\
\ stations within the Switching Limits of the Origin. This is based on the origin rail carrier in the\
\ revenue route and how that carrier defines what other stations (if any) are included within the switching\
\ limits of that origin station.\n\nFor example, BNSF says CICERO, IL (and some other Illinois stations)\
\ are within the Switching Limits of CHICAGO, IL, but CSXT says that CICERO, IL and HAMMOND, IN (different\
\ state) are within SWL of CHICAGO. \n"
minLength: 1
maxLength: 1
example: T
originGeographicGroupName:
type: string
description: 'Identifies a given short name for a specific geographic group within a given business group. The
members of geographic groups may be different between different business groups even though the group
name may be the same.
'
example: CHICAGO & LPC
originGeographicGroupNumber:
type: string
description: "A unique key that identifies a given geographic group that being used as origin in a service\
\ price package. \n \nThe members of geographic groups may be different between different business\
\ groups even though the group name may be the same\n"
example: '375200646'
destinationGeographicTypeCode:
type: string
description: 'Identifies the type of geography (eg. city, state, zip code, etc.). Examples include:
''AC'' = OPSL Station Name (City), ''CO''= County, ''SP'' = States/Provinces, ''PQ'' = ZIP 3, ''PS''
= ZIP 5, ''FS'' = FREIGHT STATIONS, ''S2'' = two digit SPLC, ''S4'' = four digit SPLC, ''S6'' = six
digit SPLC. Canadian Postal Region Codes may be added in the future as ''PU''. ''OL'' = OPSL number
ranges may be added in the future.
'
example: AC
destinationStationName:
type: string
description: 'OPEN AND PREPAID STATION LIST NAME. OPEN AND PREPAID STATION LIST (OPSL) IS AN OFFICIAL
LIST OF ALL STATIONS IN THE UNITED STATES THAT ARE LEGAL AND OFFICIAL RAILROAD STATIONS THAT A SHIPMENT
MAY BE BILLED TO OR FROM. THIS LIST ALSO HAS SPECIAL INSTRUCTIONS THAT APPLY TO EACH STATION
'
example: SEATTLE
destinationStateCode:
type: string
description: "The identifier of the State / Province. \n"
example: WA
destinationSwitchingLimitsUsedIndicator:
type: string
description: "Indicates \"T\" (True) or \"F\" (False) whether the price is valid also for all revenue\
\ stations within the Switching Limits of the Destination. This is based on the destination rail carrier\
\ in the revenue route and how that carrier defines what other stations (if any) are included within\
\ the switching limits of that destination station.\n\nFor example, BNSF says CICERO, IL (and some other\
\ Illinois stations) are within the Switching Limits of CHICAGO, IL, but CSXT says that CICERO, IL and\
\ HAMMOND, IN (different state) are within SWL of CHICAGO. \n"
minLength: 1
maxLength: 1
example: F
destinationGeographicGroupName:
type: string
description: 'Identifies a given short name for a specific geographic group within a given business group. The
members of geographic groups may be different between different business groups even though the group
name may be the same.
'
example: SEATTLE PORTS
destinationGeographicGroupNumber:
type: string
description: 'A unique key that identifies a given specific geographic group being used as destination
in a service price package. '
example: '216601236'
serviceCode:
type: string
description: The first column of the Shipment Condition Code is the 'V' field (Value field). This identifies
the Intermodal Service Code when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to ISCO.
example: '25'
bnsfServiceLevelCode:
type: string
description: The first column of the Shipment Condition Code is the 'V' field (Value field). This identifies
the BNSF Intermodal Service Level Code when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to
BN06.
example: P
priorOriginGeographicTypeCode:
type: string
description: 'The first column of the Shipment Condition Code is the ''V'' field (Value field). This identifies
the Prior Origin Geographic Type Code when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to
ACPO.
'
example: SL
priorOriginFirstQualifierName:
type: string
description: 'This is the second column of the Shipment Condition and is referred to as the ''F'' field
(Range From field). The ''F'' field might not be a range. This identifies the Prior Origin First Qualifier
Name when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to ACPO.
'
example: 093900
priorOriginSecondQualifierName:
type: string
description: 'This is the third column of the Shipment Condition and is referred to as the ''T'' field
(Range To field). The ''T'' field might not be a range. This identifies the Prior Origin Second Qualifier
Name when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to ACPO.
'
example: 093989
finalDestinationGeographicTypeCode:
type: string
description: 'The first column of the Shipment Condition Code is the ''V'' field (Value field). This identifies
the Final Destination Geographic Type Code when the Shipment Condition code (SHPMT_COND_ELE_CD) is
set to ACFD.
'
example: PS
finalDestinationFirstQualifierName:
type: string
description: 'This is the second column of the Shipment Condition and is referred to as the ''F'' field
(Range From field). The ''F'' field might not be a range. This identifies the Final Destination First
Qualifier Name when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to ACFD.
'
example: '66210'
finalDestinationSecondQualifierName:
type: string
description: 'This is the third column of the Shipment Condition and is referred to as the ''T'' field
(Range To field). The ''T'' field might not be a range. This identifies the Final Destination Second
Qualifier Name when the Shipment Condition code (SHPMT_COND_ELE_CD) is set to ACFD.
'
example: '66219'
servicePricePackageId:
type: number
format: float
description: 'The identifier of the Service Price Package table. This is a surrogate key identity column
of table TSVC_PRC_PKG.
'
example: 31608704
servicePackageCommodityLowStcc:
type: string
description: 'Identifies the low end STCC (Standard Transportation Commodity Code) code number within
a range, otherwise it identifies a non-range single STCC to be used.
'
example: '4611110'
servicePackageCommodityHighStcc:
type: string
description: 'Identifies the high end STCC (Standard Transportation Commodity Code) code number within
a range of STCC.
'
example: '4611127'
servicePackageLoadEmptyCode:
type: string
description: Code indicate whether the price can applied to Load or Empty intermodal move
example: E
commodityGroupShortName:
type: string
description: 'Identifies a given short name for a specific commodity group within a given business group. The
members of commodity groups may be different between different business groups even though the group
name may be the same.
'
example: EMPTY CONTAINER
commodityGroupLongName:
type: string
description: 'Identifies a given long name for a specific commodity group within a given business group. The
members of commodity groups may be different between different business groups even though the group
name may be the same.
'
example: EMPTY CONTAINER
commodityGroupNumber:
type: string
description: A unique key that identifies a specific commodity group used in a service price package of
a price authority.
example: '104093082'
revenueRouteDescription:
type: string
description: 'A description of the Route with the carrier abbreviations and the off-going junction abbreviations.
'
example: BNSF Direct
equipmentTypeDescription:
type: string
description: 'A description of the Equipment Type which may be a railcar or other intermodal type of transport
carried on rail.
'
example: BOXCAR (Carload) --OR-- CONTAINER (Intermodal)
equipmentOwnerTypeLabel:
type: string
description: 'A name or label given to describe whether the equipment owner is a Shipper or a Rail Carrier
or is unknown.
'
example: SHIPPER OWNED
equipmentUsageStatusCode:
type: string
description: 'Identifies if the equipment is empty or loaded and this applies mainly to Intermodal, so
Carload can be blank.
'
example: EMPTY
equipmentGroupShortDescription:
type: string
description: 'A short description of a given Shipment Contition Group as of a specified Version. This
identifies the Equipment when the Shipment Condition Group Version has a Group Type Code (SHPMT_COND_GRP_TYP_CD)
is set to "E".
'
example: 20CM
equipmentGroupShortName:
type: string
description: 'Identifies a given short name for a specific Shipment Condition group within a given business
group. The members of Shipment Condition groups may be different between different business groups
even though the group name may be the same. This identifies the Equipment when the Shipment Condition
Group Version has a Group Type Code (SHPMT_COND_GRP_TYP_CD) is set to "E".
'
example: 20CM-MAX. CONT. W/O CHASSIS
equipmentGroupLongName:
type: string
description: 'Identifies a given long name for a specific Shipment Condition group within a given business
group. The members of Shipment Condition groups may be different between different business groups
even though the group name may be the same. This identifies the Equipment when the Shipment Condition
Group Version has a Group Type Code (SHPMT_COND_GRP_TYP_CD) is set to "E".
'
example: 20 FOOT MA
# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bnsf/refs/heads/main/openapi/bnsf-prices-openapi.yml