JBI API — Inventory Availability (v3)

Endpoint: POST /customer/v3/inventory/{accountId}
Base URL: https://api.jbi.bike
Version: v3
Content-Type: application/json


Overview

This endpoint returns current on-hand inventory quantities for one or more JBI part numbers. Results are broken down by warehouse location so you can determine stock availability across the distribution network before placing an order.


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/inventory/10042

Request Body

The body must be a JSON array of part number strings. You may request up to as many part numbers as needed in a single call.

["6451", "49525", "50700"]

Request Fields

Field Type Required Description
(array item) string Yes A JBI part number to look up. Each entry must be a non-empty string.

Responses

Success (HTTP 200)

Returns an array with one entry per requested part number. Part numbers with no stock on hand are included with an empty locations array — they are never silently omitted.

{
  "success": true,
  "data": [
    {
      "partNumber": "6451",
      "locations": [
        { "name": "FL", "quantity": 81  },
        { "name": "NC", "quantity": 7   },
        { "name": "NY", "quantity": 18  },
        { "name": "AL", "quantity": 0   },
        { "name": "IN", "quantity": 15  },
        { "name": "PA", "quantity": 120 },
        { "name": "MN", "quantity": 0   },
        { "name": "TX", "quantity": 7   },
        { "name": "CO", "quantity": 9   },
        { "name": "WA", "quantity": 2   },
        { "name": "CA", "quantity": 14  }
      ]
    },
    {
      "partNumber": "49525",
      "locations": [
        { "name": "FL", "quantity": 759  },
        { "name": "NC", "quantity": 218  },
        { "name": "NY", "quantity": 363  },
        { "name": "AL", "quantity": 135  },
        { "name": "IN", "quantity": 3048 },
        { "name": "PA", "quantity": 759  },
        { "name": "MN", "quantity": 0    },
        { "name": "TX", "quantity": 166  },
        { "name": "CO", "quantity": 0    },
        { "name": "WA", "quantity": 55   },
        { "name": "CA", "quantity": 753  }
      ]
    }
  ]
}

Response Fields

Top-level

Field Type Description
success boolean true on a successful response.
data array Array of inventory result objects (see below).

Inventory Result Object

Field Type Description
partNumber string The part number you requested.
locations array One entry for every JBI warehouse location (always 11 entries). Ordered by location ID ascending.

Location Object

Field Type Description
name string Two-letter state abbreviation for the warehouse location (e.g. "FL").
quantity integer Quantity on hand at this location.

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 of part numbers 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 Cause
VALIDATION_FAILED Each part number must be a non-empty string One or more entries in the array is empty or not a string.

When validation fails the response includes a fields object identifying the offending index:

{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Each part number must be a non-empty string",
    "fields": {
      "[2]": "required|string"
    }
  }
}

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.

Notes

  • Part numbers are case-sensitive — submit them exactly as provided in the JBI product catalog.
  • Every response always includes all 11 warehouse locations for each part number. Locations with no stock show quantity: 0 rather than being omitted.
  • Quantities reflect current warehouse on-hand totals and do not account for pending orders or reservations.

Quick Reference

POST /customer/v3/inventory/{accountId} HTTP/1.1
Host: api.jbi.bike
Token-key: your-api-token-here
Content-Type: application/json

["6451", "49525", "50700"]

Document version: 1.0 — 2026-05-12
For questions or to request API access, contact JBI.