{
  "openapi": "3.1.0",
  "info": {
    "title": "Bayline",
    "version": "1",
    "description": "Bayline: Lanes and space for goods for shippers and operations teams that need truck capacity on a lane, or warehouse, cold storage or industrial space to hold goods. Capacity to move goods, and space to keep them. Bayline helps shippers and operations teams find truck capacity and space: it sets out a truckload, LTL or intermodal lane (origin, destination, equipment, weight, pallets and pickup window) or a warehouse, cold storage or industrial space requirement (size, market, term, start date and features) the way carriers and landlords quote. Bayline looks at every requirement and replies when it can point to capacity or space; it is not a licensed freight or real estate broker, so any booking or lease is agreed by the buyer directly.",
    "x-commercial": {
      "business": "Bayline",
      "price_basis": [
        {
          "kind": "SCOPED_QUOTATION",
          "label": "Quoted after scoping",
          "badge": "Quoted after scoping",
          "applies_to": "A freight lane, or warehouse and industrial space",
          "statement": "No figure is published before scoping, because none on record would hold for your situation. What is scoped first: origin, destination, equipment, weight and pickup window; for space: square feet, market, term and required features. A carrier's rate or a landlord's terms, which you accept with them directly. Bayline quotes and sells neither.",
          "status": "NO_FIGURE",
          "scoping": {
            "scoped": [
              "origin, destination, equipment, weight and pickup window",
              "for space: square feet, market, term and required features"
            ],
            "buyer_can_accept": "A carrier's rate or a landlord's terms, which you accept with them directly. Bayline quotes and sells neither."
          },
          "included": [],
          "not_included": [],
          "validity": "Until a firm offer is made; an offer states its own validity.",
          "acceptable": false
        }
      ],
      "governing": "Bayline makes no offer and sets no price for this work: any price, date and terms are agreed between you and the provider, and nothing is ordered here.",
      "price_classes": [
        {
          "class": "Indicative price",
          "means": "this business's own price for the work as it is recorded, with exactly what it is per. It is not an offer, it cannot be accepted or ordered from a page, and the exact price for your job is stated only in a firm offer."
        },
        {
          "class": "Published reference price",
          "means": "a named provider's own public price, with where and when it was read and what it covers. It is that provider's price if you buy from it directly, and it invoices you on its own terms. It is not this business's price."
        },
        {
          "class": "Indicative estimate",
          "means": "a range derived from published prices, with its assumptions and conditions. It is not an offer and cannot be accepted."
        },
        {
          "class": "Supplier quotation",
          "means": "a price a provider quoted, shown only where that provider publishes the same price itself."
        },
        {
          "class": "Firm offer",
          "means": "the only binding price: made after a request, with exact terms, valid for the period it states, and nothing is ordered until you accept it."
        }
      ],
      "response": {
        "statement": "A request is recorded and given a reference at once. Bayline's systems collect new requests about every 10 minutes, at any hour, and a first reply is drafted on a pass that runs every 15 minutes. A reply that passes its checks is sent without waiting for a person. One that does not, or a request that cannot be placed, waits for a person, and a request still unanswered after an hour is listed for the operators. A request that left no address is answered on its own page where that is possible; an address is the surer way to hear back. No reply time is promised: none has been measured for this business yet. Your request's own page shows when it was received and, after 2 business days with no reply there, says so plainly.",
        "collected_every_minutes": 10,
        "drafted_every_minutes": 15,
        "operators_listed_after_minutes": 60,
        "review_after_business_days": 2,
        "reply_time_promised": false,
        "measured": null,
        "reported_in": "request_status.response"
      },
      "responsibility": {
        "arrangement": "BUYER_CONTRACTS_PROVIDER",
        "seller_of_record": null,
        "contract_with": "The provider you choose. Bayline does not sell this work and is not a party to your contract for it.",
        "performed_by": "The motor carrier you book, or the landlord you lease from.",
        "business_does": "Writes your lane or space requirement as a brief and, when it can, points you to capacity or space that fits. It books no carrier and negotiates no lease.",
        "delivery": "The provider, under your agreement with it. Bayline is responsible only for what it does itself: the brief and pointing you to a provider.",
        "invoiced_by": "The provider, directly. Bayline sets no price for the work and sends no invoice for it.",
        "before_acceptance": "Sending a request orders nothing, reserves nothing and costs nothing. Nothing is agreed here: any price, date and terms are agreed between you and the provider.",
        "licence_limits": [
          "Arranging transportation by motor carrier for compensation is brokerage under 49 U.S.C. 13102 and requires registration with FMCSA under 49 U.S.C. 13904. Bayline holds no such registration, so any carrier is booked by you directly.",
          "Representing a party in a lease for compensation is licensed real estate brokerage in many US states, Texas among them. Bayline holds no such licence, so any lease is negotiated by you or your own broker."
        ],
        "remedies": [
          "Your remedies for the work are the ones in your agreement with the provider. Bayline gives none for work it does not sell."
        ],
        "cancellation": "As your agreement with the provider says."
      },
      "offer_validity_days": 14
    }
  },
  "servers": [
    {
      "url": "https://bayline.forevenza.com"
    }
  ],
  "tags": [
    {
      "name": "Bayline",
      "description": "Bayline helps shippers and operations teams find truck capacity and space: it sets out a truckload, LTL or intermodal lane (origin, destination, equipment, weight, pallets and pickup window) or a warehouse, cold storage or industrial space requirement (size, market, term, start date and features) the way carriers and landlords quote. Bayline looks at every requirement and replies when it can point to capacity or space; it is not a licensed freight or real estate broker, so any booking or lease is agreed by the buyer directly."
    }
  ],
  "paths": {
    "/freight-capacity/requests": {
      "post": {
        "operationId": "freight_capacity_request",
        "summary": "Send a requirement: Truckload, LTL and intermodal capacity for a lane",
        "description": "Bayline. You get a reference number and your lane and load as a written brief. We look at every requirement, and when we can point you to capacity on the lane or get the load quoted, we reply to the email you leave. Arranging truck transport for pay is brokerage, which needs federal registration; we hold none, so any carrier is booked by you directly. Nothing is ordered or committed until you agree terms. Contact details are kept apart from the requirement, while we correspond or do business and for 24 months after, so a later request picks up where it left off; ask us to delete them at any time.",
        "tags": [
          "Bayline"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "need"
                ],
                "properties": {
                  "continuation": {
                    "type": "object",
                    "required": [
                      "id",
                      "token"
                    ],
                    "description": "Optional receipt credentials to continue an existing requirement with this business",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "source",
                      "quote",
                      "verify",
                      "lease",
                      "license",
                      "hire",
                      "retrieve",
                      "convert",
                      "other"
                    ],
                    "description": "What you want done"
                  },
                  "need": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The requirement in your own words"
                  },
                  "specifications": {
                    "type": "object",
                    "properties": {
                      "origin": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Pickup city and state, or postal code",
                        "x-facet": "geography"
                      },
                      "destination": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Delivery city and state, or postal code",
                        "x-facet": "geography"
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "FTL",
                          "LTL",
                          "PARTIAL",
                          "INTERMODAL",
                          "DRAYAGE",
                          "EXPEDITED"
                        ],
                        "description": "How the freight moves",
                        "x-facet": "specification"
                      },
                      "equipment": {
                        "type": "string",
                        "enum": [
                          "DRY_VAN",
                          "REEFER",
                          "FLATBED",
                          "STEP_DECK",
                          "CONESTOGA",
                          "TANKER",
                          "CONTAINER",
                          "BOX_TRUCK",
                          "OTHER"
                        ],
                        "description": "Trailer or container type",
                        "x-facet": "specification"
                      },
                      "weight_lbs": {
                        "type": "number",
                        "minimum": 0,
                        "description": "Total weight in pounds",
                        "x-facet": "quantity"
                      },
                      "pallets": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Number of pallets or handling units",
                        "x-facet": "quantity"
                      },
                      "pickup_window": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Earliest and latest pickup, with time zone",
                        "x-facet": "timing"
                      },
                      "hazmat": {
                        "type": "boolean",
                        "description": "Whether the load contains hazardous materials",
                        "x-facet": "specification"
                      }
                    },
                    "description": "Details you already know. The business helps resolve missing specifications in the continuing engagement."
                  },
                  "quantity": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "unit": {
                        "type": "string"
                      },
                      "per": {
                        "type": "string"
                      }
                    }
                  },
                  "timing": {
                    "type": "object",
                    "properties": {
                      "earliest": {
                        "type": "string"
                      },
                      "latest": {
                        "type": "string"
                      },
                      "recurrence": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  },
                  "geography": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      },
                      "to": {
                        "type": "string"
                      }
                    }
                  },
                  "budget": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "description": "ISO 4217, default USD"
                      },
                      "per": {
                        "type": "string",
                        "description": "total, unit, month, year, load, ..."
                      }
                    }
                  },
                  "requested_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 30,
                    "description": "Result fields you need"
                  },
                  "contact": {
                    "type": "object",
                    "description": "Optional; stored apart from the requirement, kept while we correspond or do business and for 24 months after, then deleted; you can ask us to delete it sooner",
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organization": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Kept on file; the receipt carries the reference number and what happens next"
          },
          "400": {
            "description": "Not a valid request"
          }
        }
      }
    },
    "/commercial-space/requests": {
      "post": {
        "operationId": "commercial_space_request",
        "summary": "Send a requirement: Warehouse, cold storage, industrial and office space",
        "description": "Bayline. You get a reference number and a written brief of the space you need. We look at every requirement, and when we can point you to space that fits, we reply to the email you leave. Representing a party in a lease for pay is licensed brokerage in Texas, for one, and we hold no such licence, so any lease is negotiated by you or your own broker. Nothing is ordered or committed until you agree terms. Contact details are kept apart from the requirement, while we correspond or do business and for 24 months after, so a later request picks up where it left off; ask us to delete them at any time.",
        "tags": [
          "Bayline"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "need"
                ],
                "properties": {
                  "continuation": {
                    "type": "object",
                    "required": [
                      "id",
                      "token"
                    ],
                    "description": "Optional receipt credentials to continue an existing requirement with this business",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "source",
                      "quote",
                      "verify",
                      "lease",
                      "license",
                      "hire",
                      "retrieve",
                      "convert",
                      "other"
                    ],
                    "description": "What you want done"
                  },
                  "need": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The requirement in your own words"
                  },
                  "specifications": {
                    "type": "object",
                    "properties": {
                      "space_type": {
                        "type": "string",
                        "enum": [
                          "WAREHOUSE",
                          "COLD_STORAGE",
                          "FREEZER",
                          "LIGHT_INDUSTRIAL",
                          "MANUFACTURING",
                          "FLEX",
                          "OFFICE",
                          "OUTDOOR_YARD"
                        ],
                        "description": "Type of space",
                        "x-facet": "specification"
                      },
                      "square_feet": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Floor area in square feet",
                        "x-facet": "quantity"
                      },
                      "market": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "City, metro area or radius around a place",
                        "x-facet": "geography"
                      },
                      "term_months": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Lease term in months",
                        "x-facet": "timing"
                      },
                      "start_date": {
                        "type": "string",
                        "maxLength": 40,
                        "description": "Date the space is needed from (YYYY-MM-DD)",
                        "x-facet": "timing"
                      },
                      "clear_height_ft": {
                        "type": "number",
                        "minimum": 0,
                        "description": "Minimum clear height in feet",
                        "x-facet": "specification"
                      },
                      "dock_doors": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Minimum number of dock-high doors",
                        "x-facet": "specification"
                      },
                      "power": {
                        "type": "string",
                        "maxLength": 80,
                        "description": "Electrical service required (amps, volts, phase)",
                        "x-facet": "specification"
                      }
                    },
                    "description": "Details you already know. The business helps resolve missing specifications in the continuing engagement."
                  },
                  "quantity": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "unit": {
                        "type": "string"
                      },
                      "per": {
                        "type": "string"
                      }
                    }
                  },
                  "timing": {
                    "type": "object",
                    "properties": {
                      "earliest": {
                        "type": "string"
                      },
                      "latest": {
                        "type": "string"
                      },
                      "recurrence": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  },
                  "geography": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      },
                      "to": {
                        "type": "string"
                      }
                    }
                  },
                  "budget": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "description": "ISO 4217, default USD"
                      },
                      "per": {
                        "type": "string",
                        "description": "total, unit, month, year, load, ..."
                      }
                    }
                  },
                  "requested_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 30,
                    "description": "Result fields you need"
                  },
                  "contact": {
                    "type": "object",
                    "description": "Optional; stored apart from the requirement, kept while we correspond or do business and for 24 months after, then deleted; you can ask us to delete it sooner",
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organization": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Kept on file; the receipt carries the reference number and what happens next"
          },
          "400": {
            "description": "Not a valid request"
          }
        }
      }
    },
    "/_c/requests/{id}": {
      "get": {
        "operationId": "request_status",
        "summary": "Resume your recorded requirement and linked offers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}": {
      "get": {
        "operationId": "inspect_offer",
        "summary": "Authorized terms, order and processor payment state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/accept": {
      "post": {
        "operationId": "accept_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "accept",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "accept": {
                    "const": true
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "purchase_order": {
                    "type": "string",
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/deliverable": {
      "get": {
        "operationId": "retrieve_deliverable",
        "summary": "The paid order's deliverable: exact text, SHA-256, version, sources and shortfall",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/decline": {
      "post": {
        "operationId": "decline_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/release": {
      "post": {
        "operationId": "release_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "payment",
                  "confirm"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "payment": {
                    "type": "string"
                  },
                  "confirm": {
                    "const": true
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/counter": {
      "post": {
        "operationId": "counter_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "proposal",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "proposal": {
                    "type": "object",
                    "minProperties": 1,
                    "description": "A proposal, not a change: the terms stand until the business issues a revised offer",
                    "properties": {
                      "quantities": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "object",
                          "required": [
                            "item",
                            "quantity"
                          ],
                          "properties": {
                            "item": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "0-based index into terms.items"
                            },
                            "quantity": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            }
                          }
                        }
                      },
                      "counterparties": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 25,
                        "items": {
                          "type": "object",
                          "required": [
                            "name"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 160
                            },
                            "country": {
                              "type": "string",
                              "pattern": "^[A-Za-z]{2}$"
                            },
                            "identifier": {
                              "type": "string",
                              "maxLength": 40
                            }
                          }
                        }
                      },
                      "deliver_by": {
                        "type": "string",
                        "format": "date"
                      },
                      "total_minor": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "payment": {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "enum": [
                              "CHECKOUT_FULL",
                              "INVOICE"
                            ]
                          },
                          "days_until_due": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 90
                          }
                        }
                      },
                      "note": {
                        "type": "string",
                        "maxLength": 1000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/purchase-order": {
      "post": {
        "operationId": "submit_purchase_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "po",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "po": {
                    "type": "object",
                    "required": [
                      "number",
                      "lines",
                      "total_minor",
                      "currency",
                      "payment_terms_days"
                    ],
                    "description": "Matched against the accepted terms; differences are shown as exceptions",
                    "properties": {
                      "number": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._/-]{1,60}$"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 1,
                        "default": 1
                      },
                      "buyer_vendor_id": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "lines": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 40,
                        "items": {
                          "type": "object",
                          "required": [
                            "description",
                            "quantity",
                            "unit_price_minor",
                            "amount_minor"
                          ],
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 300
                            },
                            "quantity": {
                              "type": "number",
                              "minimum": 0
                            },
                            "unit_price_minor": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "amount_minor": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      },
                      "total_minor": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      "payment_terms_days": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 120
                      },
                      "bill_to": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "invoice_route": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "document_sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/purchasing-requirements": {
      "post": {
        "operationId": "state_purchasing_requirements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "requirements",
                  "name",
                  "organization"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "requirements": {
                    "type": "object",
                    "required": [
                      "vendor_approval_required",
                      "purchase_order_required"
                    ],
                    "properties": {
                      "vendor_approval_required": {
                        "type": "boolean"
                      },
                      "purchase_order_required": {
                        "type": "boolean"
                      },
                      "documents_required": {
                        "type": "array",
                        "maxItems": 12,
                        "items": {
                          "type": "string",
                          "maxLength": 80
                        }
                      },
                      "buyer_vendor_id": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "route": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "payment_terms_days": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 120
                      },
                      "note": {
                        "type": "string",
                        "maxLength": 1000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/vendor-status": {
      "post": {
        "operationId": "report_vendor_status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "status",
                  "reference",
                  "name",
                  "organization"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "status": {
                    "enum": [
                      "APPROVED",
                      "DOCUMENTS_REQUESTED",
                      "REJECTED"
                    ]
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 200
                  },
                  "buyer_vendor_id": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "documents_requested": {
                    "type": "array",
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/inspection": {
      "post": {
        "operationId": "inspect_delivery",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "lines",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "lines": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "item",
                        "accepted_quantity",
                        "rejected_quantity"
                      ],
                      "properties": {
                        "item": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "accepted_quantity": {
                          "type": "number",
                          "minimum": 0
                        },
                        "rejected_quantity": {
                          "type": "number",
                          "minimum": 0
                        },
                        "reason": {
                          "type": "string",
                          "maxLength": 300
                        }
                      }
                    }
                  },
                  "portion": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/remedy": {
      "post": {
        "operationId": "answer_remedy",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "remedy_id",
                  "answer",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Your agent's name, if you want it recorded with the act"
                  },
                  "remedy_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "answer": {
                    "enum": [
                      "ACCEPT",
                      "DECLINE"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Bayline: Capacity to move goods, and space to keep them.",
    "url": "https://bayline.forevenza.com/"
  }
}