# Create a new site Endpoint: POST /sites Version: 1.41 Security: bearerAuth ## Request fields (application/json): - `customerId` (integer, required) Customer identifier - set to 0 when creating a new customer - `siteName` (string, required) Site name - `siteReference` (string, required) Site reference - `startDate` (string, required) Site start date - `endDate` (string) Site end date - `siteAddress` (object, required) - `siteAddress.businessName` (string) Business name - `siteAddress.address1` (string, required) Address line 1 - `siteAddress.address2` (string) Address line 2 - `siteAddress.address3` (string) Address line 3 - `siteAddress.town` (string, required) Town - `siteAddress.county` (string) County - `siteAddress.postcode` (string, required) Postcode - `siteAddress.country` (string, required) ISO 3166 alpha-2 code representing country Example: "GB" - `siteInvoiceDetails` (object) Invoice details if this site should receive invoices - `siteInvoiceDetails.invoiceSummaryTemplateId` (integer) Invoice summary template identifier - set on creation of site only - `siteInvoiceDetails.invoiceTemplateId` (integer, required) Invoice template identifier - set on creation of site only - `siteInvoiceDetails.electronicSummaryTemplateIds` (array) List of electronic summary template identifiers associated with this site Example: [123] - `siteInvoiceDetails.invoiceSummaryTemplateComponents` (array) List of invoice summary template components associated with this site - `siteInvoiceDetails.invoiceAddress` (object) - `siteInvoiceDetails.accountPackageReference` (string) Account package reference - `siteInvoiceDetails.paymentTermsInDays` (integer) Payment terms in days, used to derive the invoice due date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.preferredPaymentDay` (integer) Preferred payment day of month, used to derive the invoice due date. When automated, it will be used to collect money on that date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.paymentMethod` (string, required) Payment method Enum: "CHEQUE", "DIRECT_DEBIT", "CANCELLED_DD", "CANCELLED_CARD", "CREDIT_CARD", "PAYPAL", "BACS", "POST_OFFICE_PAYMENT_CARD", "EZYPAY", "GO_CARDLESS", "GC_INSTANT_BANK_PAYMENTS", "STRIPE", "STRIPE_CARD", "STRIPE_DD", "FINASTRA", "FAST_PAY", "OTHER" - `siteInvoiceDetails.mandateReference` (string) Required when the paymentType is an integrated one, for example GO_CARDLESS, FINASTRA or STRIPE. If GO_CARDLESS, only accepted Created, Pending Submission, Submitted, Active, Reinstated, Customer approval granted and Customer approval skipped - `siteInvoiceDetails.thirdPartyCustomerReference` (string) Reference to a customer in a third party system. For example, Stripe Customer ID (mandatory if a Stripe mandate is provided), or optional references like GO_CARDLESS Customer Reference or FINASTRA Account Number - `siteInvoiceDetails.directDebitReference` (string) Direct debit reference - `siteInvoiceDetails.accountName` (string) Bank account name - `siteInvoiceDetails.accountNumber` (string) Bank account number - `siteInvoiceDetails.sortCode` (string) Sort code - `siteInvoiceDetails.purchaseOrderNumber` (string) Purchase order number - `siteInvoiceDetails.invoiceNotes` (string) Notes to appear on invoices addressed to this site - `siteInvoiceDetails.taxExempt` (boolean) Site is tax exempt - `siteInvoiceDetails.taxRegistrationNumber` (string) Tax registration number - `siteIdReceivingInvoice` (integer) Identifier of another site that receives the invoices if no invoice details provided for this site Example: 1 - `siteContacts` (array, required) - `siteContacts.contactName` (string, required) Contact name - `siteContacts.contactTelephoneNumber` (string) Contact telephone number - `siteContacts.contactAlternativeTelephoneNumber` (string) Contact alternative telephone number - `siteContacts.contactEmailAddress` (string) Email address - `siteContacts.contactRole` (string, required) Contact Role Enum: "ACCOUNTS", "TECHNICAL", "SALES", "GENERAL" - `siteContacts.receiveInvoiceBy` (string) Receive invoice by email, post or both? Required when contactNameToAppearOnInvoice is set to true Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveInvoiceSummaryBy` (string) Receive invoice summary by email, post or both? Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveElectronicSummaryReports` (boolean) Will receive electronic summary reports - `siteContacts.emailSuspended` (boolean) Whether the contact is unable to receive emails - `siteContacts.contactNameToAppearOnInvoice` (boolean) Only 1 contact per site can be set to true. If unspecified, this will be defaulted to the 1st contact. If specified for a different contact, it will be set to false for the previous one - `siteContacts.receiveEmailFraudAlert` (boolean) Will receive a fraud alert by email - `siteContacts.receiveSmsFraudAlert` (boolean) Will receive a fraud alert by SMS - `repaymentPlanAmount` (number) Repayment plan period amount in major currency (e.g pounds/dollars/euros) - `repaymentPlanRemainingPeriods` (integer) repayment plan remaining periods (typically in months) - `assignedCustomFields` (array) Example: [{"customFieldDefinitionId":102,"label":"Customer Tier","value":"Gold"}] - `assignedCustomFields.customFieldDefinitionId` (integer, required) Unique identifier of the custom field definition Example: 1 - `assignedCustomFields.value` (string) Value assigned to the assigned custom field (can be null if not set) Example: "Additional field value" ## Response 200 fields (application/json): - `id` (integer) Site identifier Example: 1 - `customerId` (integer, required) Customer identifier - set to 0 when creating a new customer - `siteName` (string, required) Site name - `siteReference` (string, required) Site reference - `startDate` (string, required) Site start date - `endDate` (string) Site end date - `createdDate` (string) Site created date - `updatedDate` (string) Site updated date - `siteAddress` (object, required) - `siteAddress.id` (integer) Internal identifier for address entry Example: 1 - `siteAddress.businessName` (string) Business name - `siteAddress.address1` (string, required) Address line 1 - `siteAddress.address2` (string) Address line 2 - `siteAddress.address3` (string) Address line 3 - `siteAddress.town` (string, required) Town - `siteAddress.county` (string) County - `siteAddress.postcode` (string, required) Postcode - `siteAddress.country` (string, required) ISO 3166 alpha-2 code representing country Example: "GB" - `siteInvoiceDetails` (object) Invoice details if this site should receive invoices - `siteInvoiceDetails.invoiceSummaryTemplateId` (integer) Invoice summary template identifier - set on creation of site only - `siteInvoiceDetails.invoiceTemplateId` (integer, required) Invoice template identifier - set on creation of site only - `siteInvoiceDetails.electronicSummaryTemplateIds` (array) List of electronic summary template identifiers associated with this site Example: [123] - `siteInvoiceDetails.invoiceSummaryTemplateComponents` (array) List of invoice summary template components associated with this site - `siteInvoiceDetails.invoiceSummaryTemplateComponents.id` (integer, required) Invoice summary component identifier Example: 1 - `siteInvoiceDetails.invoiceSummaryTemplateComponents.positionInTemplate` (integer, required) Position of the component within the invoice summary template Example: 1 - `siteInvoiceDetails.invoiceAddress` (object) - `siteInvoiceDetails.accountPackageReference` (string) Account package reference - `siteInvoiceDetails.paymentTermsInDays` (integer) Payment terms in days, used to derive the invoice due date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.preferredPaymentDay` (integer) Preferred payment day of month, used to derive the invoice due date. When automated, it will be used to collect money on that date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.paymentMethod` (string, required) Payment method Enum: "CHEQUE", "DIRECT_DEBIT", "CANCELLED_DD", "CANCELLED_CARD", "CREDIT_CARD", "PAYPAL", "BACS", "POST_OFFICE_PAYMENT_CARD", "EZYPAY", "GO_CARDLESS", "GC_INSTANT_BANK_PAYMENTS", "STRIPE", "STRIPE_CARD", "STRIPE_DD", "FINASTRA", "FAST_PAY", "OTHER" - `siteInvoiceDetails.mandateStatus` (string) Mandate status - `siteInvoiceDetails.mandateCreatedDate` (string) Site invoice mandate created date - `siteInvoiceDetails.mandateUpdatedDate` (string) Site invoice mandate updated date - `siteInvoiceDetails.mandateReference` (string) Required when the paymentType is an integrated one, for example GO_CARDLESS, FINASTRA or STRIPE. If GO_CARDLESS, only accepted Created, Pending Submission, Submitted, Active, Reinstated, Customer approval granted and Customer approval skipped - `siteInvoiceDetails.thirdPartyCustomerReference` (string) Reference to a customer in a third party system. For example, Stripe Customer ID (mandatory if a Stripe mandate is provided), or optional references like GO_CARDLESS Customer Reference or FINASTRA Account Number - `siteInvoiceDetails.directDebitReference` (string) Direct debit reference - `siteInvoiceDetails.accountName` (string) Bank account name - `siteInvoiceDetails.accountNumber` (string) Bank account number - `siteInvoiceDetails.sortCode` (string) Sort code - `siteInvoiceDetails.purchaseOrderNumber` (string) Purchase order number - `siteInvoiceDetails.invoiceNotes` (string) Notes to appear on invoices addressed to this site - `siteInvoiceDetails.taxExempt` (boolean) Site is tax exempt - `siteInvoiceDetails.taxRegistrationNumber` (string) Tax registration number - `siteIdReceivingInvoice` (integer) Identifier of another site that receives the invoices if no invoice details provided for this site Example: 1 - `siteContacts` (array, required) - `siteContacts.id` (integer) Contact identifier Example: 1 - `siteContacts.contactName` (string, required) Contact name - `siteContacts.contactTelephoneNumber` (string) Contact telephone number - `siteContacts.contactAlternativeTelephoneNumber` (string) Contact alternative telephone number - `siteContacts.contactEmailAddress` (string) Email address - `siteContacts.contactRole` (string, required) Contact Role Enum: "ACCOUNTS", "TECHNICAL", "SALES", "GENERAL" - `siteContacts.receiveInvoiceBy` (string) Receive invoice by email, post or both? Required when contactNameToAppearOnInvoice is set to true Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveInvoiceSummaryBy` (string) Receive invoice summary by email, post or both? Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveElectronicSummaryReports` (boolean) Will receive electronic summary reports - `siteContacts.emailSuspended` (boolean) Whether the contact is unable to receive emails - `siteContacts.contactNameToAppearOnInvoice` (boolean) Only 1 contact per site can be set to true. If unspecified, this will be defaulted to the 1st contact. If specified for a different contact, it will be set to false for the previous one - `siteContacts.receiveEmailFraudAlert` (boolean) Will receive a fraud alert by email - `siteContacts.receiveSmsFraudAlert` (boolean) Will receive a fraud alert by SMS - `repaymentPlanAmount` (number) Repayment plan period amount in major currency (e.g pounds/dollars/euros) - `repaymentPlanRemainingPeriods` (integer) repayment plan remaining periods (typically in months) - `assignedCustomFields` (array) Example: [{"customFieldDefinitionId":102,"label":"Customer Tier","value":"Gold"}] - `assignedCustomFields.id` (integer) Unique identifier of the assigned custom field Example: 1 - `assignedCustomFields.customFieldDefinitionId` (integer, required) Unique identifier of the custom field definition Example: 1 - `assignedCustomFields.label` (string) Display label of the custom field definition Example: "Additional field definition label" - `assignedCustomFields.value` (string) Value assigned to the assigned custom field (can be null if not set) Example: "Additional field value" ## Response 201 fields (application/json): - `id` (integer) Site identifier Example: 1 - `customerId` (integer, required) Customer identifier - set to 0 when creating a new customer - `siteName` (string, required) Site name - `siteReference` (string, required) Site reference - `startDate` (string, required) Site start date - `endDate` (string) Site end date - `createdDate` (string) Site created date - `updatedDate` (string) Site updated date - `siteAddress` (object, required) - `siteAddress.id` (integer) Internal identifier for address entry Example: 1 - `siteAddress.businessName` (string) Business name - `siteAddress.address1` (string, required) Address line 1 - `siteAddress.address2` (string) Address line 2 - `siteAddress.address3` (string) Address line 3 - `siteAddress.town` (string, required) Town - `siteAddress.county` (string) County - `siteAddress.postcode` (string, required) Postcode - `siteAddress.country` (string, required) ISO 3166 alpha-2 code representing country Example: "GB" - `siteInvoiceDetails` (object) Invoice details if this site should receive invoices - `siteInvoiceDetails.invoiceSummaryTemplateId` (integer) Invoice summary template identifier - set on creation of site only - `siteInvoiceDetails.invoiceTemplateId` (integer, required) Invoice template identifier - set on creation of site only - `siteInvoiceDetails.electronicSummaryTemplateIds` (array) List of electronic summary template identifiers associated with this site Example: [123] - `siteInvoiceDetails.invoiceSummaryTemplateComponents` (array) List of invoice summary template components associated with this site - `siteInvoiceDetails.invoiceSummaryTemplateComponents.id` (integer, required) Invoice summary component identifier Example: 1 - `siteInvoiceDetails.invoiceSummaryTemplateComponents.positionInTemplate` (integer, required) Position of the component within the invoice summary template Example: 1 - `siteInvoiceDetails.invoiceAddress` (object) - `siteInvoiceDetails.accountPackageReference` (string) Account package reference - `siteInvoiceDetails.paymentTermsInDays` (integer) Payment terms in days, used to derive the invoice due date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.preferredPaymentDay` (integer) Preferred payment day of month, used to derive the invoice due date. When automated, it will be used to collect money on that date. Either paymentTermsInDays or preferredPaymentDay are required - `siteInvoiceDetails.paymentMethod` (string, required) Payment method Enum: "CHEQUE", "DIRECT_DEBIT", "CANCELLED_DD", "CANCELLED_CARD", "CREDIT_CARD", "PAYPAL", "BACS", "POST_OFFICE_PAYMENT_CARD", "EZYPAY", "GO_CARDLESS", "GC_INSTANT_BANK_PAYMENTS", "STRIPE", "STRIPE_CARD", "STRIPE_DD", "FINASTRA", "FAST_PAY", "OTHER" - `siteInvoiceDetails.mandateStatus` (string) Mandate status - `siteInvoiceDetails.mandateCreatedDate` (string) Site invoice mandate created date - `siteInvoiceDetails.mandateUpdatedDate` (string) Site invoice mandate updated date - `siteInvoiceDetails.mandateReference` (string) Required when the paymentType is an integrated one, for example GO_CARDLESS, FINASTRA or STRIPE. If GO_CARDLESS, only accepted Created, Pending Submission, Submitted, Active, Reinstated, Customer approval granted and Customer approval skipped - `siteInvoiceDetails.thirdPartyCustomerReference` (string) Reference to a customer in a third party system. For example, Stripe Customer ID (mandatory if a Stripe mandate is provided), or optional references like GO_CARDLESS Customer Reference or FINASTRA Account Number - `siteInvoiceDetails.directDebitReference` (string) Direct debit reference - `siteInvoiceDetails.accountName` (string) Bank account name - `siteInvoiceDetails.accountNumber` (string) Bank account number - `siteInvoiceDetails.sortCode` (string) Sort code - `siteInvoiceDetails.purchaseOrderNumber` (string) Purchase order number - `siteInvoiceDetails.invoiceNotes` (string) Notes to appear on invoices addressed to this site - `siteInvoiceDetails.taxExempt` (boolean) Site is tax exempt - `siteInvoiceDetails.taxRegistrationNumber` (string) Tax registration number - `siteIdReceivingInvoice` (integer) Identifier of another site that receives the invoices if no invoice details provided for this site Example: 1 - `siteContacts` (array, required) - `siteContacts.id` (integer) Contact identifier Example: 1 - `siteContacts.contactName` (string, required) Contact name - `siteContacts.contactTelephoneNumber` (string) Contact telephone number - `siteContacts.contactAlternativeTelephoneNumber` (string) Contact alternative telephone number - `siteContacts.contactEmailAddress` (string) Email address - `siteContacts.contactRole` (string, required) Contact Role Enum: "ACCOUNTS", "TECHNICAL", "SALES", "GENERAL" - `siteContacts.receiveInvoiceBy` (string) Receive invoice by email, post or both? Required when contactNameToAppearOnInvoice is set to true Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveInvoiceSummaryBy` (string) Receive invoice summary by email, post or both? Enum: "EMAIL", "POST", "EMAIL_AND_POST" - `siteContacts.receiveElectronicSummaryReports` (boolean) Will receive electronic summary reports - `siteContacts.emailSuspended` (boolean) Whether the contact is unable to receive emails - `siteContacts.contactNameToAppearOnInvoice` (boolean) Only 1 contact per site can be set to true. If unspecified, this will be defaulted to the 1st contact. If specified for a different contact, it will be set to false for the previous one - `siteContacts.receiveEmailFraudAlert` (boolean) Will receive a fraud alert by email - `siteContacts.receiveSmsFraudAlert` (boolean) Will receive a fraud alert by SMS - `repaymentPlanAmount` (number) Repayment plan period amount in major currency (e.g pounds/dollars/euros) - `repaymentPlanRemainingPeriods` (integer) repayment plan remaining periods (typically in months) - `assignedCustomFields` (array) Example: [{"customFieldDefinitionId":102,"label":"Customer Tier","value":"Gold"}] - `assignedCustomFields.id` (integer) Unique identifier of the assigned custom field Example: 1 - `assignedCustomFields.customFieldDefinitionId` (integer, required) Unique identifier of the custom field definition Example: 1 - `assignedCustomFields.label` (string) Display label of the custom field definition Example: "Additional field definition label" - `assignedCustomFields.value` (string) Value assigned to the assigned custom field (can be null if not set) Example: "Additional field value" ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields