{
	"$schema": "http://json-schema.org/draft-03/schema#",
	"title": "Customer Contact Schema",
	"description": "A schema for retrieval of customer contacts.",
	"type": "object",
	"restdocs": "http://restdocs.e-conomic.com/#get-customers-customernumber-contacts",
	"properties": {
		"collection": {
			"type": "array",
			"description": "Array containing all the contacts on a customer.",
			"items": {
				"title": "customer contact schema",
				"type": "object",
				"description": "A schema for information about a customer contact.",
				"properties": {
					"customerContactNumber": {
						"type": "integer",
						"filterable": true,
						"sortable": true,
						"description": "Unique numerical identifier of the customer contact."
					},
					"email": {
						"type": "string",
						"maxLength": 255,
						"filterable": true,
						"sortable": true,
						"description": "Customer contact e-mail address. This is where copies of sales documents are sent."
					},
					"name": {
						"type": "string",
						"maxLength": 255,
						"filterable": true,
						"sortable": true,
						"description": "Customer contact name."
					},
					"phone": {
						"type": "string",
						"maxLength": 50,
						"filterable": true,
						"sortable": true,
						"description": "Customer contact phone number."
					},
					"eInvoiceId": {
						"type": "string",
						"maxLength": 50,
						"filterable": true,
						"sortable": true,
						"description": "Electronic invoicing Id. This will appear on EAN invoices in the field <cbc:ID>. Note this is not available on UK agreements."
					},
					"notes": {
						"type": "string",
						"maxLength": 2000,
						"description": "Any notes you need to keep on a contact person."
					},
					"emailNotifications": {
						"type": "array",
						"items": {
							"enum": ["invoices", "orders", "quotations", "reminders"]
						},
						"uniqueItems": true,
						"description": "This array specifies what events the contact person should recieve email notifications on. Note that limited plans only have access to invoice notifications."
					},
					"deleted": {
						"type": "boolean",
						"description": "Flag indicating if the contact person is deleted."
					},
					"customer": {
						"type": "object",
						"description": "The customer this contact belongs to.",
						"properties": {
							"customerNumber": {
								"type": "integer",
								"maximum": 999999999,
								"minimum": 1,
								"filterable": true,
								"sortable": true,
								"description": "The customer number is a positive unique numerical identifier with a maximum of 9 digits."
							},
							"self": {
								"type": "string",
								"format": "uri",
								"description": "A unique reference to the customer resource.",
								"required": true
							}
						}
					},
					"sortKey": {
						"type": "integer",
						"filterable": true,
						"sortable": true,
						"description": "The customer contact number displayed in the e-conomic web interface.",
						"minimum": 1
					},
					"self": {
						"type": "string",
						"format": "uri",
						"description": "The unique self reference of the customer contact resource.",
						"required": true
					}
				}
			}
		},
		"metaData": {
			"type": "object",
			"description": "Information about possible actions, endpoints and resource paths related to the endpoint."
		},
		"pagination": {
			"type": "object",
			"description": "Information about the pagination."
		},
		"self": {
			"type": "string",
			"format": "uri",
			"description": "The unique self reference of the customer contact collection resource.",
			"required": true
		}
	}
}
