{ "components": { "schemas": { "invoice": { "description": "An invoice", "properties": { "id": { "type": "integer", "description": "Unique identifier for an invoice" }, "invoice_number": { "type": "string", "description": "The invoice number associated with the invoice" }, "po_number": { "type": "string", "description": "The purchase number associated with the invoice" }, "due_date": { "type": "string", "format": "date", "description": "When invoice payment is due" }, "amount_cents": { "type": "integer", "format": "int64", "description": "Total amount of invoice in US cents" }, "created_at": { "type": "string", "format": "date-time", "description": "Invoice creation timestamp" } }, "required": [ "invoice_number", "po_number", "due_date", "amount_cents" ], "type": "object" } } }, "info": { "contact": {}, "description": "Zola interview takehome assignment", "license": {}, "termsOfService": "", "title": "Zola Takehome", "version": "1.0.0-dev" }, "openapi": "3.0.2", "paths": { "/v1/invoices": { "put": { "description": "Insert an invoice", "operationId": "put--v-invoices", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/invoice" } } } }, "responses": { "201": { "description": "org.helicalmoment.zola.takehome.v1.models.invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/invoice" } } }, "headers": {} } }, "tags": [ "invoice" ] }, "get": { "description": "Find an invoice by invoice_number or po_number. If neither is provided, returns all invoices.", "operationId": "get--v-invoices", "parameters": [ { "deprecated": false, "in": "query", "required": false, "schema": { "type": "string" }, "description": "An invoice number to search for.", "name": "invoice_number" }, { "deprecated": false, "in": "query", "required": false, "schema": { "type": "string" }, "description": "An purchase order number to search for.", "name": "po_number" }, { "deprecated": false, "in": "query", "required": false, "schema": { "type": "integer" }, "description": "How many records to return. Defaults to 50 if not provided or not in the range 0 < limit <= 50.", "name": "limit" }, { "deprecated": false, "in": "query", "required": false, "schema": { "type": "integer" }, "description": "Pagination offset; e.g., to retrieve the second page of invoices with a limit of 50, set to 51. If not provided, defaults to 0.", "name": "offset" } ], "responses": { "200": { "description": "[org.helicalmoment.zola.takehome.v1.models.invoice]", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/invoice" }, "type": "array" } } }, "headers": {} } }, "tags": [ "invoice" ] } } }, "servers": [ { "url": "localhost" } ] }