{
	"openapi": "3.0.0",
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"ClientResponse": {
				"properties": {
					"updated_at": {
						"type": "number",
						"format": "double"
					},
					"created_at": {
						"type": "string"
					},
					"updated_by": {
						"type": "number",
						"format": "double"
					},
					"created_by": {
						"type": "number",
						"format": "double"
					},
					"notes": {
						"type": "string"
					},
					"vat_number": {
						"type": "number",
						"format": "double"
					},
					"country": {
						"type": "string"
					},
					"city": {
						"type": "string"
					},
					"zip": {
						"type": "string"
					},
					"street": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"id": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"created_at",
					"created_by",
					"id"
				],
				"type": "object"
			},
			"ClientRequest": {
				"properties": {
					"external_refs": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"notes": {
						"type": "string"
					},
					"vat_number": {
						"type": "number",
						"format": "double"
					},
					"country": {
						"type": "string"
					},
					"city": {
						"type": "string"
					},
					"zip": {
						"type": "string"
					},
					"street": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"type": "object"
			},
			"ClientExternalReferencesResponse": {
				"properties": {
					"value": {
						"type": "string"
					},
					"key": {
						"type": "string"
					},
					"id": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"value",
					"key",
					"id"
				],
				"type": "object"
			},
			"ClientExternalReferencesRequest": {
				"properties": {
					"value": {
						"type": "string"
					},
					"key": {
						"type": "string"
					}
				},
				"required": [
					"value",
					"key"
				],
				"type": "object"
			},
			"ClientBillToResponse": {
				"properties": {
					"updated_at": {
						"type": "string",
						"nullable": true
					},
					"created_at": {
						"type": "string"
					},
					"updated_by": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"created_by": {
						"type": "number",
						"format": "double"
					},
					"bill_to_id": {
						"type": "number",
						"format": "double"
					},
					"bill_from_id": {
						"type": "number",
						"format": "double"
					},
					"client_id": {
						"type": "number",
						"format": "double"
					},
					"id": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"updated_at",
					"created_at",
					"updated_by",
					"created_by",
					"bill_to_id",
					"bill_from_id",
					"client_id",
					"id"
				],
				"type": "object"
			},
			"ClientBillToRequest": {
				"properties": {
					"clientId": {
						"type": "number",
						"format": "double"
					},
					"billToId": {
						"type": "number",
						"format": "double"
					},
					"billFromId": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"clientId",
					"billToId",
					"billFromId"
				],
				"type": "object"
			}
		},
		"securitySchemes": {
			"api_key": {
				"type": "apiKey",
				"name": "x-forecast-api-key",
				"in": "header"
			}
		}
	},
	"info": {
		"title": "Forecast API",
		"version": "1.0.0",
		"description": "The Forecast API is a complete programmable interface to all Forecast functionality.\n\nThis is a REST-style API that uses JSON for serialization and HTTP.",
		"termsOfService": "https://www.forecast.app/terms-of-service",
		"contact": {
			"name": "Forecast Support",
			"email": "info@forecast.it"
		}
	},
	"paths": {
		"/v1/clients": {
			"get": {
				"operationId": "GetAllClients",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/ClientResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns all clients.",
				"tags": [
					"Clients"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "extRefKey",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateClient",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/ClientResponse"
										},
										{}
									]
								}
							}
						}
					}
				},
				"description": "Creates a new client. Returns the same object as getting a single client.",
				"tags": [
					"Clients"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ClientRequest"
							}
						}
					}
				}
			}
		},
		"/v1/clients/{clientId}": {
			"get": {
				"operationId": "GetClient",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/ClientResponse"
										},
										{}
									]
								}
							}
						}
					}
				},
				"description": "Returns a specific client.",
				"tags": [
					"Clients"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "clientId",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateClient",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/ClientResponse"
										},
										{}
									]
								}
							}
						}
					}
				},
				"description": "Updates a client. Returns the same object as getting a single client.",
				"tags": [
					"Clients"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "clientId",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ClientRequest"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteClient",
				"responses": {
					"200": {
						"description": "Deleted"
					}
				},
				"description": "Deletes a client.",
				"tags": [
					"Clients"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "clientId",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/v1/client_bill_tos/{clientId}": {
			"get": {
				"operationId": "GetAll",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/ClientBillToResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns all client bill tos for given client ids.",
				"tags": [
					"ClientBillTos"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "clientId",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			},
			"delete": {
				"operationId": "Delete",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Deletes a client bill to.",
				"tags": [
					"ClientBillTos"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "clientId",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/v1/client_bill_tos": {
			"post": {
				"operationId": "Create",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/ClientBillToResponse"
										},
										{}
									]
								}
							}
						}
					}
				},
				"description": "Creates a new client bill to entry.",
				"tags": [
					"ClientBillTos"
				],
				"security": [
					{
						"api_key": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ClientBillToRequest"
							}
						}
					}
				}
			}
		}
	},
	"servers": [
		{
			"url": "/openapi/",
			"description": "This environment"
		}
	]
}