The Vendor API (Published Language)
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
| Route | Purpose | Answer |
|---|---|---|
POST /vendor/nodes | register a vendor node (vendorNodeCode, type, subtype, address) | 202 {transactionId}; the transaction result carries nodeId |
GET /vendor/nodes/{nodeId} | the node as the network sees it | 200 |
PUT /vendor/nodes/{nodeId}/profile | declare the operational profile (revisioned) | 202 {transactionId} |
GET /vendor/nodes/{nodeId}/scorecard | the node's measured scorecard and grade | 200 |
POST /vendor/inventory | availability per listing, full or partial | 202 {transactionId} |
GET /vendor/purchase-orders?vendorId=&createdAfter=&nodeId=&nextToken=&limit= | poll purchase orders, paged | 200 {purchaseOrders, nextToken} |
GET /vendor/purchase-orders/{poNumber} | one purchase order | 200 |
POST /vendor/acknowledgements | accept or reject a purchase order in full | 202 {transactionId} |
POST /vendor/shipping-labels | a label per package of an accepted order | 200 {labelRef, trackingNumber, carrier} |
POST /vendor/shipment-confirmations | confirm shipment with the tracking numbers | 202 {transactionId} |
GET /vendor/transactions/{transactionId} | outcome of any write | 200 {status: PROCESSING or SUCCESS or FAILURE, errors} |
GET /vendor/nodes?vendorId= | the vendor's own nodes | 200 |
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 shipment | 200 |
POST /vendor/inbound-receipts | a carton-level receipt for one inbound shipment | 202 {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
- A 202 is not a commitment. A write takes effect when its transaction
is
SUCCESS. Model "submitted, not reconciled" as its own state. - Fill-or-kill. One decision for every line of a purchase order. A
partial acknowledgement is refused (
ErrPartialAcknowledgement). - One answer, in time. Acknowledge once (
ErrAlreadyAcknowledged) beforeackBy(ErrAckWindowClosed); afterackBythe order isEXPIREDand goes to another node. - Label after acceptance, confirmation after label
(
ErrLabelBeforeAcceptance,ErrConfirmWithoutLabel). - Rate limits are contract.
429withRetry-After; a vendor backs off and never drops the call. - Redelivery happens. The same
poNumbercan 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.