{ "openapi" : "3.0.3", "info" : { "title" : "Zola Takehome", "version" : "1.0.0-dev", "description" : "Zola interview takehome assignment" }, "servers" : [ { "url" : "localhost" } ], "paths" : { "/v1/invoices" : { "get" : { "description" : "Find an invoice by invoice_number or po_number. If neither is provided, returns all invoices.", "parameters" : [ { "name" : "invoice_number", "in" : "query", "description" : "An invoice number to search for.", "required" : false, "schema" : { "type" : "string" } }, { "name" : "po_number", "in" : "query", "description" : "An purchase order number to search for.", "required" : false, "schema" : { "type" : "string" } }, { "name" : "limit", "in" : "query", "description" : "How many records to return. Defaults to 50 if not provided or not in the range 0 < limit <= 50.", "required" : false, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "offset", "in" : "query", "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.", "required" : false, "schema" : { "type" : "integer", "format" : "int32" } } ], "responses" : { "200" : { "description" : "Successful response", "content" : { "application/json" : { "schema" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/OrgHelicalmomentZolaTakehomeV1ModelsInvoice" } } } } } } }, "put" : { "description" : "Insert an invoice", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrgHelicalmomentZolaTakehomeV1ModelsInvoice" } } }, "required" : true }, "responses" : { "201" : { "description" : "Created", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/OrgHelicalmomentZolaTakehomeV1ModelsInvoice" } } } } } } } }, "components" : { "schemas" : { "OrgHelicalmomentZolaTakehomeV1ModelsInvoice" : { "description" : "An invoice", "type" : "object", "required" : [ "invoice_number", "po_number", "due_date", "amount_cents" ], "properties" : { "id" : { "description" : "Unique identifier for an invoice", "type" : "integer", "format" : "int32" }, "invoice_number" : { "description" : "The invoice number associated with the invoice", "type" : "string" }, "po_number" : { "description" : "The purchase number associated with the invoice", "type" : "string" }, "due_date" : { "description" : "When invoice payment is due", "type" : "string", "format" : "date" }, "amount_cents" : { "description" : "Total amount of invoice in US cents", "type" : "integer", "format" : "int64" }, "created_at" : { "description" : "Invoice creation timestamp", "type" : "string", "format" : "date-time" } } } } } }