Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.skynetparts.com/llms.txt

Use this file to discover all available pages before exploring further.

Send a list of parts and quantities along with your PO number. The response confirms the order, your real B2B prices, and the total.
POST https://api.skynetparts.com/api/b2b/orders
Requires an API key. See Authentication for how to get one.
Always send a unique Idempotency-Key header. Without one, a network retry could create a duplicate order.

Headers

HeaderRequiredValue
AuthorizationYesBearer sk_live_...
Content-TypeYesapplication/json
Idempotency-KeyYesA unique string per order.

About Idempotency-Key

A unique string you make up for each order anything you want, like your PO number plus today’s date. If your network drops and you retry the same request with the same Idempotency-Key, we return the original order instead of creating a duplicate. Always send one.

Body

items
object[]
required
The parts to order. At least one entry.
items[].part_id
string
required
From the Look Up Parts response.
items[].quantity
integer
required
Positive integer.
po_number
string
required
Your internal purchase order number.
notes
string
Free-text note that appears on the order paperwork.
curl -X POST https://api.skynetparts.com/api/b2b/orders \
  -H "Authorization: Bearer $SKYNET_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ACME-PO-4471-2026-06-03" \
  -d '{
    "items": [
      { "part_id": "skynet_part_BWxLDSfV6dFV5o40VwVTV0arE-5dVB7VE22Jd1bb40zYqKv2eI7lRPsBJGk0JleZRO1NI5VQz6qe7KifEy24PQGAL0bZbcE", "quantity": 10 }
    ],
    "po_number": "ACME-PO-4471",
    "notes": "Deliver to Hangar B"
  }'
{
  "success": true,
  "order": {
    "order_id": "skynet_order_8f2a1c",
    "status": "draft",
    "po_number": "ACME-PO-4471",
    "line_items": [
      {
        "part_number": "MS21042L3",
        "title": "Self-Locking Nut, MS21042L3",
        "quantity": 10,
        "unit_price": { "amount": "11.16", "currency": "USD" },
        "line_total": { "amount": "111.60", "currency": "USD" }
      }
    ],
    "subtotal": { "amount": "111.60", "currency": "USD" },
    "created_at": "2026-06-03T14:30:00Z"
  }
}

Response fields

success
boolean
true when the order is created.
order.order_id
string
An opaque order ID. Use this when contacting support about an order.
order.status
string
Always draft when an order is first created. Your Skynet account manager confirms the order before it ships. You can sign in to your Skynet B2B account to see all draft orders.
order.po_number
string
Your internal PO number, echoed back from the request.
order.line_items
object[]
One entry per item you ordered. Note: line_items do not include the part_id from your request once an order is placed, you reference it by order_id and po_number, not by individual part.
order.line_items[].part_number
string
The manufacturer part number for this line.
order.line_items[].title
string
Human-readable name for the part.
order.line_items[].quantity
integer
Units ordered on this line.
order.line_items[].unit_price
object
The price you actually pay per unit. This is your B2B price for this part may be lower than the catalog price shown when you looked up the part. Contains amount and currency.
order.line_items[].line_total
object
unit_price × quantity for this line. Contains amount and currency.
order.subtotal
object
The sum of all line_total values. Final invoice may include tax, shipping, and other adjustments depending on your account terms.
order.created_at
string
ISO 8601 UTC timestamp.

Errors

These codes apply to this endpoint:
CodeHTTPMeaning
VALIDATION_FAILED400Body is missing a field or has the wrong type.
INVALID_PART_TOKEN400A part_id you sent isn’t recognized. Look up the part again.
INVALID_API_KEY401Your API key is missing, malformed, or wrong.
KEY_REVOKED401The key was revoked. Email api@skynetparts.com for a replacement.
INSUFFICIENT_INVENTORY409One or more items don’t have enough stock. Response lists which.
IDEMPOTENCY_CONFLICT409You sent an Idempotency-Key we’ve already seen, but with a different order body.
ORDER_FAILED502Order placement failed on our end. Your order was not placed. Safe to retry.
See Error codes for the full list and response shape.