{
	"$schema": "http://json-schema.org/draft-03/schema#",
	"title": "Supplier resource GET schema",
	"description": "Schema for retrieval of a supplier resource.",
	"type": "object",
	"restdocs": "http://restdocs.e-conomic.com/#get-suppliers-suppliernumber",
	"properties": {
		"address": {
			"type": "string",
			"maxLength": 255,
			"description": "Address for the supplier including street and number."
		},
		"attention": {
			"type": "object",
			"description": "Optional contact person at the supplier.",
			"properties": {
				"number": {
					"type": "integer",
					"description": "Unique number identifying the supplier contact."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the supplier contact resource."
				}
			}
		},
		"bankAccount": {
			"type": "string",
			"maxLength": 50,
			"description": "The supplier's bank account."
		},
		"barred": {
			"type": "boolean",
			"description": "Boolean indication of whether the supplier is barred."
		},
		"city": {
			"type": "string",
			"maxLength": 50,
			"description": "The supplier's city."
		},
		"contacts": {
			"type": "string",
			"format": "uri",
			"description": "A unique reference to the supplier contacts collection."
		},
		"corporateIdentificationNumber": {
			"type": "string",
			"maxLength": 40,
			"description": "Company Identification Number. For example CVR in Denmark."
		},
		"costAccount": {
			"type": "object",
			"description": "Cost account for the supplier.",
			"properties": {
				"accountNumber": {
					"type": "integer",
					"readOnly": true,
					"description": "Unique number identifying the cost account."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the account resource."
				}
			}
		},
		"country": {
			"type": "string",
			"maxLength": 50,
			"description": "The supplier's country."
		},
		"currency": {
			"type": "string",
			"maxLength": 3,
			"minLength": 3,
			"required": true,
			"description": "Default currency used when purchasing from the supplier."
		},
		"defaultInvoiceText": {
			"type": "string",
			"maxLength": 100,
			"description": "The default invoice text for the supplier."
		},
		"layout": {
			"type": "object",
			"description": "Layout to be applied for invoices and other documents for this supplier.",
			"required": true,
			"properties": {
				"layoutNumber": {
					"type": "integer",
					"description": "The unique identifier of the layout."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique link reference to the layout item.",
					"required": true
				}
			}
		},
		"email": {
			"type": "string",
			"maxLength": 100,
			"description": "The supplier's e-mail address. Note: you can specify multiple email addresses in this field, separated by a space."
		},
		"name": {
			"type": "string",
			"maxLength": 255,
			"minLength": 1,
			"description": "The supplier name."
		},
		"paymentTerms": {
			"type": "object",
			"required": true,
			"minimum": 1,
			"description": "The default payment terms for the supplier.",
			"properties": {
				"paymentTermsNumber": {
					"type": "integer",
					"minimum": 1,
					"description": "A unique identifier of the payment term."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the payment term resource.",
					"required": true
				}
			}
		},
		"phone": {
			"type": "string",
			"maxLength": 20,
			"description": "The supplier's phone number."
		},
		"remittanceAdvice": {
			"type": "object",
			"description": "Remittance advice for the supplier.",
			"properties": {
				"creditorId": {
					"type": "string",
					"maxLength": 50,
					"description": "Supplier payment details."
				},
				"paymentType": {
					"type": "object",
					"description": "The default payment type for the supplier.",
					"properties": {
						"paymentTypeNumber": {
							"type": "integer",
							"description": "Unique number identifying the payment type."
						},
						"self": {
							"type": "string",
							"format": "uri",
							"description": "A unique reference to the payment type resource."
						}
					}
				}
			}
		},
		"salesPerson": {
			"type": "object",
			"description": "Reference to the employee responsible for contact with this supplier.",
			"properties": {
				"employeeNumber": {
					"type": "integer",
					"minimum": 1,
					"description": "Unique identifier of the employee."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the employee resource."
				}
			}
		},
		"supplierContact": {
			"type": "object",
			"description": "Reference to main contact employee at supplier.",
			"properties": {
				"number": {
					"type": "integer",
					"description": "Unique number identifying the supplier contact."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the supplier contact resource."
				}
			}
		},
		"supplierGroup": {
			"type": "object",
			"minimum": 1,
			"description": "The supplier group of the supplier.",
			"properties": {
				"supplierGroupNumber": {
					"type": "integer",
					"description": "Unique number identifying the supplier group."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the supplier group resource.",
					"required": true
				}
			}
		},
		"supplierNumber": {
			"type": "integer",
			"required": true,
			"description": "The supplier number is a positive unique numerical identifier with a maximum of 9 digits.",
			"maximum": 999999999,
			"minimum": 1
		},
		"vatZone": {
			"type": "object",
			"required": true,
			"description": "Indicates whether the supplier is located domestically, in Europe or elsewhere abroad",
			"properties": {
				"vatZoneNumber": {
					"type": "integer",
					"description": "Unique identifier of the vat zone."
				},
				"self": {
					"type": "string",
					"format": "uri",
					"description": "A unique reference to the vat zone.",
					"required": true
				}
			}
		},
		"zip": {
			"type": "string",
			"maxLength": 10,
			"description": "The suppliers zipcode."
		},
		"self": {
			"type": "string",
			"description": "A unique self reference of the supplier."
		}
	}
}
