{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/forwardai/json-schema/forwardai-purchase-order-response-schema.json",
  "title": "PurchaseOrderResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forwardai-purchase-order-api-openapi.yml#/components/schemas/PurchaseOrderResponse",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "refNumber": {
        "type": "string"
      },
      "contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "date": {
        "type": "string",
        "format": "date"
      },
      "deliveryDate": {
        "type": "string",
        "format": "date"
      },
      "lineItems": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "lineNumber": {
              "type": "number"
            },
            "item": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            },
            "account": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            },
            "description": {
              "type": "string"
            },
            "quantity": {
              "type": "number"
            },
            "unitPrice": {
              "type": "number"
            },
            "lineAmount": {
              "type": "number"
            },
            "discountAmount": {
              "type": "number"
            },
            "taxCode": {
              "type": "string"
            }
          }
        }
      },
      "memo": {
        "type": "string"
      },
      "currency": {
        "type": "string"
      },
      "exchangeRate": {
        "type": "number"
      },
      "amount": {
        "type": "number"
      },
      "totalDiscount": {
        "type": "number"
      },
      "totalTax": {
        "type": "number"
      },
      "Status": {
        "type": "string"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      }
    }
  }
}