JBI API — Customer Order Submission (v3)
Endpoint: POST /customer/v3/ordering/{accountId}
Base URL: https://api.jbi.bike
Version: v3
Content-Type: application/json
Overview
This endpoint allows authorized customers to submit an order into the JBI fulfillment system. The order is validated, priced, and inserted immediately upon receipt. A successful response confirms that the order has been accepted.
Authentication
Every request must include your API token in the request header.
Token-key: your-api-token-here
Your accountId and Token-key are provided by JBI. The token is validated per account — using a token that does not match the accountId in the URL will result in a 401 response.
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId |
integer | Yes | Your JBI customer account number |
Example URL:
POST https://api.jbi.bike/customer/v3/ordering/10042
Request Body
The body must be a JSON array containing a single order object.
Minimal Example (Standard Ship-To Order)
[
{
"CustomerOrderNo": "ORD-2025-001",
"AccountNumber": "10042",
"ShipToID": "10042",
"LineItems": [
{ "PartNumber": "6451", "Qty": 2, "LocID": 1 },
{ "PartNumber": "49525", "Qty": 5, "LocID": 1 }
]
}
]
Full Example (Dropship Order with Optional Fields)
[
{
"CustomerOrderNo": "ORD-2025-002",
"PONumber": "98765",
"AccountNumber": "10042",
"ShipToID": "10042",
"ShipDropship": "Y",
"Comment": "",
"CarrierID": 100011,
"DropshipBilling": "PREPAID",
"Residential": "Y",
"ShipDateRequest": "",
"EmailAddress": "customer@example.com",
"DeliveryAddress": {
"RecipientName": "Jane Smith",
"Street1": "456 Oak Avenue",
"Street2": "Apt 3B",
"City": "Portland",
"State": "OR",
"Zip": "97201",
"Phone": "503-555-9876"
},
"LineItems": [
{
"PartNumber": "6451",
"Qty": 1,
"LocID": 101
}
]
}
]
Request Fields
Order Object
| Field | Type | Required | Description |
|---|---|---|---|
CustomerOrderNo |
string | Yes | Your unique reference number for this order. Must not duplicate a previously submitted order. Combined with AccountNumber to form a unique order name in the system. |
AccountNumber |
string | Yes | Your JBI account number (numeric). Must match the accountId in the URL. |
ShipToID |
string | Yes | Your ship-to location ID as registered in the JBI system. Must be active (not suspended). |
LineItems |
array | Yes | One or more items to order. See LineItems below. |
PONumber |
string | No | Your internal purchase order number. Stored with the order for reference. |
ShipDropship |
string | No | "Y" to ship directly to a delivery address instead of your registered ship-to. Requires a valid DeliveryAddress. Default: "N". |
Comment |
string | No | Order-level notes or special instructions. |
CarrierID |
integer | No | Numeric carrier code. If omitted, the default carrier registered to your ship-to is used. See Carrier Codes. |
DropshipBilling |
string | No | Shipping billing type: "PREPAID", "COLLECT", or "LABEL". Requires account-level feature flags and a compatible carrier. See Dropship Billing. |
Residential |
string | No | "Y" if shipping to a residential address. Affects carrier rating. Default: "N". |
ShipDateRequest |
string | No | Requested ship date. Any standard date format is accepted (e.g. "2025-09-15"). Stored as YYYY-MM-DD. |
EmailAddress |
string | No | Contact email for this order. Overrides the email address on file for your account. Do not include a consumer email address on dropship orders. |
AutoSplit |
string | No | "Y" to allow the system to automatically split line items across warehouse locations based on availability and destination ZIP. Uses DeliveryAddress.Zip for routing. If the split cannot cover the full quantity requested, the order is held rather than submitted — see code 21. Default: "N". |
SingleLocation |
string | No | Applies only when AutoSplit is "Y". "Y" to prefer fulfilling entirely from one warehouse. This is a preference, not a requirement — if it cannot be honored the order is still submitted and ships from multiple locations, returning code 10. Default: "N". |
DeliveryAddress |
object | Conditional | Required when ShipDropship is "Y". See DeliveryAddress below. |
LineItems
Each element in the LineItems array represents a single order line.
| Field | Type | Required | Description |
|---|---|---|---|
PartNumber |
string | Yes | JBI part number. |
Qty |
integer | Yes | Quantity to order. Must be 1 or greater. |
LocID |
integer | Yes | Warehouse/ship-from location ID. Must be a valid active location in the JBI system. Ignored when AutoSplit is "Y" or when ShipDropship is "Y" and a State is provided. |
DeliveryAddress
Required when ShipDropship is "Y".
| Field | Type | Required | Description |
|---|---|---|---|
RecipientName |
string | Yes | Name of the person or company receiving the shipment. |
Street1 |
string | Yes | Primary street address. |
Street2 |
string | No | Secondary address line (suite, unit, etc.). |
City |
string | Yes | City name. |
State |
string | Yes | 2-letter US state abbreviation (e.g. "OR"). |
Zip |
string | Yes | ZIP or postal code. Used for carrier routing and auto-split logic. |
Phone |
string | No | Contact phone number at the delivery address. |
Carrier Codes
PREPAID — Charges included on your invoice
| CarrierID | Description |
|---|---|
101325 |
USPS First Class Mail (up to 13 oz) |
101326 |
USPS Priority Mail |
123242 |
USPS Ground Advantage |
100010 |
UPS Ground Commercial |
100011 |
UPS Ground Residential |
100005 |
UPS Next Day Air |
100018 |
UPS Next Day Air Saver |
100007 |
UPS 2nd Day Air |
100009 |
UPS 3 Day |
COLLECT — Billed to your carrier account
Account must be pre-authorized and your collect account number must be on file with JBI.
| CarrierID | Description |
|---|---|
100004 |
UPS Ground Collect |
120191 |
UPS Next Day Air Saver Collect |
120192 |
UPS 2nd Day Air Collect |
120193 |
UPS 3 Day Collect |
101229 |
FedEx Ground Collect |
119391 |
FedEx Home Delivery Collect |
LABEL — Your own prepaid shipping label
| CarrierID | Description |
|---|---|
116324 |
UPS Shipping Label |
120668 |
UPS Air Shipping Label |
119211 |
FedEx Shipping Label |
120669 |
FedEx Air Shipping Label |
119212 |
USPS Shipping Label |
Warehouse Location IDs
Use these values for the LocID field on each line item. When AutoSplit is "Y", the system selects the location automatically and LocID is ignored.
| LocID | Physical Location |
|---|---|
101 |
Florida |
102 |
North Carolina |
103 |
New York |
104 |
Alabama |
105 |
Indiana |
106 |
Pennsylvania |
107 |
Minnesota |
108 |
Texas |
109 |
Colorado |
110 |
Washington |
112 |
California |
Dropship Billing
The DropshipBilling field controls how shipping charges are billed:
| Value | Description |
|---|---|
PREPAID |
JBI bills shipping to your account (standard). No special account flag required. |
COLLECT |
Shipping billed to your carrier account. Requires the Collect Shipping feature to be enabled on your account and a compatible carrier code. |
LABEL |
You supply your own shipping label. Requires the Shipping Label feature to be enabled on your account and a compatible carrier code. |
Contact JBI to have COLLECT or LABEL billing enabled for your account.
LABEL Shipping Requirements
Using your own shipping label requires a one-time setup with JBI before your first order:
- Submit a sample label in advance for approval and additional setup by JBI.
- File format: PDF only.
- Label dimensions: 4×6 inches. Labels formatted as 8×11 (even with a 4×6 label in a corner of the page) are not accepted — JBI's shipping system exclusively supports 4×6.
- File naming:
{AccountNumber}-{CustomerOrderNo}.pdf- Example: account
1353, orderORD1001→1353-ORD1001.pdf
- Example: account
- Upload: Once your account is approved, a
ship_labelfolder will be created in your FTP directory. Upload your label file there before the order is processed.
Responses
Success (HTTP 201)
{
"success": true,
"data": {
"orderId": 84210,
"customerOrderNo": "ORD-2025-001",
"status": "submitted",
"message": "Order successfully created"
}
}
| Field | Type | Description |
|---|---|---|
orderId |
integer | JBI's internal order ID assigned to this order. |
customerOrderNo |
string | The CustomerOrderNo you provided, echoed back for confirmation. |
status |
string | "submitted" — order accepted and queued for fulfillment. "pending" — order was created but not submitted; it is waiting in your open orders on jbi.bike. See Status Codes. |
code |
string | Optional. Present only when the order needs your attention or did not process exactly as requested. Absent on a clean submission. See Status Codes. |
message |
string | Human-readable confirmation, or an explanation of code when one is present. |
Note that all of these are success responses: success is true and the HTTP status is 201 in every case below, including "pending". The order always exists in JBI's system once you receive a 201 — status tells you whether it was also submitted for fulfillment.
Status Codes
The code field appears only when the outcome differs from a straightforward submission. When code is absent and status is "submitted", the order was accepted exactly as requested and no action is needed.
| Code | status |
Meaning | Action required |
|---|---|---|---|
| (none) | submitted |
Order accepted and queued for fulfillment. | None. |
10 |
submitted |
You sent SingleLocation: "Y", but the items were not all available from one warehouse. The order was submitted and will ship from more than one location. |
None — informational only. SingleLocation is a preference, not a requirement. Expect multiple shipments. |
21 |
pending |
One or more items could not be filled in full from available inventory. The order was not submitted and is sitting open on jbi.bike. | Log in to jbi.bike, review the short-filled lines, then submit or amend the order. |
| (none) | pending |
Your account is not configured for automatic order processing, so orders are always held for manual review. | None if expected. Contact JBI if you believe auto-processing should be enabled. |
Codes 10 and 21 are produced by the auto-split routing engine and therefore only occur when you send AutoSplit: "Y". Orders sent with AutoSplit set to "N" or omitted are routed using the LocID you supply on each line and never return either code.
If you poll or reconcile orders programmatically, treat any "pending" status as not yet in fulfillment — a 21 in particular will stay open indefinitely until someone acts on it.
Example — order held for short inventory (21)
{
"success": true,
"data": {
"orderId": 84211,
"customerOrderNo": "ORD-2025-002",
"status": "pending",
"code": "21",
"message": "Order not auto-submitted. One or more items could not be filled in full from available inventory. Login to jbi.bike to review and submit."
}
}
Example — submitted, split across locations (10)
{
"success": true,
"data": {
"orderId": 84212,
"customerOrderNo": "ORD-2025-003",
"status": "submitted",
"code": "10",
"message": "You requested shipment from a single location but it was not possible. Order will be sent in multiple shipments."
}
}
Error Responses
All errors follow the same envelope structure:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
}
}
HTTP 400 — Bad Request
| Code | Message | Cause |
|---|---|---|
INVALID_ACCOUNT |
Account ID must be a positive integer | The {accountId} in the URL is not a valid integer. |
INVALID_BODY |
Request body must be a valid JSON array | Body is empty, not valid JSON, or not a JSON array. |
HTTP 401 — Unauthorized
| Code | Message | Cause |
|---|---|---|
MISSING_TOKEN |
Token-key header is required | The Token-key header was not included in the request. |
INVALID_TOKEN |
Authentication failed | The token does not match the one on file for this account. |
HTTP 405 — Method Not Allowed
| Code | Message | Cause |
|---|---|---|
METHOD_NOT_ALLOWED |
Only POST requests are accepted | A non-POST method was used. |
HTTP 422 — Unprocessable Entity
| Code | Message (example) | Cause |
|---|---|---|
VALIDATION_FAILED |
Request validation failed | One or more required fields are missing or invalid. See fields object for details. |
DUPLICATE_ORDER |
Duplicate order numbers are not allowed | A CustomerOrderNo + AccountNumber combination already exists in the system. |
INVALID_SHIP_TO |
Ship To ID is incorrect or currently suspended | The ShipToID does not exist or has been suspended for this account. |
FEATURE_NOT_ALLOWED |
Either the carrier code supplied is wrong or your account is not setup to ship collect | DropshipBilling of COLLECT or LABEL is not enabled for your account, or the carrier code is incompatible. |
INVALID_LOCATION |
The LocID supplied for the following item(s) does not exist: … | One or more LocID values are not valid warehouse location IDs. |
DISCONTINUED_ITEM |
One or more items are discontinued or do not exist: … | One or more PartNumber values are discontinued or not found in the system. |
INCOMPLETE_ADDRESS |
Drop Ship Delivery Address is not complete | ShipDropship is "Y" but DeliveryAddress is missing required fields. |
ACCOUNT_NOT_FOUND |
Customer account information could not be found | Account or ship-to lookup returned no results — contact JBI support. |
ORDER_INSERT_FAILED |
An error occurred during order insertion | A database-level error occurred. Verify your data and retry. Contact JBI if it persists. |
HTTP 500 — Server Error
| Code | Message | Cause |
|---|---|---|
SERVER_ERROR |
An unexpected error occurred | An unhandled server-side exception. Contact JBI support with the request timestamp. |
Validation Error Detail (VALIDATION_FAILED)
When validation fails, the response includes a fields object identifying each invalid field:
{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "Request validation failed",
"fields": {
"CustomerOrderNo": "required",
"LineItems.0.Qty": "required|numeric|min:1"
}
}
}
Order Uniqueness
Every order submitted to the API must have a unique combination of CustomerOrderNo + AccountNumber. The system stores the order under the internal name JBI-{CustomerOrderNo}-{AccountNumber}. Resubmitting the same combination will be rejected with DUPLICATE_ORDER.
Quick Reference
POST /customer/v3/ordering/{accountId} HTTP/1.1
Host: api.jbi.bike
Token-key: your-api-token-here
Content-Type: application/json
[
{
"CustomerOrderNo": "ORD-2025-001",
"AccountNumber": "10042",
"ShipToID": "SHP-001",
"LineItems": [
{ "PartNumber": "6451", "Qty": 2, "LocID": 101 }
]
}
]
Document version: 1.1 — 2026-08-27
For questions or to request feature access (Collect/Label billing), contact JBI.