{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/enosix/main/json-schema/enosix-sales-documents-schema.json",
  "title": "SalesDocuments",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/enosix-sales-document-openapi.json#/components/schemas/SalesDocuments",
  "type": "object",
  "properties": {
    "PageInfo": {
      "$ref": "#/$defs/type"
    },
    "SalesDcoument": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/items"
      }
    }
  },
  "$defs": {
    "items": {
      "type": "object",
      "properties": {
        "BillingBlock": {
          "maxLength": 2,
          "type": "string"
        },
        "BillingBlockDescription": {
          "maxLength": 20,
          "type": "string"
        },
        "Custom01": {
          "type": "string"
        },
        "Custom02": {
          "type": "string"
        },
        "Custom03": {
          "type": "string"
        },
        "Custom04": {
          "type": "string"
        },
        "Custom05": {
          "type": "string"
        },
        "Custom06": {
          "type": "string"
        },
        "Custom07": {
          "type": "string"
        },
        "Custom08": {
          "type": "string"
        },
        "Custom09": {
          "type": "string"
        },
        "Custom10": {
          "type": "string"
        },
        "CreateDate": {
          "type": "string",
          "format": "date"
        },
        "CreditBlock": {
          "maxLength": 1,
          "type": "string"
        },
        "CreditBlockDescription": {
          "maxLength": 50,
          "type": "string"
        },
        "CustomerPONumber": {
          "maxLength": 20,
          "type": "string"
        },
        "DeliveryBlock": {
          "maxLength": 2,
          "type": "string"
        },
        "DeliveryBlockDescription": {
          "maxLength": 20,
          "type": "string"
        },
        "DeliveryStatus": {
          "maxLength": 2,
          "type": "string"
        },
        "DeliveryStatusDescription": {
          "maxLength": 40,
          "type": "string"
        },
        "EndDate": {
          "type": "string"
        },
        "GoodsIssuedQuantity": {
          "type": "string"
        },
        "LastChangedDate": {
          "type": "string"
        },
        "NetValueInDocumentCurrency": {
          "type": "number",
          "format": "double"
        },
        "OrderStatus": {
          "maxLength": 10,
          "type": "string"
        },
        "SDDocumentCurrency": {
          "maxLength": 5,
          "type": "string"
        },
        "SalesDocument": {
          "maxLength": 10,
          "type": "string"
        },
        "SalesDocumentType": {
          "maxLength": 4,
          "type": "string"
        },
        "SalesDocumentTypeDescription": {
          "maxLength": 20,
          "type": "string"
        },
        "SalesDocumentVersionNumber": {
          "maxLength": 12,
          "type": "string"
        },
        "ShipToCity": {
          "maxLength": 40,
          "type": "string"
        },
        "ShipToCountry": {
          "maxLength": 3,
          "type": "string"
        },
        "ShipToCountryDescription": {
          "maxLength": 50,
          "type": "string"
        },
        "ShipToName": {
          "maxLength": 30,
          "type": "string"
        },
        "ShipToParty": {
          "maxLength": 10,
          "type": "string"
        },
        "ShipToPurchaseOrderNumber": {
          "maxLength": 35,
          "type": "string"
        },
        "ShipToRegion": {
          "maxLength": 3,
          "type": "string"
        },
        "ShipToRegionDescription": {
          "maxLength": 20,
          "type": "string"
        },
        "SoldToCity": {
          "maxLength": 40,
          "type": "string"
        },
        "SoldToCountry": {
          "maxLength": 3,
          "type": "string"
        },
        "SoldToCountryDescription": {
          "maxLength": 50,
          "type": "string"
        },
        "SoldToName": {
          "maxLength": 30,
          "type": "string"
        },
        "SoldToParty": {
          "maxLength": 10,
          "type": "string"
        },
        "SoldToRegion": {
          "maxLength": 3,
          "type": "string"
        },
        "SoldToRegionDescription": {
          "maxLength": 20,
          "type": "string"
        },
        "StartDate": {
          "type": "string"
        },
        "TaxAmountInDocumentCurrency": {
          "type": "number",
          "format": "double"
        },
        "TotalQuantity": {
          "type": "string"
        },
        "TransactionGroup": {
          "maxLength": 1,
          "type": "string"
        },
        "YourReference": {
          "maxLength": 12,
          "type": "string"
        },
        "index": {
          "maxLength": 10,
          "type": "string"
        }
      }
    },
    "type": {
      "type": "object",
      "properties": {
        "totalRecords": {
          "type": "integer",
          "format": "int64"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "default": 10
        },
        "pageNumber": {
          "type": "integer",
          "format": "int32",
          "default": 1
        }
      }
    }
  }
}