Mews · Schema

Bill

HospitalityHotelsPMSProperty Management

Properties

Name Type Description
Id string Unique identifier of the bill.
Name string Name of the bill.
EnterpriseId string Unique identifier of the `Enterprise`.
AccountId string Unique identifier of the account (`Customer` or `Company`) the bill is issued to.
AccountType object A discriminator specifying the [type of account](https://mews-systems.gitbook.io/connector-api/operations/accounts/#account-type), i.e. `Customer` or `Company`. Company Customer
CustomerId string Unique identifier of the `Customer` the bill is issued to.
CompanyId string Unique identifier of the `Company` specified in `CompanyDetails` or the `Company` the bill is issued to.
AssociatedAccountIds array Unique identifiers of the `Customers` or `Companies` that are associated to the bill.
CounterId string Unique identifier of the bill `Counter`.
State object
Type object
Number string Number of the bill.
VariableSymbol string Variable symbol of the bill.
CreatedUtc string Date and time of the bill creation in UTC timezone in ISO 8601 format.
IssuedUtc string Date and time of the bill issuance in UTC timezone in ISO 8601 format.
TaxedUtc string Taxation date of the bill in UTC timezone in ISO 8601 format.
PaidUtc string Date when the bill was paid in UTC timezone in ISO 8601 format.
DueUtc string Bill due date and time in UTC timezone in ISO 8601 format.
LastReminderDateUtc string Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.
UpdatedUtc string Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.
PurchaseOrderNumber string Unique number of the purchase order from the buyer.
Notes string Additional notes.
Options object Options of the bill.
Revenue array
Payments array
OrderItems array The order items (consumed items such as nights or products) on the bill.
PaymentItems array The payment items (such as cash, credit card payments or invoices) on the bill.
AssigneeData object
OwnerData object Additional information about owner of the bill. Can be a `Customer` or `Company`. Persisted at the time of closing of the bill.
CompanyDetails object Additional information about the company assigned to the bill. Not the same as the owner. Persisted at the time of closing of the bill.
AssociatedAccountData array Additional information about the associated account of the bill. Can be a `Customer` or `Company`. Persisted at the time of closing of the bill. Currently only one account can be associated with a bil
EnterpriseData object Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.
CorrectionState object Whether the bill is a regular bill or a corrective bill. Bill (Regular bill.) CorrectiveBill (Corrective bill, i.e. the `CorrectionType` is either `Edit`, `Cancellation`, or `ReceivablePaymentsBalance
CorrectionType object Type of correction. Cancellation Edit CreditNote Reinstatement ReceivablePaymentsBalance
CorrectedBillId string The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is `null`.
View JSON Schema on GitHub

JSON Schema

mews-bill-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Bill",
  "title": "Bill",
  "required": [
    "AccountId",
    "AccountType",
    "AssociatedAccountIds",
    "CorrectionState",
    "CreatedUtc",
    "EnterpriseId",
    "Id",
    "OrderItems",
    "PaymentItems",
    "Payments",
    "Revenue",
    "State",
    "Type",
    "UpdatedUtc"
  ],
  "type": "object",
  "properties": {
    "Id": {
      "type": "string",
      "description": "Unique identifier of the bill.",
      "format": "uuid"
    },
    "Name": {
      "type": "string",
      "description": "Name of the bill.",
      "nullable": true
    },
    "EnterpriseId": {
      "type": "string",
      "description": "Unique identifier of the `Enterprise`.",
      "format": "uuid"
    },
    "AccountId": {
      "type": "string",
      "description": "Unique identifier of the account (`Customer` or `Company`) the bill is issued to.",
      "format": "uuid"
    },
    "AccountType": {
      "title": "Account type",
      "allOf": [
        {
          "$ref": "#/components/schemas/AccountTypeEnum"
        }
      ],
      "description": "A discriminator specifying the [type of account](https://mews-systems.gitbook.io/connector-api/operations/accounts/#account-type), i.e. `Customer` or `Company`.\n\nCompany\n\nCustomer",
      "x-enumNames": [
        "Company",
        "Customer"
      ],
      "x-enumDescriptions": [
        "",
        ""
      ]
    },
    "CustomerId": {
      "type": "string",
      "description": "Unique identifier of the `Customer` the bill is issued to.",
      "format": "uuid",
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `AccountId` instead."
    },
    "CompanyId": {
      "type": "string",
      "description": "Unique identifier of the `Company` specified in `CompanyDetails` or the `Company` the bill is issued to.",
      "format": "uuid",
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `AssociatedAccountIds` instead."
    },
    "AssociatedAccountIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Unique identifiers of the `Customers` or `Companies` that are associated to the bill.",
      "nullable": true
    },
    "CounterId": {
      "type": "string",
      "description": "Unique identifier of the bill `Counter`.",
      "format": "uuid",
      "nullable": true
    },
    "State": {
      "$ref": "#/components/schemas/BillState"
    },
    "Type": {
      "$ref": "#/components/schemas/BillType"
    },
    "Number": {
      "type": "string",
      "description": "Number of the bill.",
      "nullable": true
    },
    "VariableSymbol": {
      "type": "string",
      "description": "Variable symbol of the bill.",
      "nullable": true
    },
    "CreatedUtc": {
      "minLength": 1,
      "type": "string",
      "description": "Date and time of the bill creation in UTC timezone in ISO 8601 format.",
      "format": "date-time"
    },
    "IssuedUtc": {
      "type": "string",
      "description": "Date and time of the bill issuance in UTC timezone in ISO 8601 format.",
      "format": "date-time",
      "nullable": true
    },
    "TaxedUtc": {
      "type": "string",
      "description": "Taxation date of the bill in UTC timezone in ISO 8601 format.",
      "format": "date-time",
      "nullable": true
    },
    "PaidUtc": {
      "type": "string",
      "description": "Date when the bill was paid in UTC timezone in ISO 8601 format.",
      "format": "date-time",
      "nullable": true
    },
    "DueUtc": {
      "type": "string",
      "description": "Bill due date and time in UTC timezone in ISO 8601 format.",
      "format": "date-time",
      "nullable": true
    },
    "LastReminderDateUtc": {
      "type": "string",
      "description": "Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.",
      "format": "date-time",
      "nullable": true
    },
    "UpdatedUtc": {
      "minLength": 1,
      "type": "string",
      "description": "Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.",
      "format": "date-time"
    },
    "PurchaseOrderNumber": {
      "type": "string",
      "description": "Unique number of the purchase order from the buyer.",
      "nullable": true
    },
    "Notes": {
      "type": "string",
      "description": "Additional notes.",
      "nullable": true
    },
    "Options": {
      "title": "Bill options",
      "allOf": [
        {
          "$ref": "#/components/schemas/BillOptions"
        }
      ],
      "description": "Options of the bill.",
      "nullable": true
    },
    "Revenue": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AccountingItem"
      },
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `orderItems/getAll` with `BillId` instead."
    },
    "Payments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AccountingItem"
      },
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `payments/getAll` with `BillId` instead."
    },
    "OrderItems": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OrderItemOld"
      },
      "description": "The order items (consumed items such as nights or products) on the bill.",
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `orderItems/getAll` with `BillId` instead."
    },
    "PaymentItems": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PaymentItemOld"
      },
      "description": "The payment items (such as cash, credit card payments or invoices) on the bill.",
      "nullable": true,
      "deprecated": true
    },
    "AssigneeData": {
      "title": "Bill assignee data",
      "type": "object",
      "properties": {
        "Discriminator": {
          "$ref": "#/components/schemas/BillAssigneeDataDiscriminator"
        },
        "Value": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/BillCompanyData"
            },
            {
              "$ref": "#/components/schemas/BillCustomerData"
            }
          ]
        }
      },
      "nullable": true,
      "deprecated": true,
      "x-coproduct": true,
      "x-schema-id": "BillAssigneeDataCoproductOfBillAssigneeDataDiscriminator",
      "x-deprecatedMessage": "Use `OwnerData` instead."
    },
    "OwnerData": {
      "title": "Bill owner data",
      "type": "object",
      "properties": {
        "Discriminator": {
          "$ref": "#/components/schemas/BillAssigneeDataDiscriminator"
        },
        "Value": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/BillCompanyData"
            },
            {
              "$ref": "#/components/schemas/BillCustomerData"
            }
          ]
        }
      },
      "description": "Additional information about owner of the bill. Can be a `Customer` or `Company`. Persisted at the time of closing of the bill.",
      "nullable": true,
      "x-coproduct": true,
      "x-schema-id": "BillOwnerDataCoproductOfBillAssigneeDataDiscriminator"
    },
    "CompanyDetails": {
      "title": "Bill company data",
      "allOf": [
        {
          "$ref": "#/components/schemas/BillCompanyData"
        }
      ],
      "description": "Additional information about the company assigned to the bill. Not the same as the owner. Persisted at the time of closing of the bill.",
      "nullable": true,
      "deprecated": true,
      "x-deprecatedMessage": "Use `AssociatedAccountData` instead."
    },
    "AssociatedAccountData": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/BillAccountData"
      },
      "description": "Additional information about the associated account of the bill. Can be a `Customer` or `Company`. Persisted at the time of closing of the bill. Currently only one account can be associated with a bill, but this may be extended in future.",
      "nullable": true
    },
    "EnterpriseData": {
      "title": "Bill enterprise data",
      "allOf": [
        {
          "$ref": "#/components/schemas/BillEnterpriseData"
        }
      ],
      "description": "Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.",
      "nullable": true
    },
    "CorrectionState": {
      "title": "Bill correction state",
      "allOf": [
        {
          "$ref": "#/components/schemas/BillCorrectionStateEnum"
        }
      ],
      "description": "Whether the bill is a regular bill or a corrective bill.\n\nBill (Regular bill.)\n\nCorrectiveBill (Corrective bill, i.e. the `CorrectionType` is either `Edit`, `Cancellation`, or `ReceivablePaymentsBalance`.)",
      "x-enumNames": [
        "Bill",
        "CorrectiveBill"
      ],
      "x-enumDescriptions": [
        "Regular bill.",
        "Corrective bill, i.e. the `CorrectionType` is either `Edit`, `Cancellation`, or `ReceivablePaymentsBalance`."
      ]
    },
    "CorrectionType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BillCorrectionTypeEnum"
        }
      ],
      "description": "Type of correction.\n\nCancellation\n\nEdit\n\nCreditNote\n\nReinstatement\n\nReceivablePaymentsBalance",
      "nullable": true
    },
    "CorrectedBillId": {
      "type": "string",
      "description": "The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is `null`.",
      "format": "uuid",
      "nullable": true
    }
  },
  "additionalProperties": false,
  "x-schema-id": "Bill"
}