# Create a single invoice Create a new sales invoice within the Property Management System (PMS). This endpoint allows you to create a new sales invoice by providing the necessary invoice details in the request body. The invoice will be created with a 'DRAFT' status by default and can be updated or posted later. This operation requires authentication and will associate the created invoice with the authenticated user. The request body should include invoice details such as organization ID, invoice date, line items, and other relevant information. Upon successful creation, the response will contain the complete invoice details including the assigned invoice ID. In case of an unexpected system error during creation, a 500 Internal Server Error will be triggered. Endpoint: POST /api/v3/salesInvoices Version: 3.0.12 Security: X-Auth-Token ## Request fields (application/json): - `type` (string, required) Type of the sales invoice Enum: "SALES_INVOICE", "SALES_CREDIT" - `invoiceDate` (string, required) Date of the invoice - `dueDate` (string, required) Due date of the invoice - `currency` (object, required) Base currency details of the invoice - `currency.id` (integer) Unique identifier of the currency Example: 1 - `currency.name` (string) Name of the currency Example: "US Dollar" - `salesInvoiceItems` (array) List of items in the sales invoice - `salesInvoiceItems.description` (string, required) Description of the sales invoice item - `salesInvoiceItems.comment1` (string) First comment - `salesInvoiceItems.comment2` (string) Second comment - `salesInvoiceItems.unitPrice` (number, required) Unit price - `salesInvoiceItems.quantity` (number, required) Quantity - `salesInvoiceItems.net` (number, required) Net amount - `salesInvoiceItems.taxCode` (object, required) Tax code details - `salesInvoiceItems.taxCode.id` (integer) The unique identifier of the tax code Example: 1 - `salesInvoiceItems.taxCode.type` (string, required) Type of the tax code Enum: "SALES", "PURCHASE" - `salesInvoiceItems.taxCode.code` (string, required) Code of the tax code - `salesInvoiceItems.taxCode.name` (string, required) Name of the tax code - `salesInvoiceItems.taxCode.rate` (number, required) Rate of the tax code - `salesInvoiceItems.taxCode.xeroTaxType` (string) Xero tax type of the tax code - `salesInvoiceItems.taxCode.exportName` (string) Export name of the tax code - `salesInvoiceItems.chargeFrom` (string, required) Charge start date - `salesInvoiceItems.chargeTo` (string, required) Charge end date - `salesInvoiceItems.product` (object, required) Accommodation product summary - `salesInvoiceItems.product.id` (integer) Unique identifier of the product Example: 1 - `salesInvoiceItems.product.productCode` (string) Code of the product Example: "PROD-001" - `salesInvoiceItems.product.name` (string) Name of the product Example: "Product 1" - `salesInvoiceItems.product.invoiceWrapGroup` (string) Wrapping group of the product Example: "Rentals" - `salesInvoiceItems.ourReference` (string) Our reference - `salesInvoiceItems.roomStay` (object) Extension of original room stay summary - `salesInvoiceItems.roomStay.id` (integer) Unique identifier of the room stay - `salesInvoiceItems.roomStay.startDate` (string) Start date of the room stay - `salesInvoiceItems.roomStay.endDate` (string) End date of the room stay - `salesInvoiceItems.roomStay.roomStayStatus` (string) Status of the room stay Enum: "ENQUIRY", "QUOTED", "PENDING", "MEDIATION_REQUIRED", "CONFIRMED", "CHECKED_IN", "CHECKED_OUT", "COMPLETE", "CANCELLED", "LOST" - `salesInvoiceItems.roomStay.netAmount` (number) Net amount for the room stay - `salesInvoiceItems.roomStay.vatAmount` (number) VAT amount for the room stay - `salesInvoiceItems.roomStay.numberOfAdults` (integer) Number of adults in the room stay - `salesInvoiceItems.roomStay.numberOfChildren` (integer) Number of children in the room stay - `salesInvoiceItems.roomStay.numberOfInfants` (integer) Number of infants in the room stay - `salesInvoiceItems.unit` (object) Summary of the Unit associated with the Unit Access Group - `salesInvoiceItems.unit.id` (integer) Unique identifier of the unit Example: 1 - `salesInvoiceItems.unit.name` (string) Name of the unit Example: "Apartment 101" - `salesInvoiceItems.unitPriceIncludesTax` (boolean, required) Indicates if unit price includes tax - `customerReference` (string) Customer reference - `financeAccount` (object, required) Finance account details - `financeAccount.id` (integer) Unique identifier of the finance account - `financeAccount.accountCode` (string) Account code of the finance account - `financeAccount.contact` (object) - `financeAccount.contact.id` (integer) Unique identifier of the contact - `financeAccount.contact.firstName` (string) First name of the contact - `financeAccount.contact.lastName` (string) Last name of the contact - `financeAccount.company` (object) Company summary associated with the finance account - `financeAccount.company.id` (integer) Unique identifier of the company - `financeAccount.company.companyName` (string) Name of the company - `financeAccount.externalId` (string) External identifier of the finance account - `financeAccount.exportedDate` (string) Date when the finance account was exported - `financeAccount.exportStatus` (string) Export status of the finance account Enum: "SKIPPED", "CREATED", "PENDING", "SENT", "EXPORTED", "FAILED", "IMPORTED" - `organisationSettings` (object, required) Organisation settings - `organisationSettings.id` (integer) The unique identifier of the organisation settings Example: 1 - `organisationSettings.name` (string) The name of the organisation Example: "Resharmonics" - `organisationSettings.currency` (object) The currency of the organisation - `organisationSettings.currency.description` (string) Description of the currency - `organisationSettings.currency.symbol` (string) Symbol of the currency - `organisationSettings.currency.exchangeRate` (number) Exchange rate of the currency - `organisationSettings.currency.baseRate` (number) Base rate of the currency - `organisationSettings.currency.unit` (string) Unit of the currency - `organisationSettings.currency.autoUpdate` (boolean) Indicates if the currency is auto-updated - `organisationSettings.currency.primaryCurrency` (boolean) Indicates if this is the primary currency - `organisationSettings.currency.htmlSafeSymbol` (string) HTML safe symbol of the currency - `organisationSettings.country` (object) Data Transfer Object representing a Country entity in the Property Management System (PMS). - `organisationSettings.country.id` (integer) Unique identifier of the country - `organisationSettings.country.name` (string, required) Name of the country - `organisationSettings.country.sortOrder` (integer, required) Sort order of the country - `organisationSettings.country.countryCodeAlpha2` (string, required) Alpha-2 country code - `organisationSettings.country.countryCodeAlpha3` (string, required) Alpha-3 country code - `organisationSettings.country.countryCodeNumeric` (string, required) Numeric country code - `referenceNumber` (string) Reference number of the invoice ## Response 200 fields (application/json): - `id` (integer) Unique identifier of the sales invoice - `salesInvoiceNumber` (integer) Sales invoice number - `type` (string, required) Type of the sales invoice Enum: "SALES_INVOICE", "SALES_CREDIT" - `invoiceDate` (string, required) Date of the invoice - `net` (number) Net amount of the invoice - `tax` (number) Tax amount of the invoice - `gross` (number) Gross amount of the invoice - `baseNet` (number) Base net amount of the invoice - `baseTax` (number) Base tax amount of the invoice - `baseGross` (number) Base gross amount of the invoice - `reportingNet` (number) Reporting net amount of the invoice - `reportingTax` (number) Reporting tax amount of the invoice - `reportingGross` (number) Reporting gross amount of the invoice - `dueDate` (string, required) Due date of the invoice - `dateSent` (string) Date when the invoice was sent - `sendStatus` (string) Send status of the invoice Enum: "UNSENT", "SENDING", "SENT", "FAILED" - `sentVia` (string) Channel via which the invoice was sent Enum: "EMAIL", "PEPPOL" - `currency` (object, required) Base currency details of the invoice - `currency.id` (integer) Unique identifier of the currency Example: 1 - `currency.name` (string) Name of the currency Example: "US Dollar" - `baseCurrency` (object) Base currency details of the invoice - `exchangeRate` (number) Exchange rate applied to the invoice - `baseExchangeRate` (number) Base exchange rate applied to the invoice - `customerName` (string) Customer name associated with the invoice - `companyName` (string) Company name associated with the invoice - `addressLine1` (string) Address line 1 of the customer - `addressLine2` (string) Address line 2 of the customer - `addressLine3` (string) Address line 3 of the customer - `city` (string) City of the customer - `postCode` (string) Post code of the customer - `country` (object) Data Transfer Object representing a Country entity in the Property Management System (PMS). - `country.id` (integer) Unique identifier of the country - `country.name` (string, required) Name of the country - `country.sortOrder` (integer, required) Sort order of the country - `country.countryCodeAlpha2` (string, required) Alpha-2 country code - `country.countryCodeAlpha3` (string, required) Alpha-3 country code - `country.countryCodeNumeric` (string, required) Numeric country code - `customerReference` (string) Customer reference - `financeAccount` (object, required) Finance account details - `financeAccount.id` (integer) Unique identifier of the finance account - `financeAccount.accountCode` (string) Account code of the finance account - `financeAccount.contact` (object) - `financeAccount.contact.id` (integer) Unique identifier of the contact - `financeAccount.contact.firstName` (string) First name of the contact - `financeAccount.contact.lastName` (string) Last name of the contact - `financeAccount.company` (object) Company summary associated with the finance account - `financeAccount.company.id` (integer) Unique identifier of the company - `financeAccount.company.companyName` (string) Name of the company - `financeAccount.externalId` (string) External identifier of the finance account - `financeAccount.exportedDate` (string) Date when the finance account was exported - `financeAccount.exportStatus` (string) Export status of the finance account Enum: "SKIPPED", "CREATED", "PENDING", "SENT", "EXPORTED", "FAILED", "IMPORTED" - `status` (string) Status of the invoice Enum: "DRAFT", "VOID", "POSTED" - `exportedDate` (string) Date when the invoice was exported - `externalId` (string) External ID of the invoice - `exportStatus` (string) Export status of the invoice Enum: "SKIPPED", "CREATED", "PENDING", "SENT", "EXPORTED", "FAILED", "IMPORTED" - `payableOnline` (boolean) Indicates if the invoice is payable online - `issueId` (integer) Issue ID associated with the invoice - `eventBookingId` (integer) Event booking ID associated with the invoice - `uuid` (string) UUID of the invoice - `payableOnlineReference` (integer) Reference for online payment - `organisationSettings` (object, required) Organisation settings - `organisationSettings.id` (integer) The unique identifier of the organisation settings Example: 1 - `organisationSettings.name` (string) The name of the organisation Example: "Resharmonics" - `organisationSettings.currency` (object) The currency of the organisation - `organisationSettings.currency.description` (string) Description of the currency - `organisationSettings.currency.symbol` (string) Symbol of the currency - `organisationSettings.currency.exchangeRate` (number) Exchange rate of the currency - `organisationSettings.currency.baseRate` (number) Base rate of the currency - `organisationSettings.currency.unit` (string) Unit of the currency - `organisationSettings.currency.autoUpdate` (boolean) Indicates if the currency is auto-updated - `organisationSettings.currency.primaryCurrency` (boolean) Indicates if this is the primary currency - `organisationSettings.currency.htmlSafeSymbol` (string) HTML safe symbol of the currency - `referenceNumber` (string) Reference number of the invoice - `outStanding` (number) Outstanding amount of the invoice - `outStandingNet` (number) Outstanding net amount of the invoice - `outStandingVat` (number) Outstanding VAT amount of the invoice - `externalIdentifier` (object) External identifier for Xero integration - `externalIdentifier.id` (integer, required) Identifier - `externalIdentifier.externalId` (string, required) External identifier - `externalIdentifier.exportedDate` (string) Exported date - `externalIdentifier.exportStatus` (string) Export status Enum: "CREATED", "EXPORTED", "FAILED", "IMPORTED", "PENDING", "SENT", "SKIPPED"