Download OpenAPI specification:Download
Newbook allows our clients to set up an Integration to an endpoint of your specification, accepting a POST request with information detailing an Invoice and its connected items.
Information detailing the client's business will be delivered, as well as information detailing the Client Account the Invoice is saved against.
These details are suggested to be enough for your endpoint to analyse and generate HTML, in a layout which a Guest would understand to be an Invoice document.
Newbook will send a request to your endpoint. The URL can be anything.
This will be either a GET request with no data payload, or a POST request with full details of the Invoice etc.
Clients can configure multiple integrations in this way. For example, it is possible to set up different endpoints (and different Invoice templates to use inside Newbook) if the client asked you to build one Invoice Document layout for Long Term bookings and another for Short Term bookings.
type | string Value: "invoice" |
object Information about this Invoice | |
object Information about the object for the Client Account this Invoice is attached to | |
object Information about this Instance (Newbook client) | |
object Information about this Guest | |
object Information detailing all the associated Items for this Invoice |
{- "type": "invoice",
- "typeData": {
- "id": "string",
- "accountId": "string",
- "autoDebit": "string",
- "description": "string",
- "dueOn": "2019-08-24",
- "finalNoticeOn": null,
- "total": "string",
- "paidTotal": "string",
- "groupBy": null,
- "invoiceReminders": "string",
- "invoicedTo": "string",
- "lateFeeExemption": "string",
- "paidNotification": "string",
- "paidNotificationSent": "string",
- "poNumber": "string",
- "systemTemplateId": "string",
- "taxTotals": [
- {
- "name": "string",
- "total": 0
}
], - "totals": [
- {
- "charges": "string",
- "credits": "string",
- "payments": "string",
- "refunds": "string"
}
], - "generatedBy": "string",
- "generatedWhen": "string",
- "voidedBy": null,
- "voidedWhen": null
}, - "accountData": {
- "type": "bookings",
- "typeLabel": "string",
- "id": "string",
- "indexnumber": "string",
- "adults": "string",
- "children": "string",
- "infants": "string",
- "animals": "string",
- "parentId": null,
- "periodFrom": "string",
- "periodTo": "string",
- "referenceId": "string",
- "status": "Arrived",
- "defaultClientAccountId": "string",
- "site": {
- "id": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "status": "Clean",
- "categoryId": "string",
- "street": "string",
- "city": "string",
- "stateId": null,
- "countryId": null,
- "postcode": "string",
- "lat": "string",
- "long": "string",
- "displayOrder": "string",
- "levelId": null,
- "glAccountId": null,
- "glCategoryId": null,
- "managerId": null,
- "openedOn": "2019-08-24",
- "closedOn": null,
- "overbooking": "string",
- "occupancy": "string",
- "overrideCategoryFeatures": "string",
- "posIdentifier": "string",
- "showOnline": "string",
- "slabSizeId": "string",
- "defaultSecurityAreaId": null
}, - "siteId": "string",
- "sourceId": "string",
- "methodId": "string",
- "reasonId": "string",
- "demographicId": "string",
- "marketSegmentId": "string",
- "eta": null,
- "glAccountId": "string",
- "glCategoryId": "string",
- "hybridRemoteId": "string",
- "flagged": "string",
- "locked": "string",
- "taxFree": "string",
- "bookedBy": "string",
- "bookedWhen": "string",
- "arrivedBy": "string",
- "arrivedWhen": null,
- "departedBy": "string",
- "departedWhen": null,
- "cancelledBy": null,
- "cancelledWhen": null,
- "cancellationReasonId": null,
- "bookingChannelId": "string",
- "directChannelManagerId": null,
- "travelAgentId": null,
- "travelAgentStaffId": null,
- "travelAgentCommissionInventoryItemId": null,
- "travelAgentHandlesCommission": "string",
- "commissionAmount": "string",
- "commissionGlData": null,
- "commissionType": "fixed",
- "companyId": null,
- "companyStaffId": null,
- "allowContact": 6,
- "allowGuestAssist": "string",
- "createCharges": "string",
- "disburseToOwners": "string",
- "preAuthAmount": "string",
- "previousId": null,
- "stayRating": "string",
- "tariffInvoiceInterval": null,
- "tariffInvoiceIntervalMultiplier": null,
- "tariffSystemTemplateInvoices": null,
- "tariffSystemTemplateReceipts": null,
- "travellingFromId": null,
- "travellingToId": null,
- "convertedWhen": "string",
- "modifiedWhen": "string",
- "cancelBookingDate": null
}, - "businessData": {
- "name": "string",
- "tradingName": "string",
- "website": "string",
- "logo": "string",
- "managerName": "string",
- "contactPerson": "string",
- "adminFax": "string",
- "adminPhone": "string",
- "salesFax": "string",
- "salesPhone": "string",
- "basicInformation": "string",
- "checkinTime": "14:15:22Z",
- "checkoutTime": "14:15:22Z",
- "physicalAddress": "string",
- "physicalStreet": "string",
- "physicalCity": "string",
- "physicalState": "string",
- "physicalStateId": "string",
- "physicalStateShort": "string",
- "physicalPostcode": "string",
- "physicalPostcodeState": "string",
- "physicalCountry": "string",
- "physicalCountryId": "string",
- "mailingAddress": "string",
- "mailingStreet": "string",
- "mailingCity": "string",
- "mailingState": "string",
- "mailingStateId": "string",
- "mailingStateShort": "string",
- "mailingPostcode": "string",
- "mailingPostcodeState": "string",
- "mailingCountry": "string",
- "mailingCountryId": "string"
}, - "modelData": {
- "type": "guests",
- "typeLabel": "string",
- "id": "string",
- "title": "string",
- "firstname": "string",
- "lastname": "string",
- "othername": "string",
- "fullName": "string",
- "gender": null,
- "dateOfBirth": null,
- "phone": "string",
- "address": "string",
- "street": "string",
- "city": "string",
- "stateId": "string",
- "postcode": "string",
- "countryId": "string",
- "mailingStreet": null,
- "mailingCity": null,
- "mailingStateId": null,
- "mailingPostcode": null,
- "mailingCountryId": null,
- "staffId": null,
- "companyId": null,
- "vipBy": null,
- "vipWhen": null,
- "blacklistedBy": null,
- "blacklistedWhen": null,
- "additionalData": "string",
- "lastNoteWhen": null,
- "dateCreated": "string"
}, - "transactions": {
- "charges": [
- {
- "id": "string",
- "description": "string",
- "type": "string",
- "accountId": "string",
- "glCategoryId": "string",
- "category": {
- "id": "string",
- "name": "string",
- "displayOrder": "string",
- "autoBillingLimit": null
}, - "inventoryItemId": null,
- "item": [
- {
- "id": "string",
- "categoryId": null,
- "name": "string",
- "description": "string",
- "additionalInformation": "string",
- "glAccountId": null,
- "glCategoryId": null,
- "costPrice": "string",
- "amount": "string",
- "taxFree": "string",
- "stockControl": "string",
- "useStockSerials": "string",
- "barcode": "string",
- "lowStockThreshold": null,
- "defaultDiscountId": null,
- "pushToPos": "string",
- "sectionCode": "string",
- "active": "string"
}
], - "amount": "string",
- "taxFree": "string",
- "taxAmount": "string",
- "taxes": [
- {
- "id": "string",
- "itemType": "charges",
- "itemId": "string",
- "taxId": "string",
- "name": "string",
- "displayName": "string",
- "taxType": "percentage",
- "taxAmount": "string",
- "taxInclusive": "string",
- "taxItems": "string",
- "taxSwitched": "string",
- "calculatedAmount": "string"
}
], - "total": null,
- "generatedBy": "string",
- "generatedWhen": "string",
- "voidedBy": null,
- "voidedWhen": null
}
], - "credits": [
- {
- "id": "string",
- "description": "string",
- "type": "string",
- "accountId": "string",
- "glCategoryId": "string",
- "category": {
- "id": "string",
- "name": "string",
- "displayOrder": "string",
- "autoBillingLimit": null
}, - "inventoryItemId": null,
- "item": [
- {
- "id": "string",
- "categoryId": null,
- "name": "string",
- "description": "string",
- "additionalInformation": "string",
- "glAccountId": null,
- "glCategoryId": null,
- "costPrice": "string",
- "amount": "string",
- "taxFree": "string",
- "stockControl": "string",
- "useStockSerials": "string",
- "barcode": "string",
- "lowStockThreshold": null,
- "defaultDiscountId": null,
- "pushToPos": "string",
- "sectionCode": "string",
- "active": "string"
}
], - "amount": "string",
- "taxFree": "string",
- "taxAmount": "string",
- "taxes": [
- {
- "id": "string",
- "itemType": "charges",
- "itemId": "string",
- "taxId": "string",
- "name": "string",
- "displayName": "string",
- "taxType": "percentage",
- "taxAmount": "string",
- "taxInclusive": "string",
- "taxItems": "string",
- "taxSwitched": "string",
- "calculatedAmount": "string"
}
], - "total": null,
- "generatedBy": "string",
- "generatedWhen": "string",
- "voidedBy": null,
- "voidedWhen": null
}
], - "payments": [
- {
- "id": "string",
- "description": "string",
- "type": "none",
- "accountId": "string",
- "glCategoryId": "string",
- "amount": "string",
- "tendered": "string",
- "tenderedCurrency": "string",
- "deposit": "string",
- "disbursedBookingId": null,
- "disbursedGlAccountId": null,
- "paidBy": "string",
- "transactionId": "string",
- "transactionMethod": "manual",
- "typeReference": "string",
- "generatedBy": "string",
- "generatedWhen": "string",
- "voidedBy": null,
- "voidedWhen": null
}
], - "refunds": [
- {
- "id": "string",
- "description": "string",
- "type": "none",
- "accountId": "string",
- "glCategoryId": "string",
- "amount": "string",
- "tendered": "string",
- "tenderedCurrency": "string",
- "deposit": "string",
- "disbursedBookingId": null,
- "disbursedGlAccountId": null,
- "paidBy": "string",
- "transactionId": "string",
- "transactionMethod": "manual",
- "typeReference": "string",
- "generatedBy": "string",
- "generatedWhen": "string",
- "voidedBy": null,
- "voidedWhen": null
}
]
}
}