Skip to main content

The Vendor API (Published Language)

As built

Contract: apis/openapi.yaml of vendor-connectivity (copied here as network/apis/vendor-connectivity/openapi.yaml), rendered under API Reference. Owner: vendor-connectivity. The protocol keeps the shape of a direct-fulfillment vendor program (poll, acknowledge in full, label after acceptance, confirm shipment) in this network's own vocabulary, as the fleet's network-fulfillment ADR 0009 expects.

Routes​

RoutePurposeAnswer
POST /vendor/nodesregister a vendor node (vendorNodeCode, type, subtype, address)202 {transactionId}; the transaction result carries nodeId
GET /vendor/nodes/{nodeId}the node as the network sees it200
PUT /vendor/nodes/{nodeId}/profiledeclare the operational profile (revisioned)202 {transactionId}
GET /vendor/nodes/{nodeId}/scorecardthe node's measured scorecard and grade200
POST /vendor/inventoryavailability per listing, full or partial202 {transactionId}
GET /vendor/purchase-orders?vendorId=&createdAfter=&nodeId=&nextToken=&limit=poll purchase orders, paged200 {purchaseOrders, nextToken}
GET /vendor/purchase-orders/{poNumber}one purchase order200
POST /vendor/acknowledgementsaccept or reject a purchase order in full202 {transactionId}
POST /vendor/shipping-labelsa label per package of an accepted order200 {labelRef, trackingNumber, carrier}
POST /vendor/shipment-confirmationsconfirm shipment with the tracking numbers202 {transactionId}
GET /vendor/transactions/{transactionId}outcome of any write200 {status: PROCESSING or SUCCESS or FAILURE, errors}
GET /vendor/nodes?vendorId=the vendor's own nodes200
GET /vendor/inbound-shipments?vendorId=&createdAfter=&nodeId=&nextToken=&limit=poll the SHIPPED seller shipments bound for the vendor's nodes (carton manifest, seller of record as sellerId)200
GET /vendor/inbound-shipments/{shipmentId}one inbound shipment200
POST /vendor/inbound-receiptsa carton-level receipt for one inbound shipment202 {transactionId}

Account administration, outside the vendor's own protocol: POST /vendors (onboard), GET /vendors/{vendorId}, POST /vendors/{vendorId}/suspensions and POST /vendors/{vendorId}/reinstatements. The inbound routes are the seller-inbound delta (ADR 0009, vendor-connectivity ADR 0005). Every read takes vendorId as a query parameter: ownership is checked against it (a consistency check, gap G32).

Semantics a vendor must implement​

  1. A 202 is not a commitment. A write takes effect when its transaction is SUCCESS. Model "submitted, not reconciled" as its own state.
  2. Fill-or-kill. One decision for every line of a purchase order. A partial acknowledgement is refused (ErrPartialAcknowledgement).
  3. One answer, in time. Acknowledge once (ErrAlreadyAcknowledged) before ackBy (ErrAckWindowClosed); after ackBy the order is EXPIRED and goes to another node.
  4. Label after acceptance, confirmation after label (ErrLabelBeforeAcceptance, ErrConfirmWithoutLabel).
  5. Rate limits are contract. 429 with Retry-After; a vendor backs off and never drops the call.
  6. Redelivery happens. The same poNumber can appear on two polls; the vendor deduplicates.

Deliberately absent​

  • No ship-to address, name or phone, in any schema, in either direction.
  • No delivery promise. A purchase order carries requiredShipBy, not the customer's window.
  • No push to the vendor. Demand is polled; the network never calls the vendor.

Simulation knobs​

Because both sides are in one ecosystem, the network can misbehave on purpose so the vendor's crash-safety is testable: TX_PROCESSING_DELAY, TX_FAILURE_RATE, RATE_LIMIT_RPS, PO_REDELIVERY_RATE. All default to well-behaved; end-to-end scenarios set them per run.