Create a new site

post/sites
SecuritybearerAuth
Request
Request Body schema: application/json

New site

customerId
required
integer <int64>

Customer identifier - set to 0 when creating a new customer.

siteName
required
string [ 1 .. 100 ] characters [\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...

Site name

siteReference
required
string [ 1 .. 100 ] characters [\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...

Site reference

startDate
required
string <date>

Site start date

endDate
string <date>

Site end date

required
object (Address)
object (SiteInvoiceDetails)

Invoice details if this site should receive invoices

siteIdReceivingInvoice
integer <int64>

Identifier of another site that receives the invoices if no invoice details provided for this site

required
Array of objects (ContactDetails) non-empty
repaymentPlanAmount
number <decimal> [ 1 .. 100000 ]

Repayment plan period amount in major currency (e.g pounds/dollars/euros)

repaymentPlanRemainingPeriods
integer <int64> [ 0 .. 240 ]

repayment plan remaining periods (typically in months)

Responses
200

OK

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

Request samples
application/json
{
  • "customerId": 0,
  • "siteName": "string",
  • "siteReference": "string",
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24",
  • "siteAddress": {
    • "businessName": "string",
    • "address1": "string",
    • "address2": "string",
    • "address3": "string",
    • "town": "string",
    • "county": "string",
    • "postcode": "string",
    • "country": "GB"
    },
  • "siteInvoiceDetails": {
    • "invoiceSummaryTemplateId": 0,
    • "invoiceTemplateId": 0,
    • "invoiceAddress": {
      • "businessName": "string",
      • "address1": "string",
      • "address2": "string",
      • "address3": "string",
      • "town": "string",
      • "county": "string",
      • "postcode": "string",
      • "country": "GB"
      },
    • "accountPackageReference": "string",
    • "paymentTermsInDays": 400,
    • "preferredPaymentDay": 1,
    • "paymentMethod": "CHEQUE",
    • "mandateReference": "string",
    • "directDebitReference": "string",
    • "accountName": "string",
    • "accountNumber": "stringst",
    • "sortCode": "string",
    • "purchaseOrderNumber": "string",
    • "invoiceNotes": "string",
    • "taxExempt": false,
    • "taxRegistrationNumber": "string"
    },
  • "siteIdReceivingInvoice": 1,
  • "siteContacts": [
    • {
      • "contactName": "string",
      • "contactTelephoneNumber": "string",
      • "contactAlternativeTelephoneNumber": "string",
      • "contactEmailAddress": "string",
      • "contactRole": "ACCOUNTS",
      • "receiveInvoiceBy": "EMAIL",
      • "receiveInvoiceSummaryBy": "EMAIL",
      • "receiveElectronicSummaryReports": true,
      • "emailSuspended": false,
      • "contactNameToAppearOnInvoice": false,
      • "receiveEmailFraudAlert": false,
      • "receiveSmsFraudAlert": false
      }
    ],
  • "repaymentPlanAmount": 1,
  • "repaymentPlanRemainingPeriods": 0
}
Response samples
application/json
{
  • "id": 1,
  • "customerId": 0,
  • "siteName": "string",
  • "siteReference": "string",
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24",
  • "createdDate": "2019-08-24T14:15:22Z",
  • "updatedDate": "2019-08-24T14:15:22Z",
  • "siteAddress": {
    • "id": 1,
    • "businessName": "string",
    • "address1": "string",
    • "address2": "string",
    • "address3": "string",
    • "town": "string",
    • "county": "string",
    • "postcode": "string",
    • "country": "GB"
    },
  • "siteInvoiceDetails": {
    • "invoiceSummaryTemplateId": 0,
    • "invoiceTemplateId": 0,
    • "invoiceAddress": {
      • "id": 1,
      • "businessName": "string",
      • "address1": "string",
      • "address2": "string",
      • "address3": "string",
      • "town": "string",
      • "county": "string",
      • "postcode": "string",
      • "country": "GB"
      },
    • "accountPackageReference": "string",
    • "paymentTermsInDays": 400,
    • "preferredPaymentDay": 1,
    • "paymentMethod": "CHEQUE",
    • "mandateStatus": "string",
    • "mandateCreatedDate": "2019-08-24T14:15:22Z",
    • "mandateUpdatedDate": "2019-08-24T14:15:22Z",
    • "mandateReference": "string",
    • "directDebitReference": "string",
    • "accountName": "string",
    • "accountNumber": "stringst",
    • "sortCode": "string",
    • "purchaseOrderNumber": "string",
    • "invoiceNotes": "string",
    • "taxExempt": false,
    • "taxRegistrationNumber": "string"
    },
  • "siteIdReceivingInvoice": 1,
  • "siteContacts": [
    • {
      • "id": 1,
      • "contactName": "string",
      • "contactTelephoneNumber": "string",
      • "contactAlternativeTelephoneNumber": "string",
      • "contactEmailAddress": "string",
      • "contactRole": "ACCOUNTS",
      • "receiveInvoiceBy": "EMAIL",
      • "receiveInvoiceSummaryBy": "EMAIL",
      • "receiveElectronicSummaryReports": true,
      • "emailSuspended": false,
      • "contactNameToAppearOnInvoice": false,
      • "receiveEmailFraudAlert": false,
      • "receiveSmsFraudAlert": false
      }
    ],
  • "repaymentPlanAmount": 1,
  • "repaymentPlanRemainingPeriods": 0
}